CreateOLEObject
Instantiates a single instance of an Automation object.
Structure
CreateOleObject(const ClassName: string): IDispatch;
Parameters
Return Value
Description
CreateOleObject creates a single uninitialized object of the class specified by the ClassName parameter. ClassName specifies the string representation of the Class ID (CLSID). CreateOleObject is used to create an object of a specified type when the CLSID is known, and when the object is on a local or in-proc server. Only objects that are not part of an aggregate are created using CreateOleObject.
CreateOleObject is called once to create each new single instance of a class. To create multiple instance of the same class, using a class factory is recommended.
CreateOleObject returns a reference to the interface that can be used to communicate with the object. For CreateOleObject this interface is of type IDispatch. To create a COM object that does not support an IDispatch interface, use CreateComObject. |