How to find the local group membership of a user in Windows

This sample lists the group membership of the user, similar to command "whoami" does. This sample can also list the group membership for the user when machine is not connected, it gets the details from cache.

C++ (42.5 KB)
 
 
 
 
 
5 Star
(1)
1,040 times
Add to favorites
9/22/2016
E-mail Twitter del.icio.us Digg Facebook
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserGroupInfo", "UserGroupInfo\UserGroupInfo.vcxproj", "{F20B7B2B-76D9-48E5-B4B8-64CBDFC68C0C}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Win32 = Debug|Win32
		Release|Win32 = Release|Win32
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{F20B7B2B-76D9-48E5-B4B8-64CBDFC68C0C}.Debug|Win32.ActiveCfg = Debug|Win32
		{F20B7B2B-76D9-48E5-B4B8-64CBDFC68C0C}.Debug|Win32.Build.0 = Debug|Win32
		{F20B7B2B-76D9-48E5-B4B8-64CBDFC68C0C}.Release|Win32.ActiveCfg = Release|Win32
		{F20B7B2B-76D9-48E5-B4B8-64CBDFC68C0C}.Release|Win32.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal