LDAP(Lightweight Directory Access Protocol)를 사용하려면 LDAP ADSI(Active Directory Service Interfaces) 경로에서 사용할 때 백슬래시(\) 문자로 일부 문자를 이스케이프해야 합니다.
,=+<>#;\"
이스케이프 문자는 ADSIPath 속성 값에만 필요합니다.
다음 예제에서는 ADSIPath 속성을 정의하는 방법을 보여줍니다. CN 속성 값의 abc#에서 # 문자는 이스케이프 처리된다는 점에 유의하십시오.
// #include <windows.h> for this code to compile
BSTR strObjPath =
SysAllocString(L"ds_user.ADSIPath=\"LDAP://CN=abc\#,"
L"CN=Users,DC=dsprovider,DC=nttest,"
L"DC=microsoft,DC=com\"");
// Use strObjectPath here.
SysFreeString(strObjPath); // Free memory resources.