IRemUnknown::RemQueryInterface

HRESULT IRemUnknown::RemQueryInterface(ipid, cIids, cRefs, iids, ppQIResults)

QueryInterface for and return the result thereof for zero or more interfaces from the interface behind the IPID ipid. ipid must designate an interface derived from IUnknown (recall that all remoted interfaces must derive from IUnknown). The QueryInterface calls on the object that is used to service this request [and] are conducted on this interface instance, not any other IUnknown instance that the object may happen to have. Thus if the client calls IFoo->QueryInterface rather then pIUnknown->QueryInterface, RemQueryInterface will also call QueryInterface on IFoo.

Argument

Type

Description


ipid

IPID

The interface on an object from whom more interfaces are desired.

cRefs

REFCNT

The number of references sought on each of the returned IIDs.

cIids

USHORT

The number of interfaces being requested.

iids

IID*

The list of IIDs that name the interfaces sought on this object.

PpQIResults

REMQIRESULT**

The place at which the array of the results of the various QueryInterface calls are returned.


Return Value

Meaning


S_OK

Success. An attempt was made to retrieve each of the requested interfaces from the indicated object; that is, QueryInterface was actually invoked for each IID.

E_INVALIDARG

One or more arguments (likely ipid) were invalid. No result values are returned.

E_UNEXPECTED

An unspecified error occurred. No result values are returned.


The REMQIRESULT structure contains the following members:

Member

Type

Semantic


hResult

HRESULT

The result code from the QueryInterface call made for the requested IID.

std

STDOBJREF

The data for the returned interface. Note that if hResult indicates failure then the contents of STDOBJREF are undefined.