The IDLcomIDispatch::Init function method is used to initialize a given COM object and establish a link between the resulting IDL object and the IDispatch interface of the underlying COM object.


Obj = OBJ_NEW('IDLcomIDispatch$ID_type$ID')


Result = Obj->[IDLcomIDispatch$ID_type$ID::]Init( )     (In a lifecycle method only.)

where ID_type is one of the following:

  • CLSID if the object is identified by its COM class ID, or
  • PROGID if the object is identified by its COM program ID,

and ID is the COM object’s actual class or program identifier string. If the COM object’s class identifier string is used to create the IDLcomIDispatch object, the braces ( { } ) must be removed and the hyphens replaced by underscores.

See IDLcomIDispatch Object Naming Scheme for details.

Note: While COM objects incorporated into IDL are instances of the dynamic subclass created when the COM object is instantiated, they still expose the functionality of the class IDLcomIDispatch, which is the direct superclass of the dynamic subclass. All IDLcomIDispatch methods are available to the dynamic subclass.





Version History