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.
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.