I am looking for an easy way to get the SID for the current Windows user account. I know I can do it through WMI, but I don\'t want to go that route.
Apologies to ev
ATL::CAccessToken accessToken; ATL::CSid currentUserSid; if (accessToken.GetProcessToken(TOKEN_READ | TOKEN_QUERY) && accessToken.GetUser(¤tUserSid)) return currentUserSid.Sid();