Describing the ADSI Path

The Lightweight Directory Access Protocol (LDAP) requires that you escape some characters with a backslash () character when you use them in an LDAP Active Directory Service Interfaces (ADSI) path.


The escape character is only required for the ADSIPath property value.

The following example shows how to define the ADSIPath property. Note that the # character in the CN property value of abc# is escaped.

// #include <windows.h> for this code to compile

BSTR strObjPath = 

// Use strObjectPath here.

SysFreeString(strObjPath); // Free memory resources.


For more information about support and installation of this component on a specific operating system, see Operating System Availability of WMI Components.