Share via


PROPID_Q_PATHNAME_DNS

 

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

PROPID_Q_PATHNAME_DNS

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

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.

Remarks

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.

Example Code

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  
i++;  

The following example is included in Using Message Queuing.

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

See Also

Queue Properties
MQFreeMemory
MQGetQueueProperties
MQQUEUEPROPS