This topic has not yet been rated - Rate this topic

CComPolyObject::QueryInterface

Retrieves a pointer to the requested interface.

STDMETHOD(QueryInterface)( 
   REFIID iid, 
   void** ppvObject  
); 
template <class Q> 
HRESULT QueryInterface(Q ** pp);
Q

The COM interface.

iid

[in] The identifier of the interface being requested.

ppvObject

[out] A pointer to the interface pointer identified by iid. If the object does not support this interface, ppvObject is set to NULL.

pp

[out] A pointer to the interface identified by __uuidof(Q).

A standard HRESULT value.

For an aggregated object, if the requested interface is IUnknown, QueryInterface returns a pointer to the aggregated object's own IUnknown and increments the reference count. Otherwise, this method queries for the interface through the CComContainedObject data member, m_contained.

Header: atlcom.h

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.