[PATCH 1/2] propsys: Implement VariantToStringWithDefault.

Nikolay Sivov nsivov at codeweavers.com
Thu Mar 24 23:32:34 CDT 2022


On 3/25/22 04:44, Mohamad Al-Jaf wrote:
> +/******************************************************************
> + *  VariantToStringWithDefault   (PROPSYS.@)
> + */
> +PCWSTR WINAPI VariantToStringWithDefault(const VARIANT *pvar, LPCWSTR pszDefault)
> +{
> +    TRACE("(%p, %s)\n", pvar, debugstr_w(pszDefault));
> +
> +    if (V_VT(pvar) == VT_BSTR)
> +    {
> +        if (V_BSTR(pvar) == NULL)
> +            return L"";
> +
> +        return V_BSTR(pvar);
> +    }
> +
> +    return pszDefault;
> +}
This feels incomplete. There is at least a BYREF case, but also it's 
possible to have a nested variant ref.



More information about the wine-devel mailing list