Added patch to accept DISP_E_PARAMNOTFOUND for missing optional param in typelib implementation.

This commit is contained in:
Sebastian Lackner 2016-12-21 00:28:39 +01:00
parent 19e7aeae51
commit 2039446ec5
3 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,27 @@
From 3b9f7f03dbf5a8b1483cf0fda5e9c8e7fc762685 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 13 Dec 2016 18:30:45 +0800
Subject: oleaut32: Gracefully handle a failure to convert an optional param in
typelib's Invoke implementation. (v2)
---
dlls/oleaut32/typelib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 4fdfbeb..c0f9937 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -7026,7 +7026,8 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
break;
}
}
- else if (src_arg)
+ else if (src_arg && !((wParamFlags & PARAMFLAG_FOPT) &&
+ V_VT(src_arg) == VT_ERROR && V_ERROR(src_arg) == DISP_E_PARAMNOTFOUND))
{
TRACE("%s\n", debugstr_variant(src_arg));
--
2.9.0

View File

@ -0,0 +1 @@
Fixes: [41488] Accept DISP_E_PARAMNOTFOUND for missing optional param in typelib implementation

View File

@ -257,6 +257,7 @@ patch_enable_all ()
enable_ole32_HGLOBALStream="$1"
enable_ole32_OleGetIconOfFile="$1"
enable_oleaut32_CreateTypeLib="$1"
enable_oleaut32_ITypeInfo_fnInvoke="$1"
enable_oleaut32_LoadTypeLibEx="$1"
enable_oleaut32_Load_Save_EMF="$1"
enable_oleaut32_OLEPictureImpl_SaveAsFile="$1"
@ -954,6 +955,9 @@ patch_enable ()
oleaut32-CreateTypeLib)
enable_oleaut32_CreateTypeLib="$2"
;;
oleaut32-ITypeInfo_fnInvoke)
enable_oleaut32_ITypeInfo_fnInvoke="$2"
;;
oleaut32-LoadTypeLibEx)
enable_oleaut32_LoadTypeLibEx="$2"
;;
@ -5728,6 +5732,21 @@ if test "$enable_oleaut32_CreateTypeLib" -eq 1; then
) >> "$patchlist"
fi
# Patchset oleaut32-ITypeInfo_fnInvoke
# |
# | This patchset fixes the following Wine bugs:
# | * [#41488] Accept DISP_E_PARAMNOTFOUND for missing optional param in typelib implementation
# |
# | Modified files:
# | * dlls/oleaut32/typelib.c
# |
if test "$enable_oleaut32_ITypeInfo_fnInvoke" -eq 1; then
patch_apply oleaut32-ITypeInfo_fnInvoke/0001-oleaut32-Gracefully-handle-a-failure-to-convert-an-o.patch
(
echo '+ { "Dmitry Timoshkov", "oleaut32: Gracefully handle a failure to convert an optional param in typelib'\''s Invoke implementation.", 2 },';
) >> "$patchlist"
fi
# Patchset oleaut32-LoadTypeLibEx
# |
# | This patchset fixes the following Wine bugs: