[pywin32-checkins] pywin32/com/win32comext/shell/src PyIShellView.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-27 17:18:31
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5903/com/win32comext/shell/src Modified Files: PyIShellView.cpp Log Message: Fix place where HWND treated as a long Index: PyIShellView.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellView.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyIShellView.cpp 26 Jan 2005 22:31:09 -0000 1.5 --- PyIShellView.cpp 27 Jan 2007 17:18:28 -0000 1.6 *************** *** 144,148 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pISV, IID_IShellView ); ! return PyLong_FromVoidPtr(hWnd); } --- 144,148 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pISV, IID_IShellView ); ! return PyWinLong_FromHANDLE(hWnd); } *************** *** 388,393 **** if (FAILED(hr)) return hr; // Process the Python results, and convert back to the real params ! if (PyInt_Check(result) || PyLong_Check(result)) ! *phWnd = (HWND)PyInt_AsLong(result); Py_DECREF(result); return hr; --- 388,393 ---- if (FAILED(hr)) return hr; // Process the Python results, and convert back to the real params ! if (!PyWinObject_AsHANDLE(result, (HANDLE *)phWnd, TRUE)) ! hr=MAKE_PYCOM_GATEWAY_FAILURE_CODE("CreateViewWindow"); Py_DECREF(result); return hr; |