Use OpenProcessToken to get the token (obviously), then GetTokenInformation with the TokenOwner
flag to get the SID of the owner. Then you can use LookupAccountSid to get the username.
More Related Contents:
- How can I get a process handle by its name in C++?
- How to detect win32 process creation/termination in c++
- How to query a running process for its parameters list? (Windows, C++)
- Load the same dll multiple times [closed]
- How to effectively kill a process in C++ (Win32)?
- Getting another process command line in Windows
- How to create a process in C++ on Windows?
- How to make thread sleep less than a millisecond on Windows
- How to detect the current screen resolution?
- How to convert char* to wchar_t*?
- Cannot convert parameter from ‘const char[20]’ to ‘LPCWSTR’
- Creating a transparent window in C++ Win32
- WaitForInputIdle doesn’t work for starting mspaint programmatically
- Can I download the Visual C++ Command Line Compiler without Visual Studio?
- How can I change the background color of a button WinAPI C++
- How to get the process name in C++
- Intercept windows open file
- How to get a list of video capture devices (web cameras) on windows? (C++)
- winapi: CreateProcess but hide the process’ window?
- Do pthread mutexes work across threads if in shared memory?
- Why does MAKEINTRESOURCE() work?
- Why there are three unexpected worker threads when a Win32 console application starts up? [duplicate]
- Drawing in a Win32 Console on C++?
- How can I enumerate/list all installed applications in Windows XP?
- How to get hWnd of window opened by ShellExecuteEx.. hProcess?
- How to get the starting/base address of a process in C++?
- DoEvents equivalent for C++?
- Is a memory barrier required to read a value that is atomically modified?
- Win32: Bring a window to top
- Are there any downsides to using UPX to compress a Windows executable?