Hi Kate,
maybe the following example gives you some support:
HRESULT hr;
CoInitialize(NULL);
IADsContainer *pCont=NULL;
hr = ADsGetObject(L"LDAP://DC=windows2000,DC=nttest,DC=microsoft,DC=com",
IID_IADsContainer,
(void**) &pCont );
//////////////////////////////////////////////////////////////////////
// Get the child from the container.
// Note in the LDAP provider you can go down more than one level.
//////////////////////////////////////////////////////////////////////
IDispatch *pDisp = NULL;
IADs *pADs = NULL;
hr = pCont->GetObject(L"user", L"CN=Mike Smith, OU=DSys", &pDisp );
pCont->Release();
hr = pDisp->QueryInterface( IID_IADs, (void**) &pADs );
pDisp->Release();
// Do something with pADs here.
pADs->Release();
CoUninitialize();
This example was taken from Microsoft's MSDN.
Kind regards,
Kridy
_____________
kridy@web.de