Commit 702e2c6d authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

oleaut32: Copy the value directly returned from the called function

if it is not an HRESULT value, instead of getting it from a [retval] attribute.
parent 8f38cd8c
......@@ -998,10 +998,7 @@ static void test_typelibmarshal(void)
VariantInit(&varresult);
hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_BSTRRET, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
ok_ole_success(hr, ITypeInfo_Invoke);
todo_wine
{
ok(V_VT(&varresult) == VT_BSTR, "V_VT(&varresult) should be VT_BSTR instead of %d\n", V_VT(&varresult));
}
ok(V_VT(&varresult) == VT_BSTR, "V_VT(&varresult) should be VT_BSTR instead of %d\n", V_VT(&varresult));
ok(V_BSTR(&varresult) != NULL, "V_BSTR(&varresult) should not be NULL\n");
VariantClear(&varresult);
......
......@@ -5689,6 +5689,19 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
}
}
}
if (V_VT(&varresult) != VT_ERROR)
{
TRACE("varresult value: ");
dump_Variant(&varresult);
if (pVarResult)
{
VariantClear(pVarResult);
*pVarResult = varresult;
}
else
VariantClear(&varresult);
}
func_fail:
HeapFree(GetProcessHeap(), 0, buffer);
......
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