Description

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

Return Type

A Long value.  

A long value identifying this connection.

Syntax

object.AttachToType (vType)

The AttachToType Method syntax has these parts:

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

VARIANT : The McObject's type name or id.

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.