ID: Q186191
The information in this article applies to:
This article summarizes the return codes a Microsoft Message Queue Server (MSMQ) C API application sees that is operating on an open queue handle when the underlying queue instance is deleted from the Directory Service (DS).
In particular, MQSendMessage returns MQ_OK even if you delete the queue after opening it for Send in your C application. This behavior is by design as described below.
One way to simulate this scenario is to delete the queue in the Explorer after opening it in the application code.
If you delete the queue in Explorer after opening it in the application code, the MSMQ Send and Receive API returns the following codes:
NOTE: The sending computer opens the queue only once and does not query for the queue's existence again. So, the sending computer does not query if the queue is deleted after it opened it successfully. The destination queue can be located on a remote disconnected site. The same behavior occurs for queues located on the sending computer to keep the programming model coherent.
MSMQ SDK Online Help: search on: "Negative Arrival Acknowledgment Classes"; topic: ""MQMSG_CLASS_NACK_BAD_DST_Q"
For more information on setting up Acknowledgment messages, please see the MSMQ SDK help file.
Additional query words: kbDSupport kbdse kbnokeyword
Version : WINNT:1.0
Platform : winnt
Issue type : kbinfo
Last Reviewed: August 18, 1998