220.127.116.11 R_PurgeQueue (Opnum 6)
HRESULT R_PurgeQueue( [in] handle_t hBind, [in] QUEUE_CONTEXT_HANDLE_NOSERIALIZE phContext );
phContext: MUST be set by the client to a QUEUE_CONTEXT_HANDLE_NOSERIALIZE (section 18.104.22.168) handle of the queue to be purged. The handle MUST have been returned by the server in the pphQueue output parameter of a prior call to the R_OpenQueue (Opnum 2) (section 22.214.171.124) method with the dwAccess parameter set to RECEIVE_ACCESS and MUST NOT have been closed through a prior call to the R_CloseQueue (Opnum 3) (section 126.96.36.199) method. This value MUST NOT be 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.
No exceptions are thrown except those thrown by the underlying RPC protocol, as specified in [MS-RPCE].
When processing this call, the server MUST:
Find the corresponding OpenQueueDescriptor ADM element instance by comparing the phContext parameter with the Handle ADM attribute for all OpenQueueDescriptor ADM element instances maintained by the local QueueManager ADM element instance.
If not found, return a failure HRESULT, and perform no further actions. Otherwise, assign the found OpenQueueDescriptor ADM element instance to the local variable queueDesc.
If queueDesc.AccessType is QueueAccessType.ReceiveAccess:
Return STATUS_ACCESS_DENIED (0xC0000022).