locked
ADAM error RRS feed

  • Question

  •  
    I have a problem. One part of my application is DLL which is loaded from Winlogon. From this DLL I call ADsOpenObject function. When my application is separated from ADAM instace (they are on different computers) works fine without any user and password:

    hr = ADsOpenObject(    wszAdsPath,NULL,NULL, ADS_SECURE_AUTHENTICATION,IID_IADsContainer,
                (void**)&pContainer);


    Giving NULL,NULL, that means we use thread permissions(accout permission).
    When they are on the same machine: this call returns 0x80072030
    (LDAP_NO_SUCH_OBJECT Object does not exist.). But same thread can get IDD_IADs interface. Olso I changed that call to following:

     

    hr = ADsOpenObject(    wszAdsPath,L"DomainAdmin",L"Password", ADS_SECURE_AUTHENTICATION,IID_IADsContainer,
                (void**)&pContainer);


    and it returns S_OK. So I think the problem in permissions. May be Winlogon runs in account like Network Service, so in second case it cannot open object, in first case can. Can you help me?
    • Moved by Yan-Fei Wei Tuesday, August 19, 2008 6:39 AM Not Visual C++ issue (Moved from Visual C++ General to Off-Topic Posts (Do Not Post Here))
    Wednesday, August 13, 2008 10:53 AM

Answers

All replies