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.
This commit is contained in:
parent
8f38cd8c8c
commit
702e2c6dc2
|
@ -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_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);
|
||||
|
|
Loading…
Reference in New Issue