IWbemClassObject::QueryInterface

[This is preliminary documentation and subject to change.]

The IWbemClassObject::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 IWbemClassObject::QueryInterface(
  [in] REFIID riid,
  [out] LPVOID *ppv 
);
 

Parameters

riid
The COM interface identifier of the requested interface.
obp
Address of a pointer that is filled with the interface pointer if the query succeeds.

Return Values

Returns standard COM error codes for QueryInterface. It returns S_OK if the call succeeds. This call will fail if the requested interface was not supported and the method returns E_NOINTERFACE.

Remarks

When the application no longer needs the interface retrieved by a call to this method, it must call the Release method for that interface to free it. The QueryInterface method allows the extension of objects without interfering with existing or future functionality of the objects.

The QueryInterface 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.

See Also

Using the IUnknown Interface