Platform SDK: Performance Monitoring
Using PSAPI
The following examples show you how to use the PSAPI functions:
Enumerating all processes
Enumerating all modules for a process
Collecting memory usage information for a process