Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13520/com/win32com/src
Modified Files:
PythonCOM.cpp
Log Message:
Fix places where HWNDs treated as longs
Index: PythonCOM.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** PythonCOM.cpp 30 Aug 2006 10:28:25 -0000 1.41
--- PythonCOM.cpp 17 Jan 2007 19:13:46 -0000 1.42
***************
*** 1563,1570 ****
PyObject *obd;
HWND hwnd;
! if (!PyArg_ParseTuple(args, "lO:RegisterDragDrop", &hwnd, &obd))
return NULL;
! // @pyparm long|hwnd||
! // @pyparm <o PyIDropTarget>|dropTarget||
IDropTarget *dt;
if (!PyCom_InterfaceFromPyObject(obd, IID_IDropTarget, (void**)&dt, FALSE))
--- 1563,1573 ----
PyObject *obd;
HWND hwnd;
! PyObject *obhwnd;
! if (!PyArg_ParseTuple(args, "OO:RegisterDragDrop", &obhwnd, &obd))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
! return NULL;
! // @pyparm <o PyHANDLE>|hwnd||Handle to a window
! // @pyparm <o PyIDropTarget>|dropTarget||Object that implements the IDropTarget interface
IDropTarget *dt;
if (!PyCom_InterfaceFromPyObject(obd, IID_IDropTarget, (void**)&dt, FALSE))
***************
*** 1589,1594 ****
{
HWND hwnd;
! // @pyparm long|hwnd||
! if (!PyArg_ParseTuple(args, "l:RevokeDragDrop", &hwnd))
return NULL;
HRESULT hr;
--- 1592,1600 ----
{
HWND hwnd;
! PyObject *obhwnd;
! // @pyparm <o PyHANDLE>|hwnd||Handle to a window registered as an OLE drop target.
! if (!PyArg_ParseTuple(args, "O:RevokeDragDrop", &obhwnd))
! return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
HRESULT hr;
|