Share via


Deleting a Queue (COM)

A version of this page is also available for

Windows Embedded CE 6.0 R3

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

  1. Declare the objects needed to obtain the MSMQQueueInfo object.

  2. Obtain the MSMQQueueInfo object of the queues you want to delete.

  3. Call MSMQQueueInfo.Delete to delete the queue.

See Also

Concepts

MSMQ COM Support
Using the COM Components
MSMQ Security

Other Resources

Message Queuing