Commit f9c9a2bf authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

oleaut32: Convert void return types to the VT_EMPTY variant type in ITypeInfo::Invoke.

parent 797bdbc2
...@@ -5363,9 +5363,16 @@ static HRESULT WINAPI ITypeInfo_fnInvoke( ...@@ -5363,9 +5363,16 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
goto func_fail; /* FIXME: we don't free changed types here */ goto func_fail; /* FIXME: we don't free changed types here */
} }
V_VT(&varresult) = 0; /* VT_VOID is a special case for return types, so it is not
hres = typedescvt_to_variantvt((ITypeInfo *)iface, &func_desc->elemdescFunc.tdesc, &V_VT(&varresult)); * handled in the general function */
if (FAILED(hres)) goto func_fail; /* FIXME: we don't free changed types here */ if (func_desc->elemdescFunc.tdesc.vt == VT_VOID)
V_VT(&varresult) = VT_EMPTY;
else
{
V_VT(&varresult) = 0;
hres = typedescvt_to_variantvt((ITypeInfo *)iface, &func_desc->elemdescFunc.tdesc, &V_VT(&varresult));
if (FAILED(hres)) goto func_fail; /* FIXME: we don't free changed types here */
}
hres = DispCallFunc(pIUnk, func_desc->oVft, func_desc->callconv, hres = DispCallFunc(pIUnk, func_desc->oVft, func_desc->callconv,
V_VT(&varresult), func_desc->cParams, rgvt, V_VT(&varresult), func_desc->cParams, rgvt,
......
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