I am developing a simple process statistics collection library for Windows. I enumerate processes using the EnumProcesses()
function, and I try to open them by calling OpenProcess()
with the PROCESS_QUERY_INFORMATION flag. However, the latter fails for a bunch of system processes. At the same time, I see that similar applications (sysinternals tools, task manager, etc.) seem to be able to receive information about these processes without even requiring administrator privileges. I tried to enable the SeDebugPrivilege privilege, but that only helped when I ran my program as an administrator. And yet I could not open the Idle process, the system process and the audiodg process (I would like to get their information for consistency as well).
So, the question is, how can I get information about all processes (I see third-party applications doing it, but I donβt see how)? Is it possible to do this without administrator rights?
source share