From: Roger U. <ru...@us...> - 2007-01-25 21:42:21
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18945/win32/src Modified Files: win32process.i Log Message: Couple more 64-bit compatibility changes Index: win32process.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32process.i,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** win32process.i 25 Jan 2007 04:59:44 -0000 1.25 --- win32process.i 25 Jan 2007 21:42:17 -0000 1.26 *************** *** 63,67 **** typedef DWORD (WINAPI *SetThreadIdealProcessorfunc)(HANDLE, DWORD); static SetThreadIdealProcessorfunc pfnSetThreadIdealProcessor = NULL; ! typedef DWORD (WINAPI *SetProcessAffinityMaskfunc)(HANDLE, DWORD); static SetProcessAffinityMaskfunc pfnSetProcessAffinityMask = NULL; #endif --- 63,67 ---- typedef DWORD (WINAPI *SetThreadIdealProcessorfunc)(HANDLE, DWORD); static SetThreadIdealProcessorfunc pfnSetThreadIdealProcessor = NULL; ! typedef DWORD (WINAPI *SetProcessAffinityMaskfunc)(HANDLE, DWORD_PTR); static SetProcessAffinityMaskfunc pfnSetProcessAffinityMask = NULL; #endif *************** *** 754,757 **** --- 754,768 ---- #endif // MS_WINCE + %{ + // GetCurrentProcess returns -1 which is INVALID_HANDLE_VALUE, so can't use swig typemap for HANDLE + // @pyswig int|GetCurrentProcess|Retrieves a pseudo handle for the current process. + static PyObject *MyGetCurrentProcess(PyObject *self, PyObject *args) + { + if(!PyArg_ParseTuple(args,":GetCurrentProcess")) + return NULL; + return PyWinLong_FromHANDLE(GetCurrentProcess()); + } + %} + %native (GetCurrentProcess) MyGetCurrentProcess; // @pyswig int|GetProcessVersion|Obtains the major and minor version numbers of the system on which a specified process expects to run. *************** *** 760,766 **** ); - // @pyswig int|GetCurrentProcess|Retrieves a pseudo handle for the current process. - DWORD GetCurrentProcess(); - // @pyswig int|GetCurrentProcessId|Retrieves the process identifier of the calling process. DWORD GetCurrentProcessId(); --- 771,774 ---- |