Click to See Complete Forum and Search --> : Help me: Need to get User Groups for user on Windows


ucky23
December 1st, 2006, 12:23 PM
I have a list of users and I want to find out what user beongs to which User Group on Windows.
I know there is a way one can get that information programatically using SID
Can anyone point me to it or help me out.

I do not want managed C++ but I want to use this in a win32 console app.

Thanks

golanshahar
December 1st, 2006, 04:00 PM
Look at ::NetUserGetLocalGroups() (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netusergetlocalgroups.asp).

Cheers