[OLE #132] Fix IDispatch::Invoke Proxy

Huw D M Davies h.davies1 at physics.ox.ac.uk
Mon Oct 31 08:01:06 CST 2005


        Huw Davies <huw at codeweavers.com>
        Deal with pExcepInfo == NULL
-- 
Huw Davies
huw at codeweavers.com
Index: dlls/oleaut32/usrmarshal.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/usrmarshal.c,v
retrieving revision 1.11
diff -u -p -r1.11 usrmarshal.c
--- dlls/oleaut32/usrmarshal.c	20 Oct 2005 11:35:30 -0000	1.11
+++ dlls/oleaut32/usrmarshal.c	31 Oct 2005 13:57:15 -0000
@@ -537,6 +537,7 @@ HRESULT CALLBACK IDispatch_Invoke_Proxy(
   VARIANTARG* rgVarRef = NULL;
   UINT u, cVarRef;
   UINT uArgErr;
+  EXCEPINFO ExcepInfo;
 
   TRACE("(%p)->(%ld,%s,%lx,%x,%p,%p,%p,%p)\n", This,
         dispIdMember, debugstr_guid(riid),
@@ -546,6 +547,7 @@ HRESULT CALLBACK IDispatch_Invoke_Proxy(
   /* [out] args can't be null, use dummy vars if needed */
   if (!pVarResult) pVarResult = &VarResult;
   if (!puArgErr) puArgErr = &uArgErr;
+  if (!pExcepInfo) pExcepInfo = &ExcepInfo;
 
   /* count by-ref args */
   for (cVarRef=0,u=0; u<pDispParams->cArgs; u++) {
@@ -596,6 +598,13 @@ HRESULT CALLBACK IDispatch_Invoke_Proxy(
     CoTaskMemFree(rgVarRef);
     CoTaskMemFree(rgVarRefIdx);
   }
+
+  if(pExcepInfo == &ExcepInfo)
+  {
+    SysFreeString(pExcepInfo->bstrSource);
+    SysFreeString(pExcepInfo->bstrDescription);
+    SysFreeString(pExcepInfo->bstrHelpFile);
+  }
   return hr;
 }
 



More information about the wine-patches mailing list