Commit 25d6e9ae authored by Alessandro Pignotti's avatar Alessandro Pignotti Committed by Alexandre Julliard

oleaut32: Avoid converting variants if it is not needed.

parent a1af8395
...@@ -6427,6 +6427,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( ...@@ -6427,6 +6427,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
{ {
dump_Variant(src_arg); dump_Variant(src_arg);
if(rgvt[i]!=V_VT(src_arg))
{
if (rgvt[i] == VT_VARIANT) if (rgvt[i] == VT_VARIANT)
hres = VariantCopy(&rgvarg[i], src_arg); hres = VariantCopy(&rgvarg[i], src_arg);
else if (rgvt[i] == (VT_VARIANT | VT_BYREF)) else if (rgvt[i] == (VT_VARIANT | VT_BYREF))
...@@ -6505,6 +6507,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( ...@@ -6505,6 +6507,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
} }
prgpvarg[i] = &rgvarg[i]; prgpvarg[i] = &rgvarg[i];
} }
else
{
prgpvarg[i] = src_arg;
}
}
else if (wParamFlags & PARAMFLAG_FOPT) else if (wParamFlags & PARAMFLAG_FOPT)
{ {
VARIANTARG *arg; VARIANTARG *arg;
......
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