Home > OS >  Is there any Win32 API to get the total number of running processes on Windows 10?
Is there any Win32 API to get the total number of running processes on Windows 10?

Time:07-16

Right now, I use CreateToolhelp32Snapshot() to calculate the number of running processes by traversing a snapshot of all processes. Is there any API to get the number directly, instead of traversing?

CodePudding user response:

EnumProcesses and divide by 4. Internally this calls the NT API and traverses last time I looked but that was a long time ago...

CodePudding user response:

As far as I'm concerned, there is no proper API to get the numbers directly, instead of traversing.

For more details to get the list of running processes, I suggest you could refer to the example:

Taking a Snapshot and Viewing Processes

  • Related