[Python-checkins] r46146 - sandbox/trunk/rjsh-pybench/pybench.py
"Martin v. Löwis"
martin at v.loewis.de
Thu May 25 08:35:11 CEST 2006
M.-A. Lemburg wrote:
> I did the next best thing:
>
> win32process.GetProcessTimes(win32process.GetCurrentProcess())
>
> Looking at the win32 docs, the GetCurrentProcess() returns an
> int where GetProcessTimes() wants a PyHANDLE.
>
> Shouldn't have known better though to actually *look* at
> the return value of GetCurrentProcess():
>
> -1
>
> Looks like I should have used OpenProcess() instead.
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getcurrentprocess.asp
The process handle -1 *does* denote the current process; you
don't need to open your own process.
Regards,
Martin
More information about the Python-checkins
mailing list