Updated: July 19, 2016

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

(Read-only, introduced in MSMQ 2.0.) The PROPID_Q_PATHNAME_DNS property indicates the path name of the queue using the DNS name of the computer. Message Queuing generates the DNS path name whenever this property is specified.

Property ID


Type Indicator




A string containing the DNS path name of the queue. A returned value of VT_EMPTY indicates that a DNS name of the queue is not available.

This property can only be used to 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 DNS path name of a queue, specify PROPID_Q_PATHNAME_DNS in the MQQUEUEPROPS structure, and then call MQGetQueueProperties and examine its returned value.

When retrieving the DNS path name of a queue, the type indicator must be set to VT_NULL. Message Queuing automatically allocates memory for the wide-character string retrieved during the function call. In that case, after you no longer need the string, you must free the memory allocated for it using MQFreeMemory.

Equivalent COM Property

When using COM components, the DNS path name of the queue can be retrieved using the MSMQQueueInfo.PathNameDNS property.

The following code fragment shows how PROPID_Q_PATHNAME_DNS is specified in arrays that can be used to initialize an MQQUEUEPROPS structure.

aQueuePropID[i] = PROPID_Q_PATHNAME_DNS;        // Property identifier  
aQueuePropVar[i].vt = VT_NULL;                  // Type indicator  

The following example is included in Using Message Queuing.

For an example ofSee
Retrieving the DNS path name of an existing queueC/C++ Code Example: Retrieving PROPID_Q_PATHNAME_DNS

Queue Properties