c++visual-c++sid

Get SID of current user as std::string. c++


Get SID of current user as string. c++

I've been thinking how to get sid in c# it's easy like this: System.Security.Principal.WindowsIdentity.GetCurrent().User.Value;

If someone can give me short solution to get SID as std::string i will be happy.


Solution

  • See these WINAPI functions: