How to create IADsUser Object and get the Users details like Email

819 views Asked by At

I'm Using LDAP and ADSI.

IADsContainer* padsCont = NULL;

hr = ADsGetObject(CONVERTCSTR(szAdsServer), IID_IADsContainer,(LPVOID*)&padsCont);
CoUninitialize();


IADs* pADs;
hr = padsCont->QueryInterface(IID_IADs, (void**)&pADs);

//IADs Interface does not have email but IADsUser has email method/Property which I required. If I pass IADsUser pointer to QueryInterface like

IADsUser* pADsUser;
hr = padsCont->QueryInterface(IID_IADsUser, (void**)&pADsUser);

Getting an error E_Interface not Supported. Could any one help on this. Please ask if need anything to understand clearly

Thanks in advance. umar

0

There are 0 answers