Compartir a través de


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
);

Parameters

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

Remarks

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

Example

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

Requirements

Header: atlwin.h

See Also

Concepts

CAxWindow2T Class

CAxWindow2T Members