IUnknown::QueryInterface

[This is preliminary documentation and subject to change.]

Returns a pointer to a specified interface on a component to which a client currently holds an interface pointer. This method must call IUnknown::AddRef on the pointer it returns.

This method is fully documented in the COM documentation in the Microsoft® Platform SDK and is only partially documented here for quick reference.

HRESULT QueryInterface(
  REFIID iid, 
  void **ppvObject
);
 

Parameters

iid
[in] Specifies the IID of the interface being requested.
ppvObject
[out] Receives a pointer to an interface pointer to the object on return. If the interface specified in iid is not supported by the object, ppvObject is set to NULL.

Return Values

S_OK
The interface is supported.
S_FALSE
Interface is not supported.