[pywin32-checkins] pywin32/win32/src win32gui.i,1.59,1.60
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-04-12 03:41:45
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9108 Modified Files: win32gui.i Log Message: Fix [ 1167608 ] win32gui.GetCapture seems broken Functions that returned HWND, HDC or other similar objects would raise an exception with "no error" whenever a handle of 0 was returned. We now only raise an exception when a real win32 error happens, and simply return the zero handle otherwise. Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** win32gui.i 12 Apr 2005 02:47:32 -0000 1.59 --- win32gui.i 12 Apr 2005 03:41:35 -0000 1.60 *************** *** 453,461 **** %typemap(python,except) HWND, HDC, HMENU, HICON, HBITMAP, HIMAGELIST { Py_BEGIN_ALLOW_THREADS $function Py_END_ALLOW_THREADS ! if ($source==0) { $cleanup ! return PyWin_SetAPIError("$name"); } } --- 453,463 ---- %typemap(python,except) HWND, HDC, HMENU, HICON, HBITMAP, HIMAGELIST { Py_BEGIN_ALLOW_THREADS + SetLastError(0); $function Py_END_ALLOW_THREADS ! DWORD le; ! if ($source==0 && (le=GetLastError())) { $cleanup ! return PyWin_SetAPIError("$name", le); } } |