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 ADsPath property of the MSMQQueueInfo object provides the Active Directory Domain Services (AD DS) path to the public queue object stored in AD DS.
Property ADsPath As String
A String that contains the ADs path to the queue object in AD DS.
The ADs path uniquely identifies the queue object in AD DS and can be used to add the public queue to a distribution list. Queues are added programmatically to distribution lists using the IADsGroup interface provided by ADSI.
The following example shows a possible ADs path of the public queue "MyComputer\MyQueue".
To retrieve the ADs path of a queue, your application must first obtain an MSMQQueueInfo object that represents the queue. This object can be returned by a query using the MSMQQuery.LookupQueue method or created by the sending or receiving application.
Before using an application-created MSMQQueueInfo object, the application must initialize it to reference the queue by setting its MSMQQueueInfo.PathName or MSMQQueueInfo.FormatName property. Setting the FormatName property with a cached public format name instead of the PathName property frees Message Queuing from the need to retrieve information stored in the directory service to generate this format name.
In C++ COM applications, you must use a smart pointer to the IMSMQQueueInfo3 interface to expose the ADsPath property.
Equivalent API Function Property
With function calls, the equivalent property is PROPID_Q_ADS_PATH.
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.