다음을 통해 공유


PROPID_QM_PATHNAME

 

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.) The PROPID_QM_PATHNAME property provides the path name of the computer.

Property ID

PROPID_QM_PATHNAME

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

String containing the UNC path name of the computer.

Remarks

This property returns the UNC name of the computer (for dependent clients, Message Queuing sets this property to the path name of the client's supporting server).

DNS pathname

To retrieve a DNS name of the computer, retrieve the PROPID_QM_PATHNAME_DNS property.

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

When specifying PROPID_QM_PATHNAME, 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 path name of a computer from its globally unique identifier (GUID) using the MSMQApplication.MachineNameOfMachineId method.

Note

The COM component returns the UNC path name only if it cannot generate the DNS path name of the computer.

Example Code

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

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

See Also

Queue Manager Properties
MQFreeMemory
MQGetMachineProperties
MQQMPROPS
PROPID_QM_PATHNAME_DNS