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 GetProcessM开发者_开发百科emoryInfo(
__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:
- http://www.codeproject.com/Tips/123149/How-to-get-individual-process-memory-usage-statist.aspx
- http://social.msdn.microsoft.com/Forums/en/vssmartdevicesnative/thread/e16a2a74-2181-4c73-bfce-37bd601717ff
精彩评论