Re: [v3 PATCH] oleaut32: Improve support for IDispatch in VarCat
Hi Alistair, The patch looks mostly good now. On 26.05.2017 07:13, Alistair Leslie-Hughes wrote:
+ hres = VariantChangeTypeEx(&bstrvar_left,tmp,0,VARIANT_ALPHABOOL|VARIANT_LOCALBOOL,VT_BSTR); + if (hres == DISP_E_TYPEMISMATCH) {
It seems that might be the right thing to do, but one more test would make sure about that. Please add a test that will hit this case without VT_DISPATCH nor VT_NULL, since both of them are kind of special. As far as I can see, a VT_BYREF with NULL reference would be good for that.
- hres = VariantChangeTypeEx(&bstrvar_left,left,0,VARIANT_ALPHABOOL|VARIANT_LOCALBOOL,VT_BSTR); - if (hres != S_OK) { - VariantClear(&bstrvar_left); - VariantClear(&bstrvar_right); - return hres; - } + V_VT(&bstrvar_left) = VT_BSTR; + V_BSTR(&bstrvar_left) = SysAllocString(sz_empty);
You could just set it to NULL. Thanks, Jacek
participants (1)
-
Jacek Caban