如果是Managed C++的話,
.NET Framework的System.Security.Principal namespace可以做到.
下面的code是C#的:
private bool IsInRole(string domain, string groupName)
{
WindowsIdentity ident = WindowsIdentity.GetCurrent();
WindowsPrincipal p = new WindowsPrincipal(ident);
return p.IsInRole(string.Format(@"{0}\{1}",domain,groupName));
}
如果不是Managed C++就不曉得了.