Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Process information
#2
for Win2000/XP an later

Code:
Copy      Help
type PROCESS_MEMORY_COUNTERS cb PageFaultCount PeakWorkingSetSize WorkingSetSize QuotaPeakPagedPoolUsage QuotaPagedPoolUsage QuotaPeakNonPagedPoolUsage QuotaNonPagedPoolUsage PagefileUsage PeakPagefileUsage
dll psapi #GetProcessMemoryInfo hProcess PROCESS_MEMORY_COUNTERS*ppsmemCounters cb

int idpr hpr
idpr=GetProcessId("notepad") ;;if GetProcessId does not exist, use GetWindowThreadProcessId(win("Notepad") &idpr)
hpr=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ 0 idpr); if(!hpr) ret

PROCESS_MEMORY_COUNTERS pm
if(GetProcessMemoryInfo(hpr &pm sizeof(PROCESS_MEMORY_COUNTERS)))
,out "All memory = %i K, currently in RAM = %i K" pm.PagefileUsage/1024 pm.WorkingSetSize/1024

CloseHandle(hpr)


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)