Never let your sense of morals get in the way of doing what’s right.
This is my shiny thing. And if you try and take it off me I may have to eat you.
|--Cat, Red Dwarf|
The Windows Process Status API (PSAPI) provides several methods for accessing system state information. For processes, the simplest and most common method is via the
EnumProcesses() function, defined as follows:
BOOL EnumProcesses( DWORD* pProcessIds , DWORD cb , DWORD* pBytesReturned);
pProcessIds points to an array into which the process identifiers of process objects in the system are returned.
cb is the size of this array, measured in bytes.
pBytesReturned points to a single variable that receives the number of bytes ...