S
Saju Devasia
Hi,
I am facing a strange problem here. I am trying to read the MaxPasswordAge
property of the domain.
When I installed AD on my system - system name was abc - it suggested me a
new name abc0 and I accepted it. In my Windows explorer, Network Places
shows the name abc0 and as node abc under that. But in computer
Identification tab of system, it shows abc.com as domain.
My problem is, when I try to get the domain property MaxPasswordAge (or any
other one) it requires me to give abc0. If I give abc, ADsOpenObject fails.
Below is the code fragment that fails
wcscpy(pszWinNTPath, L"WinNT://");
wcscat(pszWinNTPath, pWHost);
// bind to the domain object
hr = ADsOpenObject(pszWinNTPath, g_wstrUserName, g_wstrPass, 1,
IID_IADsDomain, (void**)&pDomain);
if(FAILED(hr))
{
LPTSTR err = GetErrorMessage(hr);
setErrorStringToJava(env, obj, err);
delete[] err;
printf("\npDomain ERROR....");
goto cleanup;
}
even though I give the IP number of the system, it fails to open.
Can anyone give an explanation and solution for this.
Thanks in advance.
Saju
I am facing a strange problem here. I am trying to read the MaxPasswordAge
property of the domain.
When I installed AD on my system - system name was abc - it suggested me a
new name abc0 and I accepted it. In my Windows explorer, Network Places
shows the name abc0 and as node abc under that. But in computer
Identification tab of system, it shows abc.com as domain.
My problem is, when I try to get the domain property MaxPasswordAge (or any
other one) it requires me to give abc0. If I give abc, ADsOpenObject fails.
Below is the code fragment that fails
wcscpy(pszWinNTPath, L"WinNT://");
wcscat(pszWinNTPath, pWHost);
// bind to the domain object
hr = ADsOpenObject(pszWinNTPath, g_wstrUserName, g_wstrPass, 1,
IID_IADsDomain, (void**)&pDomain);
if(FAILED(hr))
{
LPTSTR err = GetErrorMessage(hr);
setErrorStringToJava(env, obj, err);
delete[] err;
printf("\npDomain ERROR....");
goto cleanup;
}
even though I give the IP number of the system, it fails to open.
Can anyone give an explanation and solution for this.
Thanks in advance.
Saju