共用方式為


MSMQApplication.DirectoryServiceServer

 

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

(Introduced in MSMQ 3.0.) The DirectoryServiceServer property of the MSMQApplication object returns the name of the current directory service server.

Data type: Variant (String)
Run-time access: Read-only
Property DirectoryServiceServer As Variant  

Property Value

A Variant containing a String that specifies the name of the directory service server. If the local queue manager is offline or the computer is operating in workgroup mode, a NULL string is returned.

Error Codes

For information on return codes, see Message Queuing Error and Information Codes.

Remarks

Including the MSMQApplication object in the code syntax is optional because this object is defined as the application object, whose methods and properties are globally available.

This property (by default) applies to the local computer. To obtain the name of the directory service server of a remote computer, set MSMQApplication.Machine to the name of the remote computer and then look at this property.

In C++ COM applications, you must use a smart pointer to the IMSMQApplication3 interface to expose the DirectoryServiceServer property.

Equivalent API Function Property

When using API functions, the equivalent property is PROPID_MGMT_MSMQ_DSSERVER.  

Requirements

Windows NT/2000/XP: Included in Windows XP and Windows Server 2003.

Windows 95/98/Me: Unsupported.

Header: Declared in Mqoai.h.

Library: Use Mqoa.lib.

See Also

MSMQApplication
MSMQApplication.Machine