GetProcessMemoryInfo

The GetProcessMemoryInfo function retrieves information about the memory usage of the specified process in the PROCESS_MEMORY_COUNTERS structure.

BOOL GetProcessMemoryInfo(
  HANDLE Process,  // handle to the process
  PPROCESS_MEMORY_COUNTERS ppsmemCounters,
                   // structure that receives information
  DWORD cb         // size of the structure
);
 

Parameters

Process
Handle to the process.
ppsmemCounters
Pointer to the PROCESS_MEMORY_COUNTERS structure that receives information about the memory usage of the process.
cb
Specifies the size, in bytes, of the PROCESS_MEMORY_COUNTERS structure.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

See Also

Process Status Helper Overview, PSAPI Functions, EnumProcesses, PROCESS_MEMORY_COUNTERS