[pywin32-checkins] pywin32/com/win32com/src/extensions PyIPropertyStorage.cpp, 1.12, 1.13
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2007-08-22 19:57:39
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32209/com/win32com/src/extensions Modified Files: PyIPropertyStorage.cpp Log Message: Fix 64-bit warnings Autoduck improvements Add some error checking Fix a couple of memory leaks Index: PyIPropertyStorage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIPropertyStorage.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PyIPropertyStorage.cpp 29 Nov 2005 02:23:07 -0000 1.12 --- PyIPropertyStorage.cpp 22 Aug 2007 19:57:40 -0000 1.13 *************** *** 11,26 **** // --------------------------------------------------- BOOL PyObject_AsPROPSPECs( PyObject *ob, PROPSPEC **ppRet, ULONG *pcRet) { ! if (!PySequence_Check(ob)) { ! PyErr_SetString(PyExc_TypeError, "PROPSPECs must a sequence"); return FALSE; ! } // First count the items, and the total string space we need. ! LONG cChars = 0; ! int len = PySequence_Length(ob); ! int i; for (i=0;i<len;i++) { ! PyObject *sub = PySequence_GetItem(ob, i); if (PyUnicode_Check(sub)) cChars += PyUnicode_Size(sub) + 1; --- 11,27 ---- // --------------------------------------------------- + // @object PROPSPEC|Identifies a property. Can be either an int property id, or a str/unicode property name. BOOL PyObject_AsPROPSPECs( PyObject *ob, PROPSPEC **ppRet, ULONG *pcRet) { ! BOOL ret=FALSE; ! DWORD len, i; ! PyObject *tuple=PyWinSequence_Tuple(ob, &len); ! if (tuple==NULL) return FALSE; ! // First count the items, and the total string space we need. ! size_t cChars = 0; for (i=0;i<len;i++) { ! PyObject *sub = PyTuple_GET_ITEM(tuple, i); if (PyUnicode_Check(sub)) cChars += PyUnicode_Size(sub) + 1; *************** *** 28,48 **** cChars += PyString_Size(sub) + 1; else if (PyInt_Check(sub)) ! ; else { - Py_DECREF(sub); PyErr_SetString(PyExc_TypeError, "PROPSPECs must be a sequence of strings or integers"); ! return FALSE; } - Py_DECREF(sub); } ! size_t numBytes = (sizeof(PROPSPEC) * len) + (sizeof(WCHAR) * cChars); ! PROPSPEC *pRet = (PROPSPEC *)malloc(numBytes); if (pRet==NULL) { PyErr_SetString(PyExc_MemoryError, "allocating PROPSPECs"); ! return FALSE; } ! WCHAR *curBuf = (WCHAR *)(pRet+len); for (i=0;i<len;i++) { ! PyObject *sub = PySequence_GetItem(ob, i); BSTR bstr; if (PyWinObject_AsBstr(sub, &bstr)) { --- 29,50 ---- cChars += PyString_Size(sub) + 1; else if (PyInt_Check(sub)) ! ; // PROPID is a ULONG, so this may fail for values that require a python long else { PyErr_SetString(PyExc_TypeError, "PROPSPECs must be a sequence of strings or integers"); ! goto cleanup; } } ! size_t numBytes; ! numBytes = (sizeof(PROPSPEC) * len) + (sizeof(WCHAR) * cChars); ! PROPSPEC *pRet; ! pRet = (PROPSPEC *)malloc(numBytes); if (pRet==NULL) { PyErr_SetString(PyExc_MemoryError, "allocating PROPSPECs"); ! goto cleanup; } ! WCHAR *curBuf; ! curBuf = (WCHAR *)(pRet+len); for (i=0;i<len;i++) { ! PyObject *sub = PyTuple_GET_ITEM(tuple, i); BSTR bstr; if (PyWinObject_AsBstr(sub, &bstr)) { *************** *** 51,54 **** --- 53,57 ---- wcscpy( curBuf, bstr); curBuf += wcslen(curBuf) + 1; + PyWinObject_FreeBstr(bstr); } else { PyErr_Clear(); *************** *** 56,69 **** pRet[i].propid = PyInt_AsLong(sub); } - Py_DECREF(sub); } *ppRet = pRet; *pcRet = len; ! return TRUE; } void PyObject_FreePROPSPECs(PROPSPEC *pFree, ULONG /*cFree*/) { ! free(pFree); } --- 59,75 ---- pRet[i].propid = PyInt_AsLong(sub); } } + ret=TRUE; *ppRet = pRet; *pcRet = len; ! cleanup: ! Py_DECREF(tuple); ! return ret; } void PyObject_FreePROPSPECs(PROPSPEC *pFree, ULONG /*cFree*/) { ! if (pFree) ! free(pFree); } *************** *** 166,169 **** --- 172,177 ---- { PyObject *ret = PyTuple_New(cVars); + if (ret==NULL) + return NULL; for (ULONG i=0;i<cVars;i++) { PyObject *sub = PyObject_FromPROPVARIANT(pVars+i); *************** *** 201,270 **** } BOOL PyObject_AsPROPVARIANTs(PyObject *ob, PROPVARIANT **ppRet, ULONG *pcRet) { ! if (!PySequence_Check(ob)) { ! PyErr_SetString(PyExc_TypeError, "PROPVARIANTs must a sequence"); return FALSE; - } - int len = PySequence_Length(ob); PROPVARIANT *pRet = new PROPVARIANT[len]; ! int i; for (i=0;i<len;i++) PropVariantInit(pRet+i); for (i=0;i<len;i++) { ! PyObject *sub = PySequence_GetItem(ob, i); ! BOOL ok = PyObject_AsPROPVARIANT(sub, pRet+i); ! Py_DECREF(sub); ! if (!ok) { ! for (int j=0;j<i;j++) ! PropVariantClear(pRet+j); ! delete [] pRet; ! return FALSE; } ! } ! *ppRet = pRet; ! *pcRet = len; ! return TRUE; ! } ! ! void PyObject_FreePROPVARIANTs(PROPVARIANT *pVars, ULONG cVars) ! { ! for (ULONG i=0;i<cVars;i++) ! PropVariantClear(pVars+i); ! delete [] pVars; } BOOL PyObject_AsPROPIDs(PyObject *ob, PROPID **ppRet, ULONG *pcRet) { ! if (!PySequence_Check(ob)) { ! PyErr_SetString(PyExc_TypeError, "PROPIDs must a sequence"); ! return FALSE; ! } ! int len = PySequence_Length(ob); ! ! PROPID *pRet = new PROPID[len]; ! BOOL ok = TRUE; ! for (int i=0;ok && i<len;i++) { ! PyObject *sub = PySequence_GetItem(ob, i); ! ok = PyInt_Check(sub); ! if (!ok ) ! PyErr_SetString(PyExc_TypeError, "Must be array of ints"); ! if (ok) ! pRet[i] = PyInt_AsLong(sub); ! Py_XDECREF(sub); ! } ! if (!ok) { ! delete [] pRet; ! return FALSE; ! } ! *ppRet = pRet; ! *pcRet = len; ! return TRUE; } void PyObject_FreePROPIDs(PROPID *pFree, ULONG) { ! delete [] pFree; } --- 209,264 ---- } + void PyObject_FreePROPVARIANTs(PROPVARIANT *pVars, ULONG cVars) + { + if (pVars){ + for (ULONG i=0;i<cVars;i++) + PropVariantClear(pVars+i); + delete [] pVars; + } + } + BOOL PyObject_AsPROPVARIANTs(PyObject *ob, PROPVARIANT **ppRet, ULONG *pcRet) { ! BOOL ret=FALSE; ! DWORD len, i; ! PyObject *tuple=PyWinSequence_Tuple(ob, &len); ! if (tuple==NULL) return FALSE; PROPVARIANT *pRet = new PROPVARIANT[len]; ! if (pRet==NULL){ ! PyErr_NoMemory(); ! goto cleanup; ! } for (i=0;i<len;i++) PropVariantInit(pRet+i); for (i=0;i<len;i++) { ! PyObject *sub = PyTuple_GET_ITEM(tuple, i); ! if (!PyObject_AsPROPVARIANT(sub, pRet+i)) ! goto cleanup; } ! ret=TRUE; ! cleanup: ! if (ret){ ! *ppRet = pRet; ! *pcRet = len; ! } ! else if (pRet) ! PyObject_FreePROPVARIANTs(pRet, len); ! Py_DECREF(tuple); ! return ret; } BOOL PyObject_AsPROPIDs(PyObject *ob, PROPID **ppRet, ULONG *pcRet) { ! // PROPID and DWORD are both unsigned long ! return PyWinObject_AsDWORDArray(ob, ppRet, pcRet, FALSE); } + void PyObject_FreePROPIDs(PROPID *pFree, ULONG) { ! if (pFree) ! free(pFree); } *************** *** 294,298 **** return NULL; PyObject *props; ! // @pyparm (<o PROPSPEC>, ...)|props||The property IDs. if ( !PyArg_ParseTuple(args, "O:ReadMultiple", &props)) return NULL; --- 288,292 ---- return NULL; PyObject *props; ! // @pyparm (<o PROPSPEC>, ...)|props||Sequence of property IDs or names. if ( !PyArg_ParseTuple(args, "O:ReadMultiple", &props)) return NULL; *************** *** 332,338 **** } ! // @pymethod |PyIPropertyStorage|WriteMultiple|Description of WriteMultiple. PyObject *PyIPropertyStorage::WriteMultiple(PyObject *self, PyObject *args) { IPropertyStorage *pIPS = GetI(self); if ( pIPS == NULL ) --- 326,337 ---- } ! // @pymethod |PyIPropertyStorage|WriteMultiple|Creates or modifies properties in the property set PyObject *PyIPropertyStorage::WriteMultiple(PyObject *self, PyObject *args) { + PyObject *ret=NULL; + PROPSPEC *pProps = NULL; + PROPVARIANT *pVals = NULL; + ULONG cProps, cVals; + IPropertyStorage *pIPS = GetI(self); if ( pIPS == NULL ) *************** *** 341,382 **** PyObject *obValues; long minId = 2; ! // @pyparm (<o PROPSPEC>, ...)|props||The property IDs. // @pyparm (<o PROPVARIANT>, ...)|values||The values for the properties. if ( !PyArg_ParseTuple(args, "OO|l:WriteMultiple", &obProps, &obValues, &minId)) return NULL; ! ! PROPSPEC *pProps; ! ULONG cProps; if (!PyObject_AsPROPSPECs( obProps, &pProps, &cProps)) ! return NULL; ! ! PROPVARIANT *pVals; ! ULONG cVals; if (!PyObject_AsPROPVARIANTs( obValues, &pVals, &cVals )) ! return NULL; if (cProps != cVals) { PyErr_SetString(PyExc_ValueError, "The parameters must be sequences of the same size"); ! PyObject_FreePROPSPECs(pProps, cProps); ! PyObject_FreePROPVARIANTs(pVals, cVals); ! return NULL; } HRESULT hr; PY_INTERFACE_PRECALL; hr = pIPS->WriteMultiple( cProps, pProps, pVals, minId ); PY_INTERFACE_POSTCALL; PyObject_FreePROPSPECs(pProps, cProps); PyObject_FreePROPVARIANTs(pVals, cVals); ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIPS, IID_IPropertyStorage); ! Py_INCREF(Py_None); ! return Py_None; ! } ! // @pymethod |PyIPropertyStorage|DeleteMultiple|Description of DeleteMultiple. PyObject *PyIPropertyStorage::DeleteMultiple(PyObject *self, PyObject *args) { --- 340,379 ---- PyObject *obValues; long minId = 2; ! // @pyparm (<o PROPSPEC>, ...)|props||Sequence containing names or integer ids of properties to write // @pyparm (<o PROPVARIANT>, ...)|values||The values for the properties. + // @pyparm int|propidNameFirst|2|Minimum property id to be assigned to new properties specified by name if ( !PyArg_ParseTuple(args, "OO|l:WriteMultiple", &obProps, &obValues, &minId)) return NULL; ! if (!PyObject_AsPROPSPECs( obProps, &pProps, &cProps)) ! goto cleanup; if (!PyObject_AsPROPVARIANTs( obValues, &pVals, &cVals )) ! goto cleanup; if (cProps != cVals) { PyErr_SetString(PyExc_ValueError, "The parameters must be sequences of the same size"); ! goto cleanup; } HRESULT hr; + { PY_INTERFACE_PRECALL; hr = pIPS->WriteMultiple( cProps, pProps, pVals, minId ); PY_INTERFACE_POSTCALL; + } + if ( FAILED(hr) ) + PyCom_BuildPyException(hr, pIPS, IID_IPropertyStorage); + else{ + Py_INCREF(Py_None); + ret = Py_None; + } + cleanup: PyObject_FreePROPSPECs(pProps, cProps); PyObject_FreePROPVARIANTs(pVals, cVals); ! return ret; } ! // @pymethod |PyIPropertyStorage|DeleteMultiple|Deletes properties from the property set PyObject *PyIPropertyStorage::DeleteMultiple(PyObject *self, PyObject *args) { *************** *** 386,390 **** PyObject *props; ! // @pyparm (<o PROPSPEC>, ...)|props||The property IDs. if ( !PyArg_ParseTuple(args, "O:ReadMultiple", &props)) return NULL; --- 383,387 ---- PyObject *props; ! // @pyparm (<o PROPSPEC>, ...)|props||Sequence containing names or IDs of properties to be deleted if ( !PyArg_ParseTuple(args, "O:ReadMultiple", &props)) return NULL; *************** *** 415,419 **** return NULL; PyObject *obProps; ! // @pyparm (<o PROPSPEC>, ...)|props||The property IDs. if ( !PyArg_ParseTuple(args, "O:ReadPropertyNames", &obProps)) return NULL; --- 412,416 ---- return NULL; PyObject *obProps; ! // @pyparm (int, ...)|props||Sequence of ints containing property IDs. if ( !PyArg_ParseTuple(args, "O:ReadPropertyNames", &obProps)) return NULL; *************** *** 426,434 **** HRESULT hr; LPWSTR *ppStrs = new LPWSTR[cProps]; memset(ppStrs, 0, sizeof(LPWSTR)*cProps); PY_INTERFACE_PRECALL; hr = pIPS->ReadPropertyNames( cProps, pProps, ppStrs ); PY_INTERFACE_POSTCALL; ! PyObject *rc; if ( FAILED(hr) ) --- 423,436 ---- HRESULT hr; LPWSTR *ppStrs = new LPWSTR[cProps]; + if (ppStrs==NULL){ + PyErr_NoMemory(); + goto cleanup; + } memset(ppStrs, 0, sizeof(LPWSTR)*cProps); + { PY_INTERFACE_PRECALL; hr = pIPS->ReadPropertyNames( cProps, pProps, ppStrs ); PY_INTERFACE_POSTCALL; ! } PyObject *rc; if ( FAILED(hr) ) *************** *** 436,445 **** else { rc = PyTuple_New(cProps); for (ULONG i=0;i<cProps;i++) ! PyTuple_SET_ITEM( rc, i, PyWinObject_FromOLECHAR(ppStrs[i]) ); ! } ! for (ULONG i=0;i<cProps;i++) ! if (ppStrs[i]) CoTaskMemFree(ppStrs[i]); ! delete [] ppStrs; PyObject_FreePROPIDs(pProps, cProps); return rc; --- 438,461 ---- else { rc = PyTuple_New(cProps); + if (rc==NULL) + goto cleanup; + for (ULONG i=0;i<cProps;i++){ + PyObject *propname=PyWinObject_FromOLECHAR(ppStrs[i]); + if (propname==NULL){ + Py_DECREF(rc); + rc=NULL; + goto cleanup; + } + PyTuple_SET_ITEM( rc, i, propname); + } + } + + cleanup: + if (ppStrs){ for (ULONG i=0;i<cProps;i++) ! if (ppStrs[i]) ! CoTaskMemFree(ppStrs[i]); ! delete [] ppStrs; ! } PyObject_FreePROPIDs(pProps, cProps); return rc; *************** *** 454,463 **** PyObject *obProps; PyObject *obNames; ! // @pyparm (<o PROPSPEC>, ...)|props||The property IDs. ! // @pyparm (string, ...)|names||The property names. if ( !PyArg_ParseTuple(args, "OO:WritePropertyNames", &obProps, &obNames)) return NULL; ! ULONG cProps = 0; PROPID *pProps = NULL; LPWSTR *ppStrs = NULL; --- 470,479 ---- PyObject *obProps; PyObject *obNames; ! // @pyparm (int, ...)|props||Sequence containing the property IDs. ! // @pyparm (string, ...)|names||Equal length sequence of property names. if ( !PyArg_ParseTuple(args, "OO:WritePropertyNames", &obProps, &obNames)) return NULL; ! ULONG cProps = 0, cNames=0; PROPID *pProps = NULL; LPWSTR *ppStrs = NULL; *************** *** 466,485 **** if (!PyObject_AsPROPIDs( obProps, &pProps, &cProps)) return NULL; ! ! if (!PySequence_Check(obNames) || PySequence_Length(obNames) != (int)cProps) { ! PyErr_SetString(PyExc_TypeError, "property named must be a sequence the same size as PROPDESCs"); ! return NULL; } HRESULT hr; - ppStrs = new LPWSTR[cProps]; - memset(ppStrs, 0, sizeof(LPWSTR)*cProps); - ULONG i; - for (i=0;i<cProps;i++) { - PyObject *sub = PySequence_GetItem(obNames, i); - BOOL ok = PyWinObject_AsBstr(sub, ppStrs+i); - Py_XDECREF(sub); - if (!ok) - goto done; - } { PY_INTERFACE_PRECALL; --- 482,493 ---- if (!PyObject_AsPROPIDs( obProps, &pProps, &cProps)) return NULL; ! if (!PyWinObject_AsWCHARArray(obNames, &ppStrs, &cNames, FALSE)) ! goto done; ! if (cNames != cProps) { ! PyErr_SetString(PyExc_TypeError, "Property names must be a sequence the same size as property ids"); ! goto done; } + HRESULT hr; { PY_INTERFACE_PRECALL; *************** *** 489,511 **** if ( FAILED(hr) ) ! rc = PyCom_BuildPyException(hr, pIPS, IID_IPropertyStorage); ! else { ! rc = PyTuple_New(cProps); ! for (ULONG i=0;i<cProps;i++) ! PyTuple_SET_ITEM( rc, i, PyWinObject_FromOLECHAR(ppStrs[i]) ); ! } ! done: ! if (pProps) ! PyObject_FreePROPIDs(pProps, cProps); ! if (ppStrs) { ! for (i=0;i<cProps;i++) { ! PyWinObject_FreeBstr(ppStrs[i]); } ! delete [] ppStrs; ! } return rc; } ! // @pymethod |PyIPropertyStorage|DeletePropertyNames|Description of DeletePropertyNames. PyObject *PyIPropertyStorage::DeletePropertyNames(PyObject *self, PyObject *args) { --- 497,512 ---- if ( FAILED(hr) ) ! PyCom_BuildPyException(hr, pIPS, IID_IPropertyStorage); ! else{ ! Py_INCREF(Py_None); ! rc = Py_None; } ! done: ! PyObject_FreePROPIDs(pProps, cProps); ! PyWinObject_FreeWCHARArray(ppStrs, cNames); return rc; } ! // @pymethod |PyIPropertyStorage|DeletePropertyNames|Removes property names from specified properties. PyObject *PyIPropertyStorage::DeletePropertyNames(PyObject *self, PyObject *args) { *************** *** 514,518 **** return NULL; PyObject *obProps; ! // @pyparm (<o PROPSPEC>, ...)|props||The property IDs. if ( !PyArg_ParseTuple(args, "O:DeletePropertyNames", &obProps)) return NULL; --- 515,519 ---- return NULL; PyObject *obProps; ! // @pyparm (int, ...)|props||Sequence of ints containing property IDs. if ( !PyArg_ParseTuple(args, "O:DeletePropertyNames", &obProps)) return NULL; *************** *** 526,530 **** hr = pIPS->DeletePropertyNames( cProps, pProps ); PY_INTERFACE_POSTCALL; ! if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIPS, IID_IPropertyStorage); --- 527,531 ---- hr = pIPS->DeletePropertyNames( cProps, pProps ); PY_INTERFACE_POSTCALL; ! PyObject_FreePROPIDs(pProps, cProps); if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIPS, IID_IPropertyStorage); *************** *** 534,538 **** } ! // @pymethod |PyIPropertyStorage|Commit|Description of Commit. PyObject *PyIPropertyStorage::Commit(PyObject *self, PyObject *args) { --- 535,539 ---- } ! // @pymethod |PyIPropertyStorage|Commit|Persists the property set to its base storage PyObject *PyIPropertyStorage::Commit(PyObject *self, PyObject *args) { *************** *** 540,544 **** if ( pIPS == NULL ) return NULL; ! // @pyparm int|grfCommitFlags||Description for grfCommitFlags DWORD grfCommitFlags; if ( !PyArg_ParseTuple(args, "l:Commit", &grfCommitFlags) ) --- 541,545 ---- if ( pIPS == NULL ) return NULL; ! // @pyparm int|grfCommitFlags||Combination of STGC_* flags DWORD grfCommitFlags; if ( !PyArg_ParseTuple(args, "l:Commit", &grfCommitFlags) ) *************** *** 556,560 **** } ! // @pymethod |PyIPropertyStorage|Revert|Description of Revert. PyObject *PyIPropertyStorage::Revert(PyObject *self, PyObject *args) { --- 557,561 ---- } ! // @pymethod |PyIPropertyStorage|Revert|Discards any changes that have been made PyObject *PyIPropertyStorage::Revert(PyObject *self, PyObject *args) { *************** *** 576,580 **** } ! // @pymethod |PyIPropertyStorage|Enum|Description of Enum. PyObject *PyIPropertyStorage::Enum(PyObject *self, PyObject *args) { --- 577,581 ---- } ! // @pymethod <o PyIEnumSTATPROPSTG>|PyIPropertyStorage|Enum|Creates an enumerator for properties in the property set PyObject *PyIPropertyStorage::Enum(PyObject *self, PyObject *args) { *************** *** 600,604 **** } ! // @pymethod |PyIPropertyStorage|SetTimes|Description of SetTimes. PyObject *PyIPropertyStorage::SetTimes(PyObject *self, PyObject *args) { --- 601,606 ---- } ! // @pymethod |PyIPropertyStorage|SetTimes|Sets the creation, last access, and modification time ! // @comm Some property sets do not support these times. PyObject *PyIPropertyStorage::SetTimes(PyObject *self, PyObject *args) { *************** *** 606,612 **** if ( pIPS == NULL ) return NULL; ! // @pyparm <o PyTime>|pctime||Description for pctime ! // @pyparm <o PyTime>|patime||Description for patime ! // @pyparm <o PyTime>|pmtime||Description for pmtime PyObject *obpctime; PyObject *obpatime; --- 608,614 ---- if ( pIPS == NULL ) return NULL; ! // @pyparm <o PyTime>|pctime||Creation time ! // @pyparm <o PyTime>|patime||Last access time ! // @pyparm <o PyTime>|pmtime||Modification time PyObject *obpctime; PyObject *obpatime; *************** *** 637,641 **** } ! // @pymethod |PyIPropertyStorage|SetClass|Description of SetClass. PyObject *PyIPropertyStorage::SetClass(PyObject *self, PyObject *args) { --- 639,643 ---- } ! // @pymethod |PyIPropertyStorage|SetClass|Sets the GUID for the property set PyObject *PyIPropertyStorage::SetClass(PyObject *self, PyObject *args) { *************** *** 648,654 **** if ( !PyArg_ParseTuple(args, "O:SetClass", &obclsid) ) return NULL; ! BOOL bPythonIsHappy = TRUE; ! if (!PyWinObject_AsIID(obclsid, &clsid)) bPythonIsHappy = FALSE; ! if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; --- 650,655 ---- if ( !PyArg_ParseTuple(args, "O:SetClass", &obclsid) ) return NULL; ! if (!PyWinObject_AsIID(obclsid, &clsid)) ! return NULL; HRESULT hr; PY_INTERFACE_PRECALL; *************** *** 663,667 **** } ! // @pymethod |PyIPropertyStorage|Stat|Description of Stat. PyObject *PyIPropertyStorage::Stat(PyObject *self, PyObject *args) { --- 664,668 ---- } ! // @pymethod |PyIPropertyStorage|Stat|Returns various infomation about the property set PyObject *PyIPropertyStorage::Stat(PyObject *self, PyObject *args) { *************** *** 686,700 **** { { "ReadMultiple", PyIPropertyStorage::ReadMultiple, 1 }, // @pymeth ReadMultiple|Reads specified properties from the current property set. ! { "WriteMultiple", PyIPropertyStorage::WriteMultiple, 1 }, // @pymeth WriteMultiple|Description of WriteMultiple ! { "DeleteMultiple", PyIPropertyStorage::DeleteMultiple, 1 }, // @pymeth DeleteMultiple|Description of DeleteMultiple { "ReadPropertyNames", PyIPropertyStorage::ReadPropertyNames, 1 }, // @pymeth ReadPropertyNames|Retrieves any existing string names for the specified property identifiers. { "WritePropertyNames", PyIPropertyStorage::WritePropertyNames, 1 }, // @pymeth WritePropertyNames|Assigns string names to a specified array of property IDs in the current property set. ! { "DeletePropertyNames", PyIPropertyStorage::DeletePropertyNames, 1 }, // @pymeth DeletePropertyNames|Description of DeletePropertyNames ! { "Commit", PyIPropertyStorage::Commit, 1 }, // @pymeth Commit|Description of Commit ! { "Revert", PyIPropertyStorage::Revert, 1 }, // @pymeth Revert|Description of Revert ! { "Enum", PyIPropertyStorage::Enum, 1 }, // @pymeth Enum|Description of Enum ! { "SetTimes", PyIPropertyStorage::SetTimes, 1 }, // @pymeth SetTimes|Description of SetTimes ! { "SetClass", PyIPropertyStorage::SetClass, 1 }, // @pymeth SetClass|Description of SetClass ! { "Stat", PyIPropertyStorage::Stat, 1 }, // @pymeth Stat|Description of Stat { NULL } }; --- 687,701 ---- { { "ReadMultiple", PyIPropertyStorage::ReadMultiple, 1 }, // @pymeth ReadMultiple|Reads specified properties from the current property set. ! { "WriteMultiple", PyIPropertyStorage::WriteMultiple, 1 }, // @pymeth WriteMultiple|Creates or modifies properties in the property set ! { "DeleteMultiple", PyIPropertyStorage::DeleteMultiple, 1 }, // @pymeth DeleteMultiple|Deletes properties from the property set { "ReadPropertyNames", PyIPropertyStorage::ReadPropertyNames, 1 }, // @pymeth ReadPropertyNames|Retrieves any existing string names for the specified property identifiers. { "WritePropertyNames", PyIPropertyStorage::WritePropertyNames, 1 }, // @pymeth WritePropertyNames|Assigns string names to a specified array of property IDs in the current property set. ! { "DeletePropertyNames", PyIPropertyStorage::DeletePropertyNames, 1 }, // @pymeth DeletePropertyNames|Removes property names from specified properties. ! { "Commit", PyIPropertyStorage::Commit, 1 }, // @pymeth Commit|Persists the property set to its base storage ! { "Revert", PyIPropertyStorage::Revert, 1 }, // @pymeth Revert|Discards any changes that have been made ! { "Enum", PyIPropertyStorage::Enum, 1 }, // @pymeth Enum|Creates an enumerator for properties in the property set ! { "SetTimes", PyIPropertyStorage::SetTimes, 1 }, // @pymeth SetTimes|Sets the creation, last access, and modification time ! { "SetClass", PyIPropertyStorage::SetClass, 1 }, // @pymeth SetClass|Sets the GUID for the property set ! { "Stat", PyIPropertyStorage::Stat, 1 }, // @pymeth Stat|Returns various infomation about the property set { NULL } }; |