MSMQQueueInfos
Methods

The MSMQQueueInfos object allows you to select a specific public queue from a collection of queues returned by calling the LookupQueue method of MSMQQuery.

The information in the collection of queues is dynamic, with other clients looking at the queues (PEEK access) or deleting them from the collection at any time. As a result, there is no queue count available for moving through the collection. In place of a queue count, MSMQQueueInfos provides an end-of-list (EOL) mechanism to indicate when you have completely moved through the collection.

The following example shows how the EOL mechanism is used in a standard Microsoft® Visual Basic® type While loop.

'Display the format name of all MAPI input queues.
Dim queryMyQuery as new MSMQQuery
Dim qinfoCurrent as MSMQQueueInfo
'Get some interesting queues.
Dim qs as MSMQQueueInfos
Set qs = queryMyQuery.LookupQueue (
    ServiceTypeGuid := "{5EADC0D0-7182-11CF-A8FF-0020AFB8FB50}")
qs.Reset
Set qinfoCurrent = qs.Next
While not qinfoCurrent is Nothing
      msgbox qinfoCurrent.FormatName
      Set qinfoCurrent = qs.Next
Wend
 

© 1997 by Microsoft Corporation. All rights reserved.