Partager via


Locating Queues Using Function 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 you use API functions to locate public queues, you must specify the queue properties that you want Message Queuing to use to locate the queues, and you must also specify the properties that you want Message Queuing to retrieve when the queues are found.

The calling application must perform the following tasks to locate a queue:

  • Specify which queue properties to use as the search criteria, or restrictions, for locating the queues. The search criteria can be based on any queue property except the path name of the queue.

  • Specify which queue properties to retrieve. You can ask Message Queuing to retrieve any queue property other than DNS path name of the queue (this property cannot be returned because the DNS path name is not stored in the directory service.

  • Start the query by calling MQLocateBegin.

  • Get the results of the query by calling MQLocateNext in a loop.

  • When there are no more queues, call MQLocateEnd to free resources.

For information on See
The structures used to specify the search criteria Specifying Search Criteria
The structures used to specify which properties to retrieve Specifying Queue Properties to Retrieve
Example code for locating queues Locating Queue Examples