(Introduced in MSMQ 2.0.) The PathNameDNS property indicates the DNS path name of the queue. Message Queuing generates the DNS path name whenever this property is specified.
Property PathNameDNS As String
A String containing the DNS path name of the queue.
The PathNameDNS property can be used to only retrieve the DNS path name of the queue. It cannot be used to specify the path name of a queue when creating the queue, or when retrieving queue properties within a query.
To retrieve the PathNameDNS property of a queue, your application must first obtain an MSMQQueueInfo object that represents the queue. This object can be returned by a query using the MSMQQuery.LookupQueue method or created by the sending or receiving application.
Before using an application-created MSMQQueueInfo object, the application must initialize it to reference the queue by setting its MSMQQueueInfo.PathName or MSMQQueueInfo.FormatName property. For public queues, setting the FormatName property with a cached public format name instead of the PathName property frees Message Queuing from the need to retrieve information stored in the directory service to generate this format name. Direct format names can be used only for local private queues.
In C++ COM applications, you must use a smart pointer to the IMSMQQueueInfo2 or IMSMQQueueInfo3 interface to expose the PathNameDNS property.
Equivalent API Function Property
With function calls, the equivalent property is PROPID_Q_PATHNAME_DNS.
The following example is included in Using Message Queuing.
|For an example of||See|
Retrieving the DNS path name of an existing queue
Windows NT/2000/XP: Included in Windows 2000 and later.
Windows 95/98/Me: Unsupported.
Header: Declared in Mqoai.h.
Library: Use Mqoa.lib.