Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9704/win32com/src
Modified Files:
oleargs.cpp univgw_dataconv.cpp
Log Message:
Fix [ 1203980 ] Universal Gateway mishandles ByRef Variant arguments
Index: univgw_dataconv.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/univgw_dataconv.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** univgw_dataconv.cpp 31 May 2005 12:36:02 -0000 1.8
--- univgw_dataconv.cpp 27 Jun 2005 11:02:41 -0000 1.9
***************
*** 694,703 ****
obArg = PyCom_PyObjectFromVariant(&var);
break;
! case VT_VARIANT: {
! // A pointer to a _real_ variant.
! VARIANT *pVar = (VARIANT *)pb;
! obArg = PyCom_PyObjectFromVariant(pVar);
break;
- }
case VT_LPSTR:
obArg = PyString_FromString(*(CHAR **)pb);
--- 694,704 ----
obArg = PyCom_PyObjectFromVariant(&var);
break;
! case VT_VARIANT:
! // A _real_ variant.
! if (bIsByRef)
! obArg = PyCom_PyObjectFromVariant(*(VARIANT**)pb);
! else
! obArg = PyCom_PyObjectFromVariant((VARIANT*)pb);
break;
case VT_LPSTR:
obArg = PyString_FromString(*(CHAR **)pb);
Index: oleargs.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/oleargs.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** oleargs.cpp 31 May 2005 12:36:02 -0000 1.29
--- oleargs.cpp 27 Jun 2005 11:02:41 -0000 1.30
***************
*** 733,738 ****
break;
};
! default:
! OleSetTypeError("The VARIANT type is not supported for SAFEARRAYS");
}
if (FAILED(hres)) {
--- 733,741 ----
break;
};
! default: {
! TCHAR buf[200];
! wsprintf(buf, _T("The VARIANT type 0x%x is not supported for SAFEARRAYS"), vt);
! OleSetTypeErrorT(buf);
! }
}
if (FAILED(hres)) {
|