Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Process information
#3
NICE!!

i made a quick function out of it for quick use.

make this code a function and call it "process_info"

Function process_info
Code:
Copy      Help
;/
function# pid

;Returns process working set size in KB.
;Returns 0 if failed.

;pid - process ID.

;EXAMPLE
;int pid=ProcessNameToId("firefox")
;out process_info(pid)


__Handle hpr=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ 0 pid); if(!hpr) ret

PROCESS_MEMORY_COUNTERS pm
if(GetProcessMemoryInfo(hpr &pm sizeof(PROCESS_MEMORY_COUNTERS)))
,ret pm.WorkingSetSize/1024



Very nice work Gintaras!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)