Creates an instance of the object class supported by this class factory, given a license key previously obtained from IClassFactory2::RequestLicKey. This method is the only possible means to create an object on an otherwise unlicensed machine.
HRESULT CreateInstanceLic(
IUnknown* pUnkOuter , |
//Pointer to controlling unknown of aggregated object |
IUnknown* pUnkReserved , |
//Unused. Must be NULL. |
REFIID riid , |
//Reference to the identifier of the interface |
BSTR bstrKey , |
//License key provided by IClassFactory2::RequestLicKey |
void** ppvObject |
//Indirect pointer to the interface of the type specified in riid |
); |
Parameters
Return Values
This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
Remarks
If the class factory does not provide a license key (that is, IClassFactory2::RequestLicKey returns E_NOTIMPL and the fRuntimeKeyAvail field in LICINFO is set to FALSE in IClassFactory2::GetLicInfo), then this method can also return E_NOTIMPL. In such cases, the class factory is implementing IClassFactory2 simply to specify whether or not the machine is licensed at all through the fLicVerified field of LICINFO.
See Also
IClassFactory2::GetLicInfo, IClassFactory2::RequestLicKey, LICINFO