CComPolyObject::QueryInterface
Visual Studio 2012
Retrieves a pointer to the requested interface.
STDMETHOD(QueryInterface)( REFIID iid, void** ppvObject ); template <class Q> HRESULT QueryInterface(Q ** pp);
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.