Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Purge Method

MessageQueue.Purge Method

Deletes all the messages contained in the queue.

[Visual Basic]
Public Sub Purge()
[C#]
public void Purge();
[C++]
public: void Purge();
[JScript]
public function Purge();

Exceptions

Exception Type Condition
MessageQueueException An error occurred when accessing a Message Queuing API.

Remarks

Purging the queue causes Message Queuing to set the queue modification flag, which affects the LastModifyTime property. Messages that are purged from the queue are lost; they are not sent to the dead-letter queue or the journal queue.

The following table shows whether this method is available in various Workgroup modes.

Workgroup Mode Available
Local computer Yes
Local computer + direct format name Yes
Remote computer No
Remote computer + direct format name Yes

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | Close | Refresh

Show:
© 2015 Microsoft