3.2.4.9 Closing a Queue
To close a queue, the following inputs are expected:
QueueHandle: Handle of the queue to be closed.
RequestId: The requestId that uniquely identifies the pending remote read operation.
The client MUST perform the following actions to process this event:
Find the RemoteOpenQueueEntry, referred to as rRemoteOpenQueueEntry, in the rRemoteOpenQueueEntryCollection, where rRemoteOpenQueueEntry.OpenQueueDescriptorHandle = QueueHandle.
The client MAY explicitly cancel all pending peek or receive operations on the queue by finding all PendingRemoteReadEntry elements from rPendingRemoteReadEntryCollection, where PendingRemoteReadEntry.OpenQueueDescriptorHandle = QueueHandle, and for each such element, raise the Canceling a Pending Peek or Receive (section 3.2.4.7) event with the following:
QueueHandle set to PendingRemoteReadEntry.OpenQueueDescriptorHandle.
RequestId set to PendingRemoteReadEntry.RequestId.
Call the RemoteQMCloseQueue (section 3.1.4.4) method with the following:
pphContext set to rRemoteOpenQueueEntry.RRSessionHandle.
Remove the rRemoteOpenQueueEntry element from rPendingRemoteReadEntryCollection.