The R_CloseQueue method closes a QUEUE_CONTEXT_HANDLE_SERIALIZE (section 2.2.4.2) handle that was previously opened by using a call to the R_OpenQueue (Opnum 2) (section 3.1.4.2) method or the R_OpenQueueForMove (Opnum 11) (section 3.1.4.11) method.

 HRESULT R_CloseQueue(
   [in] handle_t hBind,
   [in, out] QUEUE_CONTEXT_HANDLE_SERIALIZE* pphContext
 );

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

pphContext: MUST be set by the client to the QUEUE_CONTEXT_HANDLE_SERIALIZE handle to be closed. The handle MUST have been returned by the server in the pphContext parameter of a prior call to the R_OpenQueue method or the R_OpenQueueForMove method and MUST NOT have been closed through a prior call to R_CloseQueue. This value MUST NOT be NULL. If the server returns MQ_OK, it MUST set this value to NULL.

Return Values: On success, this method MUST return MQ_OK (0x00000000).

If an error occurs, the server MUST return a failure HRESULT, and the client MUST treat all failure HRESULTs identically.

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: