This method of the IClassFactory2 interface creates an instance of the licensed object given a license key from RequestLicKey.
public IUnknown CreateInstanceLic(IUnknown pUnkOuter, IUnknown pUnkReserved, _Guid riid, String bstrKey);
This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
S_OK
The license was successfully created.
E_NOTIMPL
This method is not implemented because objects can only be created on fully licensed machines through CreateInstance.
E_POINTER
The pointers passed in bstrKey are not valid. For example, it may be NULL.
E_NOINTERFACE
The object can be created (and the license key is valid) except the object does not support the interface specified by riid.
CLASS_E_NOAGGREGATION
The pUnkOuter parameter is non-NULL, but this object class does not support aggregation.
CLASS_E_NOTLICENSED
The key provided in bstrKey is not a valid license key.
pUnkOuter | [in] Pointer to the controlling IUnknown interface on the outer unknown if this object is being created as part of an aggregate. If the object is not part of an aggregate, this parameter must be NULL. |
pUnkReserved | [in] Unused. Must be NULL. |
riid | [in] Reference to the identifier of the interface to be used to communicate with the newly created object. |
bstrKey | [in] Run-time license key previously obtained from RequestLicKey that is required to create an object. |