IAxWinHostWindowLic 接口

此接口提供用于操作许可控件及其主机对象的方法。

语法

interface IAxWinHostWindowLic : IAxWinHostWindow

成员

方法

名称 描述
CreateControlLic 创建许可控件并将其附加到宿主对象。
CreateControlLicEx 创建许可控件,将其附加到主机对象,并选择性地设置事件处理程序。

备注

IAxWinHostWindowLic 继承自 IAxWinHostWindow 并添加了支持创建许可控件的方法。

有关使用此接口成员的示例,请参阅使用 ATL AXHost 托管 ActiveX 控件

要求

此接口的定义可用作 IDL 或 C++,如下所示。

定义类型 文件
IDL ATLIFace.idl
C++ ATLIFace.h(也包含在 ATLBase.h 中)

IAxWinHostWindowLic::CreateControlLic

创建一个许可控件,初始化它,并将其托管在由 hWnd 标识的窗口中。

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

参数

bstrLic
[in] 包含控件许可证密钥的 BSTR。

注解

有关剩余参数和返回值的说明,请参阅 IAxWinHostWindow::CreateControl

调用此方法等效于调用 IAxWinHostWindowLic::CreateControlLicEx

示例

有关使用 IAxWinHostWindowLic::CreateControlLic 的示例,请参阅使用 ATL AXHost 托管 ActiveX 控件

IAxWinHostWindowLic::CreateControlLicEx

创建许可 ActiveX 控件,初始化它,并将其托管在指定窗口中,类似于 IAxWinHostWindow::CreateControl

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

参数

bstrLic
[in] 包含控件许可证密钥的 BSTR。

备注

有关剩余参数和返回值的说明,请参阅 IAxWinHostWindow::CreateControlEx

示例

有关使用 IAxWinHostWindowLic::CreateControlLicEx 的示例,请参阅使用 ATL AXHost 托管 ActiveX 控件