NetUserGetLocalGroups() fails



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.
.



Relevant Pages

  • NetUserGetLocalGroups() fails
    ... The method NetUserGetLocalGroups() fails in my scenario. ... I have a machine which has a domain user and this user is part of the ...
    (microsoft.public.win32.programmer.networks)
  • Re: Load Balancing
    ... >We have two ADSL services coming into out building. ... So the scenario would like this. ... to jump from one connection to another when one fails, ...
    (freebsd-net)
  • Re: Problem with System.Diagnostics.Process
    ... Well, for one, you have no provided any information about what's "different" between the scenario that works and the one that doesn't. ... If you know it "fails", there must be some observable effect that allows you to know that. ... outputs a converted video so there is definitely nothing wrong with command ...
    (microsoft.public.dotnet.framework)
  • Question abou AIP function: GetDiskFreeSpaceEx(...)
    ... The scenario is simple: ...
    (microsoft.public.win32.programmer.kernel)
  • If possible to add domain user to a workstations local administrators group by scrpting?
    ... I am wondering if possible to add domain user to a workstation's local ... You konw, in most scenario we use.add function to achieve ... but what if a workgroup? ...
    (microsoft.public.scripting.vbscript)