Binds a COM server event to implemented interface methods on a Visual FoxPro object.

For information about binding events from native Visual FoxPro objects, see Event Binding for Visual FoxPro Objects.

EVENTHANDLER(oCOMObject, oVFPObject [, lUnbind])

Parameters

oCOMObject

Specifies the object reference to the object whose events are to be bound. oCOMObject must be a valid COM object.

oVFPObject

Specifies the object reference to the Visual FoxPro object that contains user-defined method code, which maps to corresponding COM object events. The class must implement the events interface for the particular COM object being passed in the first parameter. For example, you must implement the RecordsetEvents interface to bind to an ADO Recordset object.

lUnbind

Visual FoxPro automatically releases the COM object when it goes out of scope. By passing this parameter with a value of .T., you can release the event binding while both objects remain in scope.

Expand imageReturn Value

Expand imageRemarks

Expand imageExample

Expand imageSee Also