IEventManager::InstallHandler

Description

Allows applications to install handlers on sessions for event callbacks. The handler specified in the handler parameter is installed along with previously installed handlers for the specified event. Applications can specify a value in the userHandle parameter that is passed to the handler on its invocation. VISA identifies handlers uniquely using the handler reference and this value.

VB Prototype

InstallHandler(
  type As EventType,
  handler As IEventHandler,
  userHandle As Long, ' Optional Parameter
  customEventType As Long ' Optional Parameter
)

C++ Prototype

HRESULT InstallHandler(
  EventType type,
  IEventHandler* handler,
  long userHandle,
  long customEventType
);

Parameters

type

The type of event for the handler to receive.

handler

The IEventHandler interface pointer of the client-implemented callback object.

userHandle

[Optional in Visual Basic] A client provided value that uniquely identifies the handler.

customEventType

[Optional in Visual Basic] If the event type property is CUSTOM_EVENT_TYPE, this argument contains the custom event type number, otherwise it is ignored.

Return Value

Refer to the table of return codes.

See Also

ComponentVersion, SpecVersion, HardwareInterfaceName, HardwareInterfaceNumber, HardwareInterfaceType, LockState, OptionString, ProgID, ResourceName, SessionType, SoftwareManufacturerID, SoftwareManufacturerName, Timeout, LastStatus, MaximumQueueLength, GetAttribute, SetAttribute, LockRsrc, UnlockRsrc, Init, Close, EnableEvent, DisableEvent, DiscardEvents, WaitOnEvent, InstallHandler, UninstallHandler, IEventManager Overview