Determines whether the object supports a particular COM interface. If it does, the system increases the object's reference count, and the application can use that interface immediately.
HRESULT QueryInterface( REFIID riid, LPVOID * ppvObj );
If the method succeeds, the return value is S_OK.
If the method fails, the return value may be E_NOINTERFACE. Some components also have their own definitions of these error values in their header files.
If the application does not need to use the interface retrieved by a call to this method, it must call the IUnknown::Release method for that interface to free it. The IUnknown::QueryInterface method makes it possible to extend objects without interfering with functionality.
Header: Declared in Unknwn.h.