Download source code and setup cab

Using ToolHelp32 APIs for Windows Mobile we can enumerate processes, modules, heaps, etc… First we have to call CreateToolhelp32Snapshot API. This creates a snapshot of the current state of the system and returns a handle. We can use this handle to enumerate processes, modules, heaps, threads, etc…

The TaskManager application is written using ToolHelp32 APIs. This is a normal MFC dialog application. The running processes are listed in a ListView. Double clicking on an entry will open another dialog and display the modules loaded by the particular process.

A special thanks to Brian P. Adams for his article on how to calculate the memory used by a process.