Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This method returns a pointer to a specified interface on an object to which a client currently holds an interface pointer. This method must call IUnknown::AddRefon the pointer it returns.
HRESULT QueryInterface( REFIID iid , void ** ppvObject );
Parameters
Return Value
S_OK indicates that the interface is supported. E_NOINTERFACE indicates that the interface is not supported.
Remarks
The QueryInterfacemethod gives a client access to other interfaces on an object.
For any one object, a specific query for the IUnknowninterface on any of the object's interfaces must always return the same pointer value. This allows a client to determine whether two pointers point to the same component by calling QueryInterfaceon both and comparing the results. It is specifically not the case that queries for interfaces (even the same interface through the same pointer) must return the same pointer value.
There are four Requirements for implementations of QueryInterface(In these cases, "must succeed" means "must succeed barring catastrophic failure."):
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Unknwn.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also