简体   繁体   中英

how to get memory used by any process programatically in vC++ in windows mobile

I tried to get memory used by a individual process by using

BOOL WINAPI GetProcessMemoryInfo(
  __in   HANDLE Process,
  __out  PPROCESS_MEMORY_COUNTERS ppsmemCounters,
  __in   DWORD cb
);

But it is showing error saying undeclared identifier in PROCESS_MEMORY_COUNTERS . I have included the header-file "psapi.h" .

Anyone please suggest any API.

Thanks, M

GetProcessMemoryInfo is not a Windows Mobile or Windows CE SDK function, it's for the desktop. You'll need to use the ToolHelp API functions ( http://msdn.microsoft.com/en-us/library/aa915058.aspx ) to get a process memory snapshot and also the undocumented CeGetProcVMInfo from pkfuncs.h.

More to read here:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM