Deleting a Queue (COM)
A version of this page is also available for
4/8/2010
Both public and local private queues can be deleted by a single call to MSMQQueueInfo.Delete.
Note
Deleting the queue does not delete the MSMQQueueInfo object, only the existing reference to the queue in the directory service (for public queues) or the local computer (for private queues). Because the MSMQQueueInfo object still exists, you can still create a new queue based on its current properties.
To delete a queue
Declare the objects needed to obtain the MSMQQueueInfo object.
Obtain the MSMQQueueInfo object of the queues you want to delete.
Call MSMQQueueInfo.Delete to delete the queue.
See Also
Concepts
MSMQ COM Support
Using the COM Components
MSMQ Security