Locating Queues Using COM Component Calls
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
When using COM components to locate public queues, the calling application must specify the search criteria that Message Queuing will use to locate the queues. These search criteria are limited to the identifier of the queue, its label, the type of service it provides, when the queue was created, the last time the queue's properties were modified, and the multicast address associated with the queue.
The calling application must perform the following tasks to locate a queue:
Specify the search criteria, or restrictions, for locating the queues in the parameters passed in a call to the MSMQQuery.LookupQueue method. The queue properties on which the search criteria are based are specified by setting values for the applicable lookup parameters. For the service type, label, creation time, modification time, and multicast address, your application may also set the corresponding relationship parameter to one of the following comparison operators: equal to (REL_EQ), not equal to (REL_NEQ), less than (REL_LT), greater than (REL_GT), less than or equal to (REL_LE), greater than or equal to (REL_GE), and REL_NOP (REL_NOP indicates that the associated lookup parameter should be ignored). The default value for all the relationship parameters is REL_EQ.
Retrieve the MSMQQueueInfos object returned by the call to MSMQQuery.LookupQueue. The MSMQQueueInfos object defines the query and provides methods that query the directory service and return an MSMQQueueInfo object for each queue found.
Look at the query results by calling MSMQQueueInfos.Reset and MSMQQueueInfos.Next to enumerate through the MSMQQueueInfo objects. Each MSMQQueueInfo object contains the current settings, as registered in the directory service, of all the properties of the queue that are stored in this object.
More Information
For information on | See |
---|---|
What is required to locate queues using function calls | Locating Queues Using Function Calls |
Example code for locating queues | Locating Queue Examples |