Open ghost opened 19 years ago
Original comment by: dubnerm
Logged In: YES user_id=14198
I don't know of anyone working on this. What approach are you taking?
Original comment by: mhammond
Logged In: YES user_id=39274
I want to do something as simple as following:
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/univgw_dataconv.cpp,v retrieving revision 1.9 diff -p -s -r1.9 univgw_dataconv.cpp *** univgw_dataconv.cpp 27 Jun 2005 11:02:41 -0000 1.9 --- univgw_dataconv.cpp 13 Dec 2005 02:56:26 -0000 *************** PyObject * dataconv_WriteFromOutTuple(Py *** 301,306 **** --- 301,315 ---- } break; } + case VT_RECORD: + { + BOOL PyObject_AsRecordData(PyObject *ob, void **data); + if ( !PyObject_AsRecordData(obOutValue, pbArg) ) + { + goto Error; + } + break; + } case VT_BSTR: { // This is the normal "BSTR" case, we can't
Do you know any reason this would fail? I can't check now - pywin32 doesn't compiles neither under VC toolkit, nor under mingw.
Original comment by: dubnerm
Logged In: YES user_id=14198
I guess that should work :) Ideally the test suite should also arrange for this to be called so we know it works and always remains working.
Original comment by: mhammond
Here's the proposed patch with updated formatting and location
diff --git a/com/win32com/src/univgw_dataconv.cpp b/com/win32com/src/univgw_dataconv.cpp
index 13dd4142..778e8640 100644
--- a/com/win32com/src/univgw_dataconv.cpp
+++ b/com/win32com/src/univgw_dataconv.cpp
@@ -294,6 +294,13 @@ PyObject *dataconv_WriteFromOutTuple(PyObject *self, PyObject *args)
}
break;
}
+ case VT_RECORD: {
+ BOOL PyObject_AsRecordData(PyObject ob, void **data);
+ if (!PyObject_AsRecordData(obOutValue, pbArg)) {
+ goto Error;
+ }
+ break;
+ }
case VT_BSTR: {
// This is the normal "BSTR" case, we can't
// allocate a new BSTR we have to back patch the one
Tagging @pyhedgehog as original SourceForge issue Creator.
I'm interested in implementing this, and started working on it. If someone already near implementation - please inform here.
Reported by: dubnerm
Original Ticket: "pywin32/feature-requests/36":https://sourceforge.net/p/pywin32/feature-requests/36