o CreateInstance
public HRESULT __stdcall CreateInstance(IUnknown * iUnkOuter,
REFIID iIid,
void ** oObject )=0
-
Creates an uninitialized object of a specified CLSID.
Objects that implement IClassFactory instantiate components using their CLSIDs as input,
and retrieve a pointer to the requested interface passed as an output argument to the client.
- Parameters:
-
- iUnkOuter
- A pointer to the aggregating component IUnknown interface.
Legal values: NULL if the client is not an aggregating component,
and a pointer to its IUnknwon interface otherwise.
- iIid
- A reference to the identifier to an interface that the component implements
and for which the client request a pointer to be retrieved.
Legal values: Should be expressed as IID_CATIXX,
where CATIXX is the interface to which a pointer is requested
- oObject
- The address of the pointer to the requested interface
- Returns:
- An HRESULT value.
Legal values:
- S_OK
- The component is successfully created and the interface pointer is successfully returned
- E_FAIL
- The component was successfully created, but the interface query failed
- E_NOINTERFACE
- The component was successfully created, but the it doesn't implement the requested interface
- E_OUTOFMEMORY
- The component allocation failed