Update of /cvsroot/pywin32/pywin32/win32/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10593
Modified Files:
Tag: py3k
win32event.i
Log Message:
Incorporate fix for MsgWaitForMultipleObjectsEx from main branch
Index: win32event.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32event.i,v
retrieving revision 1.9.2.1
retrieving revision 1.9.2.2
diff -C2 -d -r1.9.2.1 -r1.9.2.2
*** win32event.i 29 Aug 2008 04:59:26 -0000 1.9.2.1
--- win32event.i 4 Oct 2008 00:30:04 -0000 1.9.2.2
***************
*** 219,223 ****
%name(MsgWaitForMultipleObjectsEx) PyObject *MyMsgWaitForMultipleObjectsEx(
PyObject *obHandleList, // @pyparm [<o PyHANDLE>, ...]|handleList||A sequence of handles to wait on.
- BOOL fWaitAll, // @pyparm int|fWaitAll||wait for all or wait for one
DWORD dwMilliseconds, // @pyparm int|milliseconds||time-out interval in milliseconds
DWORD dwWakeMask, // @pyparm int|wakeMask||type of input events to wait for
--- 219,222 ----
***************
*** 228,232 ****
static PyObject * MyMsgWaitForMultipleObjectsEx(
PyObject *handleList,
- BOOL fWaitAll, // wait for all or wait for one
DWORD dwMilliseconds, // time-out interval in milliseconds
DWORD dwWakeMask,
--- 227,230 ----
***************
*** 240,256 ****
DWORD rc;
! // Do a LoadLibrary, as the Ex version does not exist on NT3.x, Win95
! // @comm This method does not exist on NT3.5x or Win95. If there
! // is an attempt to use it on these platforms, a COM error with
! // E_NOTIMPL will be raised.
! HMODULE hMod = GetModuleHandle(_T("user32.dll"));
! if (hMod==0) return PyWin_SetBasicCOMError(E_HANDLE);
! FARPROC fp = GetProcAddress(hMod, "MsgWaitForMultipleObjectsEx");
! if (fp==NULL) return PyWin_SetBasicCOMError(E_NOTIMPL);
!
! DWORD (*mypfn)(DWORD, LPHANDLE, DWORD, DWORD, DWORD);
! mypfn = (DWORD (*)(DWORD, LPHANDLE, DWORD, DWORD, DWORD))fp;
Py_BEGIN_ALLOW_THREADS
! rc = (*mypfn)(numItems, pItems, dwMilliseconds, dwWakeMask, dwFlags);
Py_END_ALLOW_THREADS
PyObject *obrc;
--- 238,245 ----
DWORD rc;
! // @comm This method will no longer raise a COM E_NOTIMPL exception
! // as it is no longer dynamically loaded.
Py_BEGIN_ALLOW_THREADS
! rc = MsgWaitForMultipleObjectsEx(numItems, pItems, dwMilliseconds, dwWakeMask, dwFlags);
Py_END_ALLOW_THREADS
PyObject *obrc;
***************
*** 264,268 ****
%}
-
// @pyswig <o PyHANDLE>|OpenEvent|Returns a handle of an existing named event object.
PyHANDLE OpenEvent(
--- 253,256 ----
|