[PATCH 5/9] oleaut32: If an error info object was created when the
invoked method failed then fill in exception info from the error
info object.
Robert Shearman
rob at codeweavers.com
Tue Feb 6 13:23:33 CST 2007
---
dlls/oleaut32/typelib.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 9525ee8..a21aeec 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -5658,7 +5658,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-patches
mailing list