This method of the IClassFactory Interface creates an uninitialized object of a specified CLSID.
public IUnknown CreateInstance(IUnknown pUnkOuter, _Guid riid);
This method supports the standard return values E_UNEXPECTED, E_OUTOFMEMORY, and E_INVALIDARG, as well as the following:
S_OK -- The specified object was created.
CLASS_E_NOAGGREGATION -- The pUnkOuter parameter was non-NULL and the object does not support aggregation.
[in] pUnkOuter | If the object is being created as part of an aggregate, this is a pointer to the controlling IUnknown interface of the aggregate. Otherwise, pUnkOuter must be NULL. |
[in] riid | Reference to the identifier of the interface to be used to communicate with the newly created object. If pUnkOuter is NULL, riid is frequently the IID of the initializing interface; if pUnkOuter is non-NULL, riid must be IID_IUnknown (defined in the header as the IID for IUnknown). |