Udostępnij za pośrednictwem


CComControlBase::ControlQueryInterface

Retrieves a pointer to the requested interface.

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

Parameters

  • iid
    The GUID of the interface being requested.

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

Remarks

Only handles interfaces in the COM map table.

Example

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

Requirements

Header: atlctl.h

See Also

Reference

CComControlBase Class

CComObjectRootEx::InternalQueryInterface

Other Resources

CComControlBase Members