CAxWindow2T::CreateControlLic

Creates a licensed ActiveX control, initializes it, and hosts it in the specified window.

HRESULT CreateControlLic( 
   DWORD dwResID,  
   IStream* pStream = NULL,  
   IUnknown** ppUnkContainer = NULL,  
   BSTR bstrLicKey = NULL 
); 
HRESULT CreateControlLic( 
   LPCOLESTR lpszName,  
   IStream* pStream = NULL,  
   IUnknown** ppUnkContainer = NULL,  
   BSTR bstrLicKey = NULL 
);

bstrLicKey

The license key for the control; NULL if creating a nonlicensed control.

See CAxWindow::CreateControl for a description of the remaining parameters and return value.

See Hosting ActiveX Controls Using ATL AXHost for a sample that uses CAxWindow2T::CreateControlLic.

Header: atlwin.h

Show: