NetUserGetLocalGroups() fails
- From: smawsk <sk.smawsk@xxxxxxxxx>
- Date: Wed, 5 Mar 2008 05:20:30 -0800 (PST)
Hi,
Could some one provide any suggestion on this?
The method NetUserGetLocalGroups() fails in my scenario.
Consider the below scenario:
I have a machine which has a domain user and this user is part of the
local "administrators" group
if that particular machine.
The following command confirms this:
net localgroup administrators
Now I log in on the machine with the domain user account
Pull the machine out of the network
Run an exe which calls the method NetUserGetLocalGroups() with the
following parameters.
1) NULL for servername
2) username as domain\username
3) with flag LG_INCLUDE_INDIRECT
The method fails. I did a GetLastError() which returned error code
997.
Now I did not set the flag LG_INCLUDE_INDIRECT (Passed in 0 in place
of LG_INCLUDE_INDIRECT ) in the call to NetUserGetLocalGroups().
The function works properly.
Has some one came across this scenario?
What could be reason for the successful working of the function after
removing the flag?
Appreciate any suggestion on this.
Thanks in advance.
Warm Regards.
.
- Prev by Date: How do you change ip address?
- Next by Date: NetUserGetLocalGroups() fails
- Previous by thread: How do you change ip address?
- Next by thread: NetUserGetLocalGroups() fails
- Index(es):
Relevant Pages
|