Rebase against d9c7d4147b569553bc97ef57c6200002fe81565e.

This commit is contained in:
Zebediah Figura 2018-11-14 23:14:57 -06:00
parent 3e32c05e8f
commit 9d04d98ec8
10 changed files with 35 additions and 188 deletions

View File

@ -1,53 +0,0 @@
From a384e6c403791a448378244dd10773f85fea0822 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Nov 2015 23:36:25 +0100
Subject: oleaut32: Pass a HREFTYPE to get_iface_guid.
---
dlls/oleaut32/typelib.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 0891098..deb898a 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -6612,13 +6612,13 @@ static HRESULT typedescvt_to_variantvt(ITypeInfo *tinfo, const TYPEDESC *tdesc,
return hr;
}
-static HRESULT get_iface_guid(ITypeInfo *tinfo, const TYPEDESC *tdesc, GUID *guid)
+static HRESULT get_iface_guid(ITypeInfo *tinfo, HREFTYPE href, GUID *guid)
{
ITypeInfo *tinfo2;
TYPEATTR *tattr;
HRESULT hres;
- hres = ITypeInfo_GetRefTypeInfo(tinfo, tdesc->u.hreftype, &tinfo2);
+ hres = ITypeInfo_GetRefTypeInfo(tinfo, href, &tinfo2);
if(FAILED(hres))
return hres;
@@ -6630,7 +6630,7 @@ static HRESULT get_iface_guid(ITypeInfo *tinfo, const TYPEDESC *tdesc, GUID *gui
switch(tattr->typekind) {
case TKIND_ALIAS:
- hres = get_iface_guid(tinfo2, &tattr->tdescAlias, guid);
+ hres = get_iface_guid(tinfo2, tattr->tdescAlias.u.hreftype, guid);
break;
case TKIND_INTERFACE:
@@ -7156,7 +7156,10 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
IUnknown *userdefined_iface;
GUID guid;
- hres = get_iface_guid((ITypeInfo*)iface, tdesc->vt == VT_PTR ? tdesc->u.lptdesc : tdesc, &guid);
+ if (tdesc->vt == VT_PTR)
+ tdesc = tdesc->u.lptdesc;
+
+ hres = get_iface_guid((ITypeInfo*)iface, tdesc->u.hreftype, &guid);
if(FAILED(hres))
break;
--
2.6.2

View File

@ -1,53 +0,0 @@
From 17b8cc4be95844c05061f6a6a218e391a1dcdc5f Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Nov 2015 23:45:18 +0100
Subject: [PATCH 2/4] oleaut32: Implement ITypeInfo_fnInvoke for TKIND_COCLASS
in arguments.
---
dlls/oleaut32/tests/tmarshal.c | 2 +-
dlls/oleaut32/typelib.c | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index f2197425..06c5d3a2 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -2410,7 +2410,7 @@ static void test_typelibmarshal(void)
dispparams.rgvarg = vararg;
VariantInit(&varresult);
hr = IDispatch_Invoke(pDispatch, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
- todo_wine ok_ole_success(hr, IDispatch_Invoke);
+ ok_ole_success(hr, IDispatch_Invoke);
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
excepinfo.wCode, excepinfo.scode);
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 2af6a946..6e479243 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -6625,6 +6625,21 @@ static HRESULT get_iface_guid(ITypeInfo *tinfo, HREFTYPE href, GUID *guid)
*guid = tattr->guid;
break;
+ case TKIND_COCLASS: {
+ unsigned int i;
+ int type_flags;
+
+ for(i = 0; i < tattr->cImplTypes; i++)
+ if(SUCCEEDED(ITypeInfo_GetImplTypeFlags(tinfo2, i, &type_flags)) &&
+ type_flags == (IMPLTYPEFLAG_FSOURCE|IMPLTYPEFLAG_FDEFAULT)) break;
+
+ if(i < tattr->cImplTypes) {
+ hres = ITypeInfo_GetRefTypeOfImplType(tinfo2, i, &href);
+ if(SUCCEEDED(hres)) hres = get_iface_guid(tinfo2, href, guid);
+ } else hres = E_UNEXPECTED;
+ break;
+ }
+
default:
ERR("Unexpected typekind %d\n", tattr->typekind);
hres = E_UNEXPECTED;
--
2.19.1

View File

@ -1,28 +0,0 @@
From 5f9c268b7e4022d3dd9cf92f6ab04f1c825d2bfa Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 Nov 2015 00:40:07 +0100
Subject: oleaut32/tests: Add a test for TKIND_COCLASS in proxy/stub
marshalling.
---
dlls/oleaut32/tests/tmarshal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index 758b85f..c28ef8b 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -1519,6 +1519,10 @@ static void test_typelibmarshal(void)
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
excepinfo.wCode, excepinfo.scode);
VariantClear(&varresult);
+
+ /* call CoClass (direct) */
+ hr = IWidget_Coclass(pWidget, (void *)V_DISPATCH(&vararg[0]));
+ ok_ole_success(hr, IWidget_Coclass);
VariantClear(&vararg[0]);
/* call Value with a VT_VARIANT|VT_BYREF type */
--
2.6.2

View File

@ -1,2 +0,0 @@
Fixes: [19016] Implement marshalling for TKIND_COCLASS
Fixes: [39799] Implement ITypeInfo_fnInvoke for TKIND_COCLASS

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "ead7e637c0d18760acd446d686ad18526e76e0f0"
echo "d9c7d4147b569553bc97ef57c6200002fe81565e"
}
# Show version information
@ -255,7 +255,6 @@ patch_enable_all ()
enable_oleaut32_OLEPictureImpl_SaveAsFile="$1"
enable_oleaut32_OleLoadPicture="$1"
enable_oleaut32_OleLoadPictureFile="$1"
enable_oleaut32_TKIND_COCLASS="$1"
enable_opengl32_wglChoosePixelFormat="$1"
enable_packager_DllMain="$1"
enable_quartz_MediaSeeking_Positions="$1"
@ -931,9 +930,6 @@ patch_enable ()
oleaut32-OleLoadPictureFile)
enable_oleaut32_OleLoadPictureFile="$2"
;;
oleaut32-TKIND_COCLASS)
enable_oleaut32_TKIND_COCLASS="$2"
;;
opengl32-wglChoosePixelFormat)
enable_opengl32_wglChoosePixelFormat="$2"
;;
@ -1762,6 +1758,13 @@ if test "$enable_ws2_32_TransmitFile" -eq 1; then
enable_server_Desktop_Refcount=1
fi
if test "$enable_wmvcore_WMCreateSyncReaderPriv" -eq 1; then
if test "$enable_wmvcore_WMCheckURlExtension" -gt 1; then
abort "Patchset wmvcore-WMCheckURlExtension disabled, but wmvcore-WMCreateSyncReaderPriv depends on that."
fi
enable_wmvcore_WMCheckURlExtension=1
fi
if test "$enable_wintrust_WTHelperGetProvCertFromChain" -eq 1; then
if test "$enable_wintrust_WinVerifyTrust" -gt 1; then
abort "Patchset wintrust-WinVerifyTrust disabled, but wintrust-WTHelperGetProvCertFromChain depends on that."
@ -5491,26 +5494,6 @@ if test "$enable_oleaut32_OleLoadPictureFile" -eq 1; then
) >> "$patchlist"
fi
# Patchset oleaut32-TKIND_COCLASS
# |
# | This patchset fixes the following Wine bugs:
# | * [#19016] Implement marshalling for TKIND_COCLASS
# | * [#39799] Implement ITypeInfo_fnInvoke for TKIND_COCLASS
# |
# | Modified files:
# | * dlls/oleaut32/tests/tmarshal.c, dlls/oleaut32/typelib.c
# |
if test "$enable_oleaut32_TKIND_COCLASS" -eq 1; then
patch_apply oleaut32-TKIND_COCLASS/0001-oleaut32-Pass-a-HREFTYPE-to-get_iface_guid.patch
patch_apply oleaut32-TKIND_COCLASS/0002-oleaut32-Implement-ITypeInfo_fnInvoke-for-TKIND_COCL.patch
patch_apply oleaut32-TKIND_COCLASS/0004-oleaut32-tests-Add-a-test-for-TKIND_COCLASS-in-proxy.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "oleaut32: Pass a HREFTYPE to get_iface_guid.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "oleaut32: Implement ITypeInfo_fnInvoke for TKIND_COCLASS in arguments.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "oleaut32/tests: Add a test for TKIND_COCLASS in proxy/stub marshalling.", 1 },';
) >> "$patchlist"
fi
# Patchset opengl32-wglChoosePixelFormat
# |
# | This patchset fixes the following Wine bugs:
@ -7911,6 +7894,9 @@ fi
# Patchset wmvcore-WMCreateSyncReaderPriv
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * wmvcore-WMCheckURlExtension
# |
# | This patchset fixes the following Wine bugs:
# | * [#37327] wmvcore: Implement WMCreateSyncReaderPriv
# |

