Group: Performance Monitoring - Library: psapi
Enumerating Processes -- WinNT
BOOL EnumProcesses(
DWORD *lpidProcess, // array of process identifiers
DWORD cb, // size of array
DWORD *cbNeeded // number of bytes returned
);
DECLARE INTEGER EnumProcesses IN psapi;
STRING @ lpidProcess,;
INTEGER cb,;
INTEGER @ cbNeeded
lpidProcess [out] Pointer to an array that receives the list of process identifiers.
cb [in] Specifies the size, in bytes, of the lpidProcess array.
cbNeeded [out] Receives the number of bytes returned in the lpidProcess array.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
Windows NT/2000/XP: Included in Windows NT 4.0 and later.
Windows 95/98/Me: Unsupported.