CComControl::ControlQueryInterface

检索指向请求的接口。

virtual HRESULT ControlQueryInterface(
   const IID& iid,
   void** ppv 
);

参数

  • iid
    [in]请求的接口的GUID。

  • ppv
    [out]一个指向 iid确定的接口指针的指针或 NULL,如果未找到接口。

备注

仅处理接口在COM映射表中。

示例

// Retrieve the control's IOleObject interface. Note interface 
// is automatically released when pOleObject goes out of scope

CComPtr<IOleObject> pOleObject;
ControlQueryInterface(IID_IOleObject, (void**)&pOleObject);

要求

Header: atlctl.h

请参见

参考

CComControl选件类

CComObjectRootEx::InternalQueryInterface