Obtains a class factory for an ActiveX object when the ActiveX object resides in an in-process ActiveX server (DLL).
Do not call DllGetClassObject directly. DllGetClassObject is exported by all ActiveX server DLLs, and it is called internally by the operating system. When a user calls CoGetClassObject (or CoCreateInstance, which internally calls CoGetClassObject) to obtain a class factory for an ActiveX object, the OLE engine loads the ActiveX server DLL into memory and calls its DllGetClassObject function.
The parameters to DllGetClassObject are:
CLSID is the class identifier for the ActiveX object to be created by the class factory.
IID is the interface indentifier for the interface through which the caller will communicate with the class factory object to create instances of the object referenced by CLSID. This parameter is nearly always IID_IClassFactory or IID_IClassFactory2.
Obj will hold a pointer to the resulting class factory interface upon successful completion of the function. If an error occurs, Obj will be set to nil.
The return values for DllGetClassObject are as follows:
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!