Rob Shearman : oleaut32: If an error info object was created when the invoked method failed then fill in exception info from the error info object .

Alexandre Julliard julliard at wine.codeweavers.com
Tue Feb 6 15:23:20 CST 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Feb  6 19:23:33 2007 +0000

oleaut32: If an error info object was created when the invoked method failed then fill in exception info from the error info object.

---

 dlls/oleaut32/typelib.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 4970f23..47f721b 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -5665,7 +5665,20 @@ static HRESULT WINAPI ITypeInfo_fnInvoke
             {
                 WARN("invoked function failed with error 0x%08x\n", V_ERROR(&varresult));
                 hres = DISP_E_EXCEPTION;
-                if (pExcepInfo) pExcepInfo->scode = V_ERROR(&varresult);
+                if (pExcepInfo)
+                {
+                    IErrorInfo *pErrorInfo;
+                    pExcepInfo->scode = V_ERROR(&varresult);
+                    if (GetErrorInfo(0, &pErrorInfo) == S_OK)
+                    {
+                        IErrorInfo_GetDescription(pErrorInfo, &pExcepInfo->bstrDescription);
+                        IErrorInfo_GetHelpFile(pErrorInfo, &pExcepInfo->bstrHelpFile);
+                        IErrorInfo_GetSource(pErrorInfo, &pExcepInfo->bstrSource);
+                        IErrorInfo_GetHelpContext(pErrorInfo, &pExcepInfo->dwHelpContext);
+
+                        IErrorInfo_Release(pErrorInfo);
+                    }
+                }
             }
 
 func_fail:




More information about the wine-cvs mailing list