November 5th, 2009, 12:27 AM
Join Date: Nov 2009
Time spent in forums: 42 m 42 sec
Reputation Power: 0
Scan the network and identify a directory service
Hi LDAP gurus!
We have a requirement to scan the network and identify a directory service.
I'm using the C++ library WinLDAP.h from Microsoft
to search for a directory service....this is the code that initially gets the - 'rootDSE'
CComVariant vartest, var, var1;
hr = ADsGetObject( L"LDAP://rootDSE",IID_IADs,(void**)
&pObject ); if ( !SUCCEEDED(hr) )
hr = pObject-Get(CComBSTR(L"defaultNamingContext"),&var);
if ( !SUCCEEDED(hr) )
I have 3 questions
a) Is this code good enuf to actually ensure that
the network has a directory service?
b) We are querying Active directory, but we should be able to
look for directory services like IBM trivoli, etc too.
c) How do we identify if the directory service found is Ms Active Directory or IBM tivoli etc
Any response would be appreciated.