Hi Roger,
I tried both of these but was getting the following messages. Is there any way
of confirming which parameter it's refering to? Could it be my "process"
parameter?
Thanks, Tom
Traceback (most recent call last):
File "C:\test\memusage.py", line 24, in ?
test = processes.listprocesses()
File "C:\test\memusage.py", line 11, in listprocesses
han = win32api.OpenProcess(win32con.PROCESS_VM_READ, 0, process)
error: (87, 'OpenProcess', 'The parameter is incorrect.')
>>>
Traceback (most recent call last):
File "C:\test\memusage.py", line 24, in ?
test = processes.listprocesses()
File "C:\test\memusage.py", line 11, in listprocesses
han = win32api.OpenProcess(win32con.PROCESS_QUERY_INFORMATION, 0, process)
error: (87, 'OpenProcess', 'The parameter is incorrect.')
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Roger Upole
Sent: Thursday, February 10, 2005 4:51 PM
To: [email protected]
Subject: [python-win32] Re: Memory Usage for Processes
You'll need to specify more access in OpenProcess.
It's 1 now, which is only PROCESS_TERMINATE.
Most likely you're getting an access denied in the
GetProcessMemoryInfo call. (This is why a bare except:
is not generally a good thing to do) Try changing the access mode to
win32con.PROCESS_QUERY_INFORMATION|win32con.PROCESS_VM_READ.
hth
Roger
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32