oleaut32: preliminary support for VT_DISPATCH as parameters to VarAdd (and other 2-operand operations) (RESEND)
This is a preliminary patch to add support for VT_DISPATCH as parameters to VarAdd and other arithmetic operations with variants. The tests still "pass" in the sense that null VT_DISPATCH as issued by the tests are still rejected. I post this in the hope that it will be reviewed while I prepare a test case. Changelog: * Add support for receiving of VT_DISPATCH parameters in several operator functions by fetching the result value, then reissuing the same operation on result data. -- The following cryptic message was allegedly found in the inner edge of a Windows XP installation CD: 4F6E65204F5320746F2072756C65207468656D20616C6C2C204F6E65204F5320746F2066696E6420 7468656D2C0D0A4F6E65204F5320746F206272696E67207468656D20616C6C20616E6420696E2074 6865206461726B6E6573732062696E64207468656D2E0A It is rumored that only a true Unix Wizard can decypher this mysterious message, which supposedly encodes the true nature and purpose of the software.
Alex Villacís Lasso wrote:
@@ -3114,6 +3155,13 @@ debugstr_VF(left), right, debugstr_VT(right), debugstr_VF(right), result);
+ /* Handle VT_DISPATCH by recursively calling op on result of IDispatch_Invoke */ + if (((V_VT(left) & VT_TYPEMASK) == VT_DISPATCH || + (V_VT(right) & VT_TYPEMASK) == VT_DISPATCH) && + (V_VT(left) & VT_TYPEMASK) != VT_NULL && + (V_VT(right) & VT_TYPEMASK) != VT_NULL) + return VARIANT_InvokeDispatchOp(left, right, result, VarAdd); + VariantInit(&lv); VariantInit(&rv); VariantInit(&tv);
I think you could solve this without recursion, in the same way that other types are coerced. -- Rob Shearman
participants (2)
-
Alex Villacís Lasso -
Robert Shearman