# IBindStatusCallback::QueryInterface

An asynchronous moniker calls this method to query the client for additional services necessary to complete the bind operation.

HRESULT QueryInterface(

REFIID riid, | //Interface identifier for the requested service
void **ppvObject | //Pointer to interface returned by the client
); |

Parameters

riid
  [in] Interface identifier for the requested service.
szStatusText
  [out] Indirect pointer to the requested interface returned by the client.

Return Values

S_OK
  The operation was successful. The moniker uses the requested interface to communicate further information about the bind operation.
E_NOINTERFACE
  The client does not support the requested interface. Note that if none of the callback interfaces registered for the bind operation can support the requested interface, the bind operation performs a default action.
E_OUTOFMEMORY
  The operation ran out of memory and did not complete successfully.
E_INVALIDARG
  One or more parameters are not valid.

Remarks

This method provides extensibility to the IBindStatusCallback interface by allowing the moniker to query its client for additional callback interfaces to notify the client or query the client for further information.

The client of an asynchronous moniker can provide additional callback interfaces through the IServiceProvider interface. After the moniker calls IBindStatusCallback::QueryInterface to directly query for an extension interface, the moniker can then query for the IServiceProvider interface and can call IServiceProvider::QueryService to query for the desired extension interface. Because IServiceProvider::QueryService is not restricted by COM identity rules that apply to the IBindStatusCallback::QueryInterface method, the IServiceProvider::QueryService method allows moniker clients to delegate extension services to other objects. Note that if a client is delegating an IServiceProvider::QueryService request to a different callback object, the client should first delegate an interface acquired through the second object’s IBindStatusCallback::QueryInterface before querying the second object for IServiceProvider.

See Also

IBinding