Partager via


CAxWindow2T::CreateControlLicEx

Creates a licensed ActiveX control, initializes it, hosts it in the specified window, and retrieves an interface pointer (or pointers) from the control.

HRESULT CreateControlLicEx( 
   LPCOLESTR lpszName,  
   IStream* pStream = NULL, 
   IUnknown** ppUnkContainer = NULL,  
   IUnknown** ppUnkControl = NULL, 
   REFIID iidSink = IID_NULL,  
   IUnknown* punkSink = NULL,  
   BSTR bstrLicKey = NULL 
); 
HRESULT CreateControlLicEx( 
   DWORD dwResID, 
   IStream* pStream = NULL, 
   IUnknown** ppUnkContainer = NULL, 
   IUnknown** ppUnkControl = NULL, 
   REFIID iidSink = IID_NULL,  
   IUnknown* punkSink = NULL,  
   BSTR bstrLickey = NULL 
);

Parameters

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

Remarks

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

Example

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

Requirements

Header: atlwin.h

See Also

Reference

CAxWindow2T Class