[pywin32-checkins] pywin32/com/win32comext/shell/src PyIContextMenu.cpp,1.1,1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2004-03-12 08:54:31
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24261 Modified Files: PyIContextMenu.cpp Log Message: Fix CMINVOKECOMMANDINFO handling on the client side. Index: PyIContextMenu.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIContextMenu.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIContextMenu.cpp 6 Oct 2003 12:47:57 -0000 1.1 --- PyIContextMenu.cpp 12 Mar 2004 08:35:10 -0000 1.2 *************** *** 53,59 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pICM, IID_IContextMenu ); ! Py_INCREF(Py_None); ! return Py_None; ! } --- 53,57 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pICM, IID_IContextMenu ); ! return PyInt_FromLong(hr); } *************** *** 64,78 **** if ( pICM == NULL ) return NULL; ! CMINVOKECOMMANDINFO *lpici; PyObject *oblpici; if ( !PyArg_ParseTuple(args, "O:InvokeCommand", &oblpici) ) return NULL; BOOL bPythonIsHappy = TRUE; ! if (bPythonIsHappy && !PyObject_AsCMINVOKECOMMANDINFO( oblpici, &lpici )) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pICM->InvokeCommand( lpici ); ! PyObject_FreeCMINVOKECOMMANDINFO(lpici); PY_INTERFACE_POSTCALL; --- 62,76 ---- if ( pICM == NULL ) return NULL; ! CMINVOKECOMMANDINFO ci; PyObject *oblpici; if ( !PyArg_ParseTuple(args, "O:InvokeCommand", &oblpici) ) return NULL; BOOL bPythonIsHappy = TRUE; ! if (bPythonIsHappy && !PyObject_AsCMINVOKECOMMANDINFO( oblpici, &ci )) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pICM->InvokeCommand( &ci ); ! PyObject_FreeCMINVOKECOMMANDINFO(&ci); PY_INTERFACE_POSTCALL; *************** *** 154,160 **** { PY_GATEWAY_METHOD; - // *** The input argument lpici of type "CMINVOKECOMMANDINFO __RPC_FAR *" was not processed *** - // - Please ensure this conversion function exists, and is appropriate - // - The type 'CMINVOKECOMMANDINFO' (lpici) is unknown. PyObject *oblpici = PyObject_FromCMINVOKECOMMANDINFO(lpici); if (oblpici==NULL) return PyCom_HandlePythonFailureToCOM(); --- 152,155 ---- |