[This is preliminary documentation and subject to change.]
The IWbemCallResult::QueryInterface method determines if 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 IWbemCallResult::QueryInterface(
[in] REFIID riid,
[out] LPVOID *ppv
);
Returns standard COM error codes for QueryInterface. It returns S_OK if the call succeeds. If the call fails because the requested interface was not supported, it returns E_NOINTERFACE.
When the application no longer needs the interface retrieved by a call to this method, you must call the Release method for that interface to free it. The QueryInterface method allows the extension of objects without interfering with the existing or future functionality of the objects.
This method is part of the IUnknown interface inherited by the object. For more information about this method, see the COM documentation in the Microsoft Platform SDK.