Поделиться через


CComControl::ControlQueryInterface

Retrieves a pointer to the requested interface.

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

Параметры

  • iid
    [in] The GUID of the interface being requested.

  • ppv
    [out] A pointer to the interface pointer identified by iid, or NULL if the interface is not found.

Заметки

Only handles interfaces in the COM map table.

Пример

// 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 Class

CComControl Members

CComObjectRootEx::InternalQueryInterface