[pywin32-checkins] pywin32/com/win32comext/directsound/src PyIDirectSound.cpp, 1.5, 1.6
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-01-21 16:59:59
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/directsound/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22343/com/win32comext/directsound/src Modified Files: PyIDirectSound.cpp Log Message: Change place where HWND treated as int Index: PyIDirectSound.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/PyIDirectSound.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyIDirectSound.cpp 23 Mar 2005 22:51:09 -0000 1.5 --- PyIDirectSound.cpp 21 Jan 2007 16:59:56 -0000 1.6 *************** *** 84,89 **** return NULL; ! ! if (obHWND == Py_None) { hwnd = GetForegroundWindow(); --- 84,90 ---- return NULL; ! if (!PyWinObject_AsHANDLE(obHWND, (HANDLE *)&hwnd, TRUE)) ! return NULL; ! if (hwnd == NULL) { hwnd = GetForegroundWindow(); *************** *** 93,105 **** } } - else if (PyInt_Check(obHWND)) - { - hwnd = (HWND)PyInt_AS_LONG(obHWND); - } - else - { - PyErr_SetString(PyExc_TypeError, "argument 1 must be a window handle or None"); - return NULL; - } HRESULT hr; --- 94,97 ---- |