c++ Can't resolve call to AdsOpenObject
Posted on 2015-01-12
I am including for following in a C++ project
and I've added reference to ActiveDs.lib
but I can't resolve a call to ADsOpenObject
// Initialize COM.
HRESULT hr = S_OK;
// Get rootDSE and the current user domain container distinguished name.
IADs *pObject = NULL;
IDirectorySearch *pContainerToSearch = NULL;
LPOLESTR szPath = new OLECHAR[MAX_PATH];
hr = ADsOpenObject(L"LDAP://rootDSE",
ADS_SECURE_AUTHENTICATION, // Use Secure Authentication.
I am not very familier with COM objects