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

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jul 13 10:12:31 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: f9c9a2bf3d97bfecc1f3ab8edf4ccb3f5e5d3133
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=f9c9a2bf3d97bfecc1f3ab8edf4ccb3f5e5d3133

Author: Robert Shearman <rob at codeweavers.com>
Date:   Thu Jul 13 13:07:36 2006 +0100

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

---

 dlls/oleaut32/typelib.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index ccb5829..d539cd6 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -5363,9 +5363,16 @@ static HRESULT WINAPI ITypeInfo_fnInvoke
                 goto func_fail; /* FIXME: we don't free changed types here */
             }
 
-            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 */
+            /* VT_VOID is a special case for return types, so it is not
+             * handled in the general function */
+            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,
                                 V_VT(&varresult), func_desc->cParams, rgvt,




More information about the wine-cvs mailing list