Rob Shearman : oleaut32:
Copy the value directly returned from the called function
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 6 15:23:22 CST 2007
Module: wine
Branch: master
Commit: 702e2c6dc2cb597c2d5263eec3ac021029d27074
URL: http://source.winehq.org/git/wine.git/?a=commit;h=702e2c6dc2cb597c2d5263eec3ac021029d27074
Author: Rob Shearman <rob at codeweavers.com>
Date: Tue Feb 6 19:24:51 2007 +0000
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.
---
dlls/oleaut32/tests/tmarshal.c | 5 +----
dlls/oleaut32/typelib.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index 933dd6b..833c9dd 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -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);
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 8cd4a79..f61f460 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -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);
More information about the wine-cvs
mailing list