ADsPaths

Because the number of objects accessible from a directory service may be very large, you need some way to specify particular objects without naming collisions. ADsPaths enable you do just that both for a single provider and across multiple providers.

An ADsPath is a case-sensitive string guaranteed to identify uniquely an ADSI object on any given directory service. Because ADSI objects exist within the context of the namespace of the underlying directory service, part of the syntax of an ADsPath name is provider-specific.

The initial elements of the ADsPath string are the programmatic identifier (progID) of the ADSI provider, followed by "://" followed by whatever syntax is dictated by the provider namespace.

The following are examples of ADsPaths:

LDAP://ldapsvr/O=Internet/DC=COM/DC=MSFT/DC=DEV/CN=TopHat
LDAP://MyDomain.microsoft.com/CN=TopHat,DC=DEV,DC=MSFT,DC=COM,O=Internet
LDAP://c=us/o=msft/cn=MyName
 
WinNT://MyDomain/ComputerName,Computer
WinNT://MyDomain/UserAccount
 
NDS://MarsTree/O=MARS/OU=MARTIANS/CN=MyFavorite
 
NWCOMPAT://NWServer/MyNw3xPrinter
 

Using the LDAP namespace, you can specify the ADsPath either in an X500 DN (distinguished name) form starting with the CN tag or its hierarchical inverse starting with the O tag. Whichever form you use in the initial ADsPath determines its order.

Characters that have special meaning when referring to an ADsPath are listed in the following table.

Special Characters

Name Character Comment
Double quote " Used to quote any part of the ADsPath that may contain a special character so that the string is interpreted literally.

For example, "CN=Name/Prefix"

Backward slash \ Escape character, used to precede special characters to signify they should be used as literals, including the '\' character and ',' (commas).

For example, CN=Name\/Prefix

Forward slash / Component separator.
Right and Left angle bracket <> Delimits an ADsPath within another naming convention.

In order to delimit an ADsPath in a search specification or as part of an URL, use angle brackets. For example, "<WinNT://MyDomain/UserAccount>".

Some ADSI providers may have additional restrictions on the syntax because of their namespace requirements.

In addition to supporting ADsPaths, ADSI also supports COM globally unique identifiers (GUIDs), which provide a well-known way to establish a unique tag by which an object can be distinguished from all other objects ever created. For more information about the GUID structure, see the Microsoft® Platform SDK.