[pywin32-checkins] pywin32/com/win32com/src PythonCOM.cpp,1.21,1.22
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-10-08 05:37:36
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sc8-pr-cvs1:/tmp/cvs-serv22147 Modified Files: PythonCOM.cpp Log Message: Correct autoduck documentation for new clipboard functions, and move OleLoadPicture to the axcontrol module. Index: PythonCOM.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PythonCOM.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** PythonCOM.cpp 8 Oct 2003 04:28:42 -0000 1.21 --- PythonCOM.cpp 8 Oct 2003 05:37:32 -0000 1.22 *************** *** 12,16 **** #include "stdafx.h" #include <objbase.h> - #include "olectl.h" #include "PythonCOM.h" #include "PythonCOMServer.h" --- 12,15 ---- *************** *** 1298,1341 **** } ! static PyObject *pythoncom_OleLoadPicture(PyObject *, PyObject *args) ! { ! PyObject *ret = NULL; ! PyObject *obStream, *obIIDAPI, *obIIDRet = NULL; ! LONG size; ! BOOL runMode; ! if (!PyArg_ParseTuple(args, "OiiO|O", &obStream, &size, &runMode, &obIIDAPI, &obIIDRet)) { ! return NULL; ! } ! ! IUnknown *pUnk = NULL; ! IStream* pStream = NULL; ! IID iidAPI, iidRet; ! HRESULT hr; ! if (!PyCom_InterfaceFromPyInstanceOrObject(obStream, IID_IStream, (void **)&pStream, FALSE)) ! goto done; ! ! if (!PyWinObject_AsIID(obIIDAPI, &iidAPI)) ! goto done; ! if (obIIDRet == NULL) ! iidRet = iidAPI; ! else { ! if (!PyWinObject_AsIID(obIIDRet, &iidRet)) ! goto done; ! } ! Py_BEGIN_ALLOW_THREADS ! hr = ::OleLoadPicture(pStream, size, runMode, iidAPI, (LPVOID*)&pUnk); ! Py_END_ALLOW_THREADS ! if (FAILED(hr)) { ! PyCom_BuildPyException(hr); ! goto done; ! } ! ret = PyCom_PyObjectFromIUnknown(pUnk, iidRet, FALSE); ! done: ! if (pStream) ! pStream->Release(); ! return ret; ! } ! ! // @pymeth <o PyIDataObject>|OleGetClipboard|Retrieves a data object that you can use to access the contents of the clipboard. static PyObject *pythoncom_OleGetClipboard(PyObject *, PyObject *args) { --- 1297,1301 ---- } ! // @pymethod <o PyIDataObject>|pythoncom|OleGetClipboard|Retrieves a data object that you can use to access the contents of the clipboard. static PyObject *pythoncom_OleGetClipboard(PyObject *, PyObject *args) { *************** *** 1354,1358 **** } ! // @pymeth |OleSetClipboard|Places a pointer to a specific data object onto the clipboard. This makes the data object accessible to the OleGetClipboard function. static PyObject *pythoncom_OleSetClipboard(PyObject *, PyObject *args) { --- 1314,1318 ---- } ! // @pymethod |pythoncom|OleSetClipboard|Places a pointer to a specific data object onto the clipboard. This makes the data object accessible to the OleGetClipboard function. static PyObject *pythoncom_OleSetClipboard(PyObject *, PyObject *args) { *************** *** 1376,1380 **** } ! // @pymeth true/false|OleIsCurrentClipboard|Determines whether the data object pointer previously placed on the clipboard by the OleSetClipboard function is still on the clipboard. static PyObject *pythoncom_OleIsCurrentClipboard(PyObject *, PyObject *args) { --- 1336,1340 ---- } ! // @pymethod true/false|pythoncom|OleIsCurrentClipboard|Determines whether the data object pointer previously placed on the clipboard by the OleSetClipboard function is still on the clipboard. static PyObject *pythoncom_OleIsCurrentClipboard(PyObject *, PyObject *args) { *************** *** 1399,1403 **** } ! // @pymeth |OleFlushClipboard|Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the <om pythoncom.OleSetClipboard> function. static PyObject *pythoncom_OleFlushClipboard(PyObject *, PyObject *args) { --- 1359,1363 ---- } ! // @pymethod |pythoncom|OleFlushClipboard|Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the <om pythoncom.OleSetClipboard> function. static PyObject *pythoncom_OleFlushClipboard(PyObject *, PyObject *args) { *************** *** 1483,1487 **** { "OleLoadFromStream", pythoncom_OleLoadFromStream, 1}, // @pymeth OleLoadFromStream|Load an object from an IStream. { "OleSaveToStream", pythoncom_OleSaveToStream, 1}, // @pymeth OleSaveToStream|Save an object to an IStream. - { "OleLoadPicture", pythoncom_OleLoadPicture, 1 }, // @pymeth OleLoadPicture|Creates a new picture object and initializes it from the contents of a stream. { "OleLoad", pythoncom_OleLoad, 1 }, // @pymeth OleLoad|Loads into memory an object nested within a specified storage object. #ifndef MS_WINCE --- 1443,1446 ---- |