View File

@ -1,14 +1,14 @@
From 813a2e94c759d826262892ad99fe284e4a57cb44 Mon Sep 17 00:00:00 2001
From c86938426ec3acafea2faa8d9ad24a065f44fbd1 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 7 Jan 2016 17:38:17 +0800
Subject: widl: Add support for structures.
---
tools/widl/write_sltg.c | 586 +++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 553 insertions(+), 33 deletions(-)
tools/widl/write_sltg.c | 584 +++++++++++++++++++++++++++++++++++++---
1 file changed, 551 insertions(+), 33 deletions(-)
diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c
index 45cac80..11b4d0c 100644
index c4ddaed9..f71d3d5b 100644
--- a/tools/widl/write_sltg.c
+++ b/tools/widl/write_sltg.c
@@ -1,7 +1,7 @@
@ -380,7 +380,7 @@ index 45cac80..11b4d0c 100644
+
+ case VT_INT:
+ case VT_UINT:
+ return typelib_kind == SYS_WIN16 ? 2 : 4;
+ return /* typelib_kind == SYS_WIN16 ? 2 : */ 4;
+
+ case VT_UI2:
+ case VT_I2:
@ -749,12 +749,8 @@ index 45cac80..11b4d0c 100644
sltg_write_nametable(typelib);
sltg_write_remainder();
@@ -536,8 +1052,12 @@ int create_sltg_typelib(typelib_t *typelib)
struct sltg_typelib sltg;
const statement_t *stmt;
@@ -537,6 +1053,8 @@ int create_sltg_typelib(typelib_t *typelib)
+ pointer_size = (typelib_kind == SYS_WIN64) ? 8 : 4;
+
sltg.typelib = typelib;
sltg.typeinfo_count = 0;
+ sltg.typeinfo_size = 0;
@ -763,5 +759,5 @@ index 45cac80..11b4d0c 100644
sltg.n_file_blocks = 0;
sltg.first_block = 1;
--
2.6.4
2.19.1

View File

@ -1,4 +1,4 @@
From 179b74aeee8d4bf7a35b3a57d9395e4040175900 Mon Sep 17 00:00:00 2001
From 9bdee4f88ef67ad2d6fddaba4712cd786d05a024 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 10 Jan 2016 16:01:55 +0800
Subject: widl: Write correct syskind by SLTG typelib generator.
@ -8,7 +8,7 @@ Subject: widl: Write correct syskind by SLTG typelib generator.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c
index 4b86bf9..61632ee 100644
index d833edfe..df3acc2f 100644
--- a/tools/widl/write_sltg.c
+++ b/tools/widl/write_sltg.c
@@ -232,7 +232,7 @@ static void init_library(struct sltg_typelib *sltg)
@ -16,10 +16,10 @@ index 4b86bf9..61632ee 100644
sltg->library.helpstring = NULL;
sltg->library.helpcontext = 0;
- sltg->library.syskind = SYS_WIN32;
+ sltg->library.syskind = typelib_kind;
+ sltg->library.syskind = (pointer_size == 8) ? SYS_WIN64 : SYS_WIN32;
sltg->library.lcid = 0x0409;
sltg->library.libflags = 0;
sltg->library.version = 0;
--
2.6.4
2.19.1

View File

@ -1,4 +1,4 @@
From b7e44becb728a5e250d34819501a0e7919e48265 Mon Sep 17 00:00:00 2001
From 0a528bf3c1c5b19f497e1a9f0848b6e191394a88 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Wed, 20 Jan 2016 13:26:49 +0800
Subject: widl: Create library block index right after the CompObj one.
@ -9,7 +9,7 @@ Otherwise Wine's oleaut32 refuses to load a typelib.
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/tools/widl/write_sltg.c b/tools/widl/write_sltg.c
index ffecb59..bf2ba5f 100644
index 79c0f0ee..650fdfa7 100644
--- a/tools/widl/write_sltg.c
+++ b/tools/widl/write_sltg.c
@@ -374,15 +374,13 @@ static void init_library(struct sltg_typelib *sltg)
@ -76,16 +76,16 @@ index ffecb59..bf2ba5f 100644
}
static const char *new_index_name(void)
@@ -1764,6 +1775,8 @@ int create_sltg_typelib(typelib_t *typelib)
@@ -1763,6 +1774,8 @@ int create_sltg_typelib(typelib_t *typelib)
{
struct sltg_typelib sltg;
const statement_t *stmt;
+ void *library_block;
+ int library_block_size, library_block_index;
pointer_size = (typelib_kind == SYS_WIN64) ? 8 : 4;
@@ -1779,11 +1792,13 @@ int create_sltg_typelib(typelib_t *typelib)
sltg.typelib = typelib;
sltg.typeinfo_count = 0;
@@ -1776,11 +1789,13 @@ int create_sltg_typelib(typelib_t *typelib)
init_name_table(&sltg);
init_library(&sltg);
@ -101,5 +101,5 @@ index ffecb59..bf2ba5f 100644
save_all_changes(&sltg);
--
2.6.4
2.19.1

View File

@ -1,4 +1,4 @@
From 3f9d49c152b1116b2349ad9cc9acf98da017f39a Mon Sep 17 00:00:00 2001
From bd3806f58fda1d13e1359cc06854b81e22ce15e2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Thu, 21 Jan 2016 02:51:56 +0100
Subject: widl: Add --oldtlb switch in usage message.
@ -8,11 +8,11 @@ Subject: widl: Add --oldtlb switch in usage message.
1 file changed, 1 insertion(+)
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index afeea39..c90b806 100644
index 9761fa4f..a8a76db6 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -65,6 +65,7 @@ static const char usage[] =
" -m32, -m64 Set the kind of typelib to build (Win32 or Win64)\n"
@@ -61,6 +61,7 @@ static const char usage[] =
" -m32, -m64 Set the target architecture (Win32 or Win64)\n"
" -N Do not preprocess input\n"
" --oldnames Use old naming conventions\n"
+" --oldtlb Use old typelib (SLTG) format\n"
@ -20,5 +20,5 @@ index afeea39..c90b806 100644
" -Otype Type of stubs to generate (-Os, -Oi, -Oif)\n"
" -p Generate proxy\n"
--
2.6.4
2.19.1

View File

@ -1 +1,2 @@
Fixes: [37327] wmvcore: Implement WMCreateSyncReaderPriv
Depends: wmvcore-WMCheckURlExtension