Поделиться через


PROPID_Q_ADS_PATH

 

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 3.0.) The PROPID_Q_ADS_PATH property indicates the ADs path to the public queue object stored in Active Directory Domain Services (AD DS).

Property ID

PROPID_Q_ADS_PATH

Type Indicator

VT_LPWSTR

MQPROPVARIANT Field

pwszVal

Property Value

A string containing the ADs path of the queue.

Remarks

The ADs path uniquely identifies the queue object in AD DS and can be used to add the 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 "MyComp\MyQueue".

LDAP://MyLDAPServer/CN=MyQueue,CN=msmq,CN=MyComputer,CN=Computers,DC=MyDomain,DC=MyCompany,DC=COM  

To retrieve the ADs path of a queue, include PROPID_Q_ADS_PATH in the MQQUEUEPROPS structure, and then call MQGetQueueProperties and examine the returned values.

When retrieving the ADs path 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. After you no longer need the string, you must free the memory allocated for it using MQFreeMemory.

Equivalent COM Property

When using COM components, you can retrieve the ADs path of a queue using the MSMQQueueInfo.ADsPath property.

Example Code

The following code fragment shows how PROPID_Q_ADS_PATH is specified in arrays that can be used to initialize an MQQUEUEPROPS structure.

aQueuePropID[i] = PROPID_Q_ADS_PATH;          // Property identifier  
aQueuePropVar[i].vt = VT_NULL;                // Type indicator  
i++;  

See Also

Queue Properties
MQFreeMemory
MQGetQueueProperties
MQQUEUEPROPS
MSMQQueueInfo.ADsPath