next up previous contents index
Next: 4.7.2 addref: Increment an Up: 4.7 oskit_iunknown: base interface Previous: 4.7 oskit_iunknown: base interface

4.7.1 query: Query for a different interface to the same object

 

SYNOPSIS

#include <oskit/com.h>

OSKIT_COMDECL query(oskit_iunknown_t *obj, const oskit_iid_t *iid, [out] void **ihandle);

DESCRIPTION

Given a reference to any of an object's COM interfaces, this method allows the client to obtain a reference to any of the other interfaces the object exports by querying for a specific interface identifier (IID).

PARAMETERS

obj
The object being queried.
iid
The interface identifier of the requested interface.
ihandle
On success, the requested interface pointer is returned in this parameter. The client must release the returned reference when it is no longer needed.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error. Usually the only error code this method returns is OSKIT_E_NOINTERFACE, indicating that the object does not support the requested interface.



University of Utah Flux Research Group