Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to best determine NT Group membership
Message
From
16/08/1999 11:06:52
 
 
To
16/08/1999 10:43:45
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00254042
Message ID:
00254052
Views:
23
>Hello,
>
>I'm trying to determine a user's NT Group membership(s). I'm thinking that there should be some sort of ready-made DLL or something that I can instantiate and call. Anyone know where this information might be found?
>
>I do not want to SET an environment variable with a script as this will require maintenance & management time. Rather, I'd like to simply call the NT built-in API if any.
>

If you're running under NT, NetUserGetGroups() and NetUserGetLocalGroups() seem ready-made for the task - it'll retreive the global and local Group memberships of a user respectively. You can also approach things from the other side, with NetGroupGetUsers() and NetLocalGroupGetMembers(), but again, they're implemented under NT and not under Win9x.

Paul-Vlad Tatavu sells an ActiveX control that might be helpful here; you also might want to investigate using the ADSI automation objects (Rick Strahl has sample code on his Web site showing how VFP can access some part of the ADSI functionality.)
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform