次の方法で共有


PROPID_QM_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_QM_PATHNAME_DNS property provides the DNS path name of the computer.

Property ID

PROPID_QM_PATHNAME_DNS

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

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

Remarks

This property returns the DNS name for the computer. The DNS path name is generated on demand, it is not the computer path name stored in the directory service.

To retrieve the UNC name of the computer, retrieve the PROPID_QM_PATHNAME of the computer.

To retrieve the DNS path name of a computer, include PROPID_QM_PATHNAME_DNS in the MQQMPROPS structure, and then call MQGetMachineProperties and examine the returned property value.

When specifying PROPID_QM_PATHNAME_DNS, set the type identifier field to VT_NULL. Message Queuing automatically allocates memory for the wide-character string retrieved during the function call. After you no longer need the string, you must free the memory allocated for it using MQFreeMemory.

Equivalent COM Property

With COM components, you can retrieve the DNS path name of a computer from its globally unique identifier (GUID) using the MSMQApplication.MachineNameOfMachineId method.

Example Code

The following code fragment shows how PROPID_QM_PATHNAME_DNS is specified in the MQQMPROPS structure.

aQMPropId[i] = PROPID_QM_PATHNAME_DNS;  // Property identifier  
aQMPropVar[i].vt = VT_NULL;             // Type indicator  

See Also

Queue Manager Properties
MQFreeMemory
MQGetMachineProperties
MQQMPROPS
PROPID_QM_PATHNAME