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

This commit is contained in:
Rob Shearman 2007-02-06 19:23:33 +00:00 committed by Alexandre Julliard
parent cb9c40a8cf
commit e2108feec4
1 changed files with 14 additions and 1 deletions

View File

@ -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: