i am writing a code to search whether the given .exe file is running under the specific user account or not. Is there any API to get the list of process running under the specific user. or else can we get the user name of the process from the process in C++.
I did some search from the internet and found that "CreateToolhelp32Snapshot" will help. But its returning all the process that runs under all users in the system. I want the process that runs under the specific user to be printed.