Search code examples
c++windowswinapisid

Get local Windows user name from a SID with C++


If I have a list of Windows account SIDs (strings like "S-1-5-21-16217043-3088031003-1644254475-1001") how can I get the name of Windows user accounts from them (stuff like "John Doe") using C++ and WinAPIs?


Solution

  • See these WINAPI functions: