Commit cfb219f9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Don't overwrite type of result if property type is VT_VARIANT.

parent 465eca3e
......@@ -825,7 +825,8 @@ static HRESULT builtin_propget(DispatchEx *This, func_info_t *func, DISPPARAMS *
if(FAILED(hres))
return hres;
V_VT(res) = func->prop_vt == VT_PTR ? VT_DISPATCH : func->prop_vt;
if(func->prop_vt != VT_VARIANT)
V_VT(res) = func->prop_vt == VT_PTR ? VT_DISPATCH : func->prop_vt;
return S_OK;
}
......
......@@ -1854,6 +1854,14 @@ static HRESULT dispex_propput(IDispatchEx *obj, DISPID id, DWORD flags, VARIANT
return IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT|flags, &dp, NULL, &ei, caller_sp);
}
static HRESULT dispex_propget(IDispatchEx *obj, DISPID id, VARIANT *res, IServiceProvider *caller_sp)
{
DISPPARAMS dp = {NULL};
EXCEPINFO ei = {0};
return IDispatchEx_InvokeEx(obj, id, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dp, res, &ei, caller_sp);
}
static void test_func(IDispatchEx *obj)
{
DISPID id;
......@@ -1999,6 +2007,12 @@ static void test_arg_conv(IHTMLWindow2 *window)
CHECK_CALLED(QS_VariantConversion);
CHECK_CALLED(ChangeType);
V_VT(&v) = VT_EMPTY;
hres = dispex_propget(dispex, DISPID_IHTMLBODYELEMENT_BGCOLOR, &v, &caller_sp);
ok(hres == S_OK, "InvokeEx failed: %08x\n", hres);
ok(V_VT(&v) == VT_BSTR, "V_VT(var)=%d\n", V_VT(&v));
ok(!V_BSTR(&v), "V_BSTR(&var) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
IDispatchEx_Release(dispex);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment