oleaut32: preliminary support for VT_DISPATCH as parameters to VarAdd (and other 2-operand operations) (try 2) (RESEND)

Alexandre Julliard julliard at winehq.org
Tue Dec 19 07:19:04 CST 2006


Alex Villací­s Lasso <a_villacis at 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 at winehq.org



More information about the wine-devel mailing list