I want to create a tool like mini task manager. I want to show all the running processes, cpu and memory usage. Can anybody tell me related api's which I can use for this. Any link to related web page will be appreciated. (I want dump of all the statistics of running processes, cpu and memory.) Thanks in advance.
Asked
Active
Viewed 1.2k times
7
-
1http://stackoverflow.com/questions/1202003/how-do-i-see-if-another-process-is-running-on-windows – karlphillip Jan 04 '11 at 12:26
-
http://stackoverflow.com/questions/2281205/get-the-process-handle-of-a-process-by-image-name – karlphillip Jan 04 '11 at 12:27
-
1http://stackoverflow.com/questions/865152/how-can-i-get-a-process-handle-by-its-name-in-c – karlphillip Jan 04 '11 at 12:28
-
1Possible duplicate: http://stackoverflow.com/questions/3112389/how-do-task-manager-read-the-processes – karlphillip Jan 04 '11 at 12:29
-
@karlphillip : Thanks for all the links. – user562495 Jan 04 '11 at 18:01
2 Answers
4
To do that, you will need to use the tool help functions to get snapshots of the system.
Here is a code example.

Jon
- 428,835
- 81
- 738
- 806
2
You can use EnumProcess
and openProcess
to do this.
Here is a complete sample code for this: http://msdn.microsoft.com/en-us/library/ms682623%28v=vs.85%29.aspx

Vikram.exe
- 4,565
- 3
- 29
- 40