Ole32DllGetClassObject Method

Retrieves the class object from a DLL object handler or object application.

OLE does not provide this function. DLLs that support the OLE Component Object Model (COM) must implement DllGetClassObject in OLE object handlers or DLL applications.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Ole32.dll", ExactSpelling = true)]
public static HResult DllGetClassObject(
	ref Guid refClsid,
	ref Guid refIid,
	out Object refPv
)

Parameters

refClsid  Guid
The CLSID that will associate the correct data and code.
refIid  Guid
A reference to the identifier of the interface that the caller is to use to communicate with the class object.

Usually, this is IID_IClassFactory (defined in the OLE headers as the interface identifier for IClassFactory).

refPv  Object
The address of a pointer variable that receives the interface pointer requested in refIid.

Upon successful return, refPv contains the requested interface pointer.

If an error occurs, the interface pointer is NULL.

Return Value

HResult
Returns S_OK on success, or other HResult if an error occurs.

Remarks

See Also