3.2.4.13 Closing a Queue

The message queuing application MUST specify the QUEUE_CONTEXT_HANDLE_NOSERIALIZE (section 2.2.4.1) handle that is to be closed, that has been returned by the server in the pphQueue output parameter of a prior call to the R_OpenQueue (Opnum 2) (section 3.1.4.2) method, and that MUST NOT have been previously closed through a call to the R_CloseQueue (Opnum 3) (section 3.1.4.3) method. This value MUST NOT be NULL. If there are any pending requests associated with the QUEUE_CONTEXT_HANDLE_SERIALIZE handle, the client SHOULD cancel them as specified in section 3.2.4.11. If any open cursor handles are associated with the QUEUE_CONTEXT_HANDLE_SERIALIZE handle, the client SHOULD close them as specified in section 3.2.4.12. The client MUST call the R_CloseQueue method with the pphContext parameter set to the QUEUE_CONTEXT_HANDLE_SERIALIZE handle. The client MUST remove the QUEUE_CONTEXT_HANDLE_SERIALIZE handle from its state.<37>