Description

Sets up to automatically attach this object instance (McNotifySink) as a notification sink to any McObject which is created of a given category.

Return Type

A Long value.  

A long value identifying this connection.

Syntax

object.AttachToCategory (vCategory)

The AttachToCategory Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McNotifySink.
vCategoryRequired. A Variant value.

VARIANT : The McObject's category (see McObjectManager.IMcObject.Category).

Remarks

This object instance MUST be created using McEngine.CreateObject("McImageLib.%McNotifySink:IQL~McNotifySink%") (in order to establish a connection with the Object Manager) or this function will fail and return E_POINTER. Once this instance is connected, notifications can be received using the standard IConnectionPoint scheme (With Events in VB) using this instance as the event source.

Exceptions

Exception: Meaning:

E_POINTER.