The RemoteQMCloseQueue method closes a PCTX_RRSESSION_HANDLE_TYPE that was previously opened by using a call to the RemoteQMOpenQueue method. The client MUST call this method to reclaim resources on the server allocated by the RemoteQMOpenQueue method.

 HRESULT RemoteQMCloseQueue(
   [in] handle_t hBind,
   [in, out] PCTX_RRSESSION_HANDLE_TYPE* pphContext
 );

hBind: MUST specify an RPC binding handle parameter, as specified in [MS-RPCE] section 2.

pphContext: A PCTX_RRSESSION_HANDLE_TYPE to a remote opened queue.

Return Values: The method MUST return MQ_OK (0x00000000) on success; otherwise, it MUST return a failure HRESULT, and the client MUST treat all failure HRESULTs identically.

MQ_OK (0x00000000)

MQ_ERROR_INVALID_HANDLE (0xC00E0007)

MQ_ERROR_INVALID_PARAMETER (0xC00E0006)

Exceptions Thrown: No exceptions are thrown except those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

When processing this call, the server MUST: