Alex Villacís Lasso <a_villacis(a)palosanto.com> writes:
+#define HANDLE_DISPATCH(left, right) \ + if ((V_VT(param_left) & VT_TYPEMASK) == VT_DISPATCH && \ + (V_VT(param_right) & VT_TYPEMASK) != VT_NULL) \ + {\ + HRESULT hres;\ + left = &tempLeft;\ + hres = VARIANT_FetchDispatchValue(param_left, left);\ + if (!SUCCEEDED(hres)) return hres;\ + }\ + if ((V_VT(param_right) & VT_TYPEMASK) == VT_DISPATCH &&\ + (V_VT(param_left) & VT_TYPEMASK) != VT_NULL)\ + {\ + HRESULT hres;\ + right = &tempRight;\ + hres = VARIANT_FetchDispatchValue(param_right, right);\ + if (!SUCCEEDED(hres)) return hres;\ + }
This macro is quite ugly. Also I don't see why you check the other variant against VT_NULL first, aren't there cases where you still need the other value? -- Alexandre Julliard julliard(a)winehq.org