Поделиться через


Obtaining Format Names

 

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

Message Queuing provides several ways to obtain the format names of queues.

When Creating Queues

When creating queues, Message Queuing returns a format name whenever it creates a destination queue.

Applications using COM components can obtain the format name of a destination queue from the MSMQQueueInfo object used to create the queue.

When Locating Public Queues

Applications using API functions can retrieve the path name or queue identifier (GUID) of a public queue and translate these elements into a format name for the queue by using the MQPathNameToFormatName and MQInstanceToFormatName functions, respectively.

Applications using COM components can obtain the format name of a queue from the collection of MSMQQueueInfo objects referenced by the MSMQQueueInfos object returned by a query.

From a Returned Queue Handle

Applications using API functions can translate the queue handle returned by MQOpenQueue to a format name by using the MQHandleToFormatName function.

Applications using COM components can obtain the format name of the queue from the MSMQQueueInfo.FormatName property of the MSMQQueueInfo object used to open the queue.

From an ADs Path

Applications using API functions can translate the ADs path of a queue, queue alias, or distribution list to a format name by using the MQADsPathToFormatName function.

Applications using COM components can obtain the format name of a distribution list, queue alias, or single public queue from the MSMQDestination.FormatName property of an MSMQDestination object initialized by setting its MSMQDestination.ADsPath property.

From Message Properties

Applications can retrieve the format names of response queues, administration queues, and destination queues by retrieving the appropriate property of the message. Message Queuing Glossary

The following message properties hold the format names of queues: