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 //Address of output variable that receives
// the interface pointer requested in riid
);
This method supports the standard return values E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
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.
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in ocidl.h.
IClassFactory2::GetLicInfo, IClassFactory2::RequestLicKey, LICINFO