The RemoteQMPurgeQueue method removes all messages from the queue.

Before calling this method, the RemoteQMOpenQueue method MUST be called.

 HRESULT RemoteQMPurgeQueue(
   [in] handle_t hBind,
   [in] DWORD hQueue
 );

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

hQueue: A queue handle value acquired from the phQueue parameter of the qmcomm:R_QMOpenRemoteQueue method as specified in [MS-MQMP] section 3.1.4.2.

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)

Exceptions Thrown: Failure HRESULTs returned by this method MAY<18> be thrown as exceptions as well as those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

When processing this call, the server MUST: