Archived from groups: microsoft.public.adsi.general,microsoft.public.active.directory.interfaces,microsoft.public.win2000.active_directory (More info?)
Hi there,
Could anyone help me with this?
I'm performing the following steps in C++..
1) Bind to a gc using AdsGetObject
2) QI for the IDirectorySearch interface
3) Call ExecuteSearch, looking for a user with search criteria
"displayName=whatever"
4) Call GetFirstRow and check for S_ADS_NOMORE_ROWS error.
If I call the code above with a nicely prived user, then it works just fine
and I get my user back. But, if I call this using a user that does not have
enough permissions, then the searhc returns no results (S_ADS_NOMORE_ROWS
returned from GetFirstRow). I thought the ExecuteSearch would at least
fail.
I tried calling AdsGetLastError to see if that would give any clues, but no
error is returned.
So my question is, how do I tell when the search failed or is worked but
there were no results?
Any ideas?
Thanks,
Huw
Hi there,
Could anyone help me with this?
I'm performing the following steps in C++..
1) Bind to a gc using AdsGetObject
2) QI for the IDirectorySearch interface
3) Call ExecuteSearch, looking for a user with search criteria
"displayName=whatever"
4) Call GetFirstRow and check for S_ADS_NOMORE_ROWS error.
If I call the code above with a nicely prived user, then it works just fine
and I get my user back. But, if I call this using a user that does not have
enough permissions, then the searhc returns no results (S_ADS_NOMORE_ROWS
returned from GetFirstRow). I thought the ExecuteSearch would at least
fail.
I tried calling AdsGetLastError to see if that would give any clues, but no
error is returned.
So my question is, how do I tell when the search failed or is worked but
there were no results?
Any ideas?
Thanks,
Huw