Deleting all Messages from a Queue
Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista
Message Queuing 3.0 introduces the MQPurgeQueue API function and the equivalent MSMQQueue.Purge COM method for programmatically deleting all messages in a queue.