IClassFactory.CreateInstance

Creates an uninitialized object.

interface IClassFactory
extern (Windows) @nogc
CreateInstance
(,
const(IID)* riid
,
out void* ppvObject
)

Parameters

outer IUnknown

If the object is an aggregate, specify controlling IUnknown interface, otherwise set this to null

riid const(IID)*

The identifier of the interface to be used to communicate with the newly created object. If outer is null, this must be set to IUnknown.IID.

ppvObject void*

The address of pointer variable that receives the interface pointer requested in riid.

Return Value

Type: HRESULT

S_OK if creation succeeded, CLASS_E_NOAGGREGATION if object doesn't support aggregation, E_NOINTERFACE if the riid interface isn't supported, or either of E_INVALIDARG, E_OUTOFMEMORY and E_UNEXPECTED.

Meta