Im binding with the ldap server using ADSOpenObject method, with ADS_SECURE_AUTHENTICATION as binding option, but this binding request is failed with a message of hr = 0x8007200a. Why this request is failing.
int main() {
IADs *pObject;
HRESULT hr;
hr = ADsOpenObject(L"LDAP://WIN-5PF8AFBE77P/DC=msdc,DC=xyz",
L"administrator",
L"password",
ADS_SECURE_AUTHENTICATION,
IID_IADs,
(void**)&pObject);
if(SUCCEEDED(hr))
{
cout<<"Success";
pObject->Release();
}
else
{
cout<<"Unsuccessful";
cout<<hr;
}
}
Kindly, help me to fix this issue.