Iterates through all the message queues in the network, examines the path for each queue. : Messaging « Windows « VB.Net Tutorial






Imports System
Imports System.Messaging

Public Class MyNewQueue
   Public Shared Sub Main()
     Dim numberQueues As Int32 = 0
     Dim myQueueEnumerator As MessageQueueEnumerator = MessageQueue.GetMessageQueueEnumerator()

     While myQueueEnumerator.MoveNext()
         Console.WriteLine(myQueueEnumerator.Current.Path)
         numberQueues += 1
     End While
     Console.WriteLine(("Number of public queues: " + numberQueues.ToString()))
   End Sub
End Class








24.30.Messaging
24.30.1.Iterates through all the message queues in the network, examines the path for each queue.
24.30.2.Connect to a message queue and sends a message to the queue.