From 2039446ec514a3a76bb722718ac48486e30fa1d8 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 21 Dec 2016 00:28:39 +0100 Subject: [PATCH] Added patch to accept DISP_E_PARAMNOTFOUND for missing optional param in typelib implementation. --- ...lly-handle-a-failure-to-convert-an-o.patch | 27 +++++++++++++++++++ .../oleaut32-ITypeInfo_fnInvoke/definition | 1 + patches/patchinstall.sh | 19 +++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 patches/oleaut32-ITypeInfo_fnInvoke/0001-oleaut32-Gracefully-handle-a-failure-to-convert-an-o.patch create mode 100644 patches/oleaut32-ITypeInfo_fnInvoke/definition diff --git a/patches/oleaut32-ITypeInfo_fnInvoke/0001-oleaut32-Gracefully-handle-a-failure-to-convert-an-o.patch b/patches/oleaut32-ITypeInfo_fnInvoke/0001-oleaut32-Gracefully-handle-a-failure-to-convert-an-o.patch new file mode 100644 index 00000000..1c47ca0d --- /dev/null +++ b/patches/oleaut32-ITypeInfo_fnInvoke/0001-oleaut32-Gracefully-handle-a-failure-to-convert-an-o.patch @@ -0,0 +1,27 @@ +From 3b9f7f03dbf5a8b1483cf0fda5e9c8e7fc762685 Mon Sep 17 00:00:00 2001 +From: Dmitry Timoshkov +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 + diff --git a/patches/oleaut32-ITypeInfo_fnInvoke/definition b/patches/oleaut32-ITypeInfo_fnInvoke/definition new file mode 100644 index 00000000..dd15fcf7 --- /dev/null +++ b/patches/oleaut32-ITypeInfo_fnInvoke/definition @@ -0,0 +1 @@ +Fixes: [41488] Accept DISP_E_PARAMNOTFOUND for missing optional param in typelib implementation diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 27e4b7dc..6b2f5278 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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: