COM_AttachEventHandler()

Examples


The COM_AttachEventHandler() function attaches a callback object as an event handler.

Syntax

COM_AttachEventHandler(COM_reference, callback_object {, interface_id})

Parameters

COM_reference – A reference to the object in the external application that notifies the Dexterity-based application when events occur.

callback_object – A reference to a callback object in the Dexterity-based application which contains the functions that handle the events received.

interface_id – An optional string parameter that indicates the GUID for the class or interface that contains the event. Use this parameter if you must attach to a specific interface that is not the default interface. If this parameter is not specified, the function will use the default source interface.

Return value

A long integer that identifies the event handler. You will use this value if you need to detach the event handler. The value 0 indicates the event handler could not be attached.

Comments

When you attach a callback object as an event handler, your application is notified when that event occurs. If your application no longer needs to be notified that the event has occurred, use the COM_DetachEventHandler() function to detach the event handler.


Documentation Feedback