Редактиране

Споделяне чрез


IAxWinHostWindowLic Interface

This interface provides methods for manipulating a licensed control and its host object.

Syntax

interface IAxWinHostWindowLic : IAxWinHostWindow

Members

Methods

Name Description
CreateControlLic Creates a licensed control and attaches it to the host object.
CreateControlLicEx Creates a licensed control, attaches it to the host object, and optionally sets up an event handler.

Remarks

IAxWinHostWindowLic inherits from IAxWinHostWindow and adds methods that support the creation of licensed controls.

See Hosting ActiveX Controls Using ATL AXHost for a sample that uses the members of this interface.

Requirements

The definition of this interface is available as IDL or C++, as shown below.

Definition type File
IDL ATLIFace.idl
C++ ATLIFace.h (also included in ATLBase.h)

IAxWinHostWindowLic::CreateControlLic

Creates a licensed control, initializes it, and hosts it in the window identified by hWnd.

STDMETHOD(CreateControlLic)(
    LPCOLESTR lpTricsData,
    HWND hWnd,
    IStream* pStream,
    BSTR bstrLic);

Parameters

bstrLic
[in] The BSTR that contains the license key for the control.

Remarks

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

Calling this method is equivalent to calling IAxWinHostWindowLic::CreateControlLicEx

Example

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

IAxWinHostWindowLic::CreateControlLicEx

Creates a licensed ActiveX control, initializes it, and hosts it in the specified window, similar to IAxWinHostWindow::CreateControl.

STDMETHOD(CreateControlLicEx)(
    LPCOLESTR lpszTricsData,
    HWND hWnd,
    IStream* pStream,
    IUnknown** ppUnk,
    REFIID riidAdvise,
    IUnknown* punkAdvise,
    BSTR bstrLic);

Parameters

bstrLic
[in] The BSTR that contains the license key for the control.

Remarks

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

Example

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