CComClassFactory2::RequestLicKey

Creates and returns a license key, provided that the fRuntimeKeyAvail member of the LICINFO structure is TRUE.

STDMETHOD(RequestLicKey)( 
   DWORD dwReserved, 
   BSTR* pbstrKey  
);

Parameters

  • dwReserved
    [in] Not used. Must be zero.

  • pbstrKey
    [out] Pointer to the license key.

Return Value

A standard HRESULT value.

Remarks

A license key is required for calling CreateInstanceLic to create an object on an unlicensed machine. If fRuntimeKeyAvail is FALSE, then objects can only be created on a fully licensed machine.

Call GetLicInfo to retrieve the value of fRuntimeKeyAvail.

Requirements

Header: atlcom.h

See Also

Reference

CComClassFactory2 Class