Rebase against b8719736c5a022fa9c50f64adfc3ef58b40460f2.

This commit is contained in:
Zebediah Figura 2021-02-18 20:16:43 -06:00
parent 811467bf6a
commit aa8a3d90cb
33 changed files with 301 additions and 3157 deletions

View File

@ -1,4 +1,4 @@
From 5706ea39b9a1074431d13e4c7354e0432af819a3 Mon Sep 17 00:00:00 2001
From 43cd59c9043af0c515b558c8dfeafdcabb93215c Mon Sep 17 00:00:00 2001
From: Paul Gofman <gofmanp@gmail.com>
Date: Thu, 4 Apr 2019 02:25:00 +0300
Subject: [PATCH] ddraw: Allow setting texture without DDSCAPS_TEXTURE for
@ -11,10 +11,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
2 files changed, 141 insertions(+), 7 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index 5bd5b2c7091..010fed30396 100644
index 33066329407..11a881522d9 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -4776,7 +4776,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
@@ -4775,7 +4775,8 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface,
struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture);
struct wined3d_texture *wined3d_texture = NULL;
@ -24,7 +24,7 @@ index 5bd5b2c7091..010fed30396 100644
if (surf && (surf->surface_desc.ddsCaps.dwCaps & DDSCAPS_TEXTURE))
wined3d_texture = surf->wined3d_texture;
@@ -4812,19 +4813,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
@@ -4811,19 +4812,30 @@ static HRESULT WINAPI d3d_device3_SetTexture(IDirect3DDevice3 *iface,
{
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
struct ddraw_surface *tex = unsafe_impl_from_IDirect3DTexture2(texture);
@ -59,10 +59,10 @@ index 5bd5b2c7091..010fed30396 100644
static const struct tss_lookup
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index d438132764f..1c6c227cc6b 100644
index 6e003fbfb7e..30f2282c12c 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -359,7 +359,7 @@ static IDirectDraw4 *create_ddraw(void)
@@ -427,7 +427,7 @@ static IDirectDraw4 *create_ddraw(void)
return ddraw4;
}
@ -71,7 +71,7 @@ index d438132764f..1c6c227cc6b 100644
{
IDirectDrawSurface4 *surface, *ds;
IDirect3DDevice3 *device = NULL;
@@ -379,6 +379,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -447,6 +447,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
@ -80,7 +80,7 @@ index d438132764f..1c6c227cc6b 100644
surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480;
@@ -407,7 +409,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -475,7 +477,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
}
memset(&z_fmt, 0, sizeof(z_fmt));
@ -90,7 +90,7 @@ index d438132764f..1c6c227cc6b 100644
if (FAILED(hr) || !z_fmt.dwSize)
{
IDirect3D3_Release(d3d3);
@@ -419,6 +422,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -487,6 +490,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
surface_desc.dwSize = sizeof(surface_desc);
surface_desc.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT;
surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
@ -99,7 +99,7 @@ index d438132764f..1c6c227cc6b 100644
U4(surface_desc).ddpfPixelFormat = z_fmt;
surface_desc.dwWidth = 640;
surface_desc.dwHeight = 480;
@@ -441,7 +446,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -509,7 +514,8 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
return NULL;
}
@ -109,7 +109,7 @@ index d438132764f..1c6c227cc6b 100644
IDirect3D3_Release(d3d3);
IDirectDrawSurface4_Release(surface);
if (FAILED(hr))
@@ -450,6 +456,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
@@ -518,6 +524,11 @@ static IDirect3DDevice3 *create_device(HWND window, DWORD coop_level)
return device;
}
@ -121,8 +121,8 @@ index d438132764f..1c6c227cc6b 100644
static IDirect3DViewport3 *create_viewport(IDirect3DDevice3 *device, UINT x, UINT y, UINT w, UINT h)
{
IDirect3DViewport3 *viewport;
@@ -17867,6 +17878,116 @@ done:
IDirectDraw4_Release(ddraw);
@@ -18331,6 +18342,116 @@ static void run_for_each_device_type(void (*test_func)(const GUID *))
test_func(&IID_IDirect3DRGBDevice);
}
+static void test_texture_wrong_caps_(BOOL software)
@ -238,7 +238,7 @@ index d438132764f..1c6c227cc6b 100644
START_TEST(ddraw4)
{
DDDEVICEIDENTIFIER identifier;
@@ -17999,6 +18120,7 @@ START_TEST(ddraw4)
@@ -18463,6 +18584,7 @@ START_TEST(ddraw4)
test_gdi_surface();
test_alphatest();
test_clipper_refcount();
@ -247,5 +247,5 @@ index d438132764f..1c6c227cc6b 100644
test_d32_support();
test_surface_format_conversion_alpha();
--
2.28.0
2.20.1

View File

@ -1,26 +1,24 @@
From 484d1c91138f4122cfa56d9e9cad87d17d97d82c Mon Sep 17 00:00:00 2001
From ea0fedf84c544522583b39bdd78a30b2d7a52a41 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:41:57 -0500
Subject: [PATCH] d3dpmesh: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/d3dpmesh/Makefile.in | 8 +++++++
dlls/d3dpmesh/d3dpmesh.spec | 1 +
dlls/d3dpmesh/d3dpmesh_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/d3dpmesh/version.rc | 26 ++++++++++++++++++++++
5 files changed, 78 insertions(+)
configure.ac | 1 +
dlls/d3dpmesh/Makefile.in | 6 ++++++
dlls/d3dpmesh/d3dpmesh.spec | 1 +
dlls/d3dpmesh/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 dlls/d3dpmesh/Makefile.in
create mode 100644 dlls/d3dpmesh/d3dpmesh.spec
create mode 100644 dlls/d3dpmesh/d3dpmesh_main.c
create mode 100644 dlls/d3dpmesh/version.rc
diff --git a/configure.ac b/configure.ac
index dafa8489b71..0672b0ad816 100644
index c80e2691f65..25e1ef17993 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3103,6 +3103,7 @@ WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47)
@@ -3124,6 +3124,7 @@ WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47)
WINE_CONFIG_MAKEFILE(dlls/d3dcompiler_47/tests)
WINE_CONFIG_MAKEFILE(dlls/d3dim)
WINE_CONFIG_MAKEFILE(dlls/d3dim700)
@ -30,16 +28,14 @@ index dafa8489b71..0672b0ad816 100644
WINE_CONFIG_MAKEFILE(dlls/d3dx10_33)
diff --git a/dlls/d3dpmesh/Makefile.in b/dlls/d3dpmesh/Makefile.in
new file mode 100644
index 00000000000..2a7546832c2
index 00000000000..334dacd1090
--- /dev/null
+++ b/dlls/d3dpmesh/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = d3dpmesh.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ d3dpmesh_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/d3dpmesh/d3dpmesh.spec b/dlls/d3dpmesh/d3dpmesh.spec
@ -49,54 +45,6 @@ index 00000000000..d4b9a46bd7a
+++ b/dlls/d3dpmesh/d3dpmesh.spec
@@ -0,0 +1 @@
+@ stub CreateD3DRMPMeshVisual
diff --git a/dlls/d3dpmesh/d3dpmesh_main.c b/dlls/d3dpmesh/d3dpmesh_main.c
new file mode 100644
index 00000000000..3d84a693a45
--- /dev/null
+++ b/dlls/d3dpmesh/d3dpmesh_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3dpmesh);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/d3dpmesh/version.rc b/dlls/d3dpmesh/version.rc
new file mode 100644
index 00000000000..87e601a95a7
@ -130,5 +78,5 @@ index 00000000000..87e601a95a7
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 4bf34b5b1a03c6a92211ed5bbb54e6070c28b569 Mon Sep 17 00:00:00 2001
From 08a6b78031ae7b2b9fb042c3d411d4366a19d81c Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:43:09 -0500
Subject: [PATCH] diactfrm: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/diactfrm/Makefile.in | 8 +++++++
dlls/diactfrm/diactfrm.spec | 4 ++++
dlls/diactfrm/diactfrm_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/diactfrm/version.rc | 26 ++++++++++++++++++++++
5 files changed, 81 insertions(+)
configure.ac | 1 +
dlls/diactfrm/Makefile.in | 6 ++++++
dlls/diactfrm/diactfrm.spec | 4 ++++
dlls/diactfrm/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 dlls/diactfrm/Makefile.in
create mode 100644 dlls/diactfrm/diactfrm.spec
create mode 100644 dlls/diactfrm/diactfrm_main.c
create mode 100644 dlls/diactfrm/version.rc
diff --git a/configure.ac b/configure.ac
index 0672b0ad816..12efadbab64 100644
index 25e1ef17993..8a7a58d413e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3161,6 +3161,7 @@ WINE_CONFIG_MAKEFILE(dlls/devenum/tests)
@@ -3182,6 +3182,7 @@ WINE_CONFIG_MAKEFILE(dlls/devenum/tests)
WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc)
WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc/tests)
WINE_CONFIG_MAKEFILE(dlls/dhtmled.ocx)
@ -30,16 +28,14 @@ index 0672b0ad816..12efadbab64 100644
WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
diff --git a/dlls/diactfrm/Makefile.in b/dlls/diactfrm/Makefile.in
new file mode 100644
index 00000000000..7d83e518017
index 00000000000..9f6ec3cd702
--- /dev/null
+++ b/dlls/diactfrm/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = diactfrm.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ diactfrm_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/diactfrm/diactfrm.spec b/dlls/diactfrm/diactfrm.spec
@ -52,54 +48,6 @@ index 00000000000..c5fc87af6d5
+@ stub DllGetClassObject
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
diff --git a/dlls/diactfrm/diactfrm_main.c b/dlls/diactfrm/diactfrm_main.c
new file mode 100644
index 00000000000..309374507bb
--- /dev/null
+++ b/dlls/diactfrm/diactfrm_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(diactfrm);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/diactfrm/version.rc b/dlls/diactfrm/version.rc
new file mode 100644
index 00000000000..b6b6692b831
@ -133,5 +81,5 @@ index 00000000000..b6b6692b831
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From e60fe7940374842cbf933321d10c1b55161b998f Mon Sep 17 00:00:00 2001
From 04da45fd650835f28b16c19942e547482b4375e7 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:43:19 -0500
Subject: [PATCH] dimap: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dimap/Makefile.in | 8 ++++++++
dlls/dimap/dimap.spec | 2 ++
dlls/dimap/dimap_main.c | 42 +++++++++++++++++++++++++++++++++++++++++
dlls/dimap/version.rc | 26 +++++++++++++++++++++++++
5 files changed, 79 insertions(+)
configure.ac | 1 +
dlls/dimap/Makefile.in | 6 ++++++
dlls/dimap/dimap.spec | 2 ++
dlls/dimap/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 35 insertions(+)
create mode 100644 dlls/dimap/Makefile.in
create mode 100644 dlls/dimap/dimap.spec
create mode 100644 dlls/dimap/dimap_main.c
create mode 100644 dlls/dimap/version.rc
diff --git a/configure.ac b/configure.ac
index 12efadbab64..f2be9e7db7a 100644
index 8a7a58d413e..8dcc30dc4d5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3163,6 +3163,7 @@ WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc/tests)
@@ -3184,6 +3184,7 @@ WINE_CONFIG_MAKEFILE(dlls/dhcpcsvc/tests)
WINE_CONFIG_MAKEFILE(dlls/dhtmled.ocx)
WINE_CONFIG_MAKEFILE(dlls/diactfrm)
WINE_CONFIG_MAKEFILE(dlls/difxapi)
@ -30,16 +28,14 @@ index 12efadbab64..f2be9e7db7a 100644
WINE_CONFIG_MAKEFILE(dlls/dinput8)
diff --git a/dlls/dimap/Makefile.in b/dlls/dimap/Makefile.in
new file mode 100644
index 00000000000..05030d9cce6
index 00000000000..36c2c363c04
--- /dev/null
+++ b/dlls/dimap/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dimap.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dimap_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dimap/dimap.spec b/dlls/dimap/dimap.spec
@ -50,54 +46,6 @@ index 00000000000..cacaa27a2ca
@@ -0,0 +1,2 @@
+@ stub DllCanUnloadNow
+@ stub DllGetClassObject
diff --git a/dlls/dimap/dimap_main.c b/dlls/dimap/dimap_main.c
new file mode 100644
index 00000000000..0f393dfb243
--- /dev/null
+++ b/dlls/dimap/dimap_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dimap);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dimap/version.rc b/dlls/dimap/version.rc
new file mode 100644
index 00000000000..d0341dfcb77
@ -131,5 +79,5 @@ index 00000000000..d0341dfcb77
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 17b2eb4b74795bb729025f72459697214bfc7a31 Mon Sep 17 00:00:00 2001
From 1772676c96491d8e5a2c4d8cd43c12196b972bc5 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:02 -0500
Subject: [PATCH] dpmodemx: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dpmodemx/Makefile.in | 8 +++++++
dlls/dpmodemx/dpmodemx.spec | 1 +
dlls/dpmodemx/dpmodemx_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/dpmodemx/version.rc | 26 ++++++++++++++++++++++
5 files changed, 78 insertions(+)
configure.ac | 1 +
dlls/dpmodemx/Makefile.in | 6 ++++++
dlls/dpmodemx/dpmodemx.spec | 1 +
dlls/dpmodemx/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 dlls/dpmodemx/Makefile.in
create mode 100644 dlls/dpmodemx/dpmodemx.spec
create mode 100644 dlls/dpmodemx/dpmodemx_main.c
create mode 100644 dlls/dpmodemx/version.rc
diff --git a/configure.ac b/configure.ac
index f2be9e7db7a..c6198dd71b6 100644
index 8dcc30dc4d5..ef321dd2292 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3197,6 +3197,7 @@ WINE_CONFIG_MAKEFILE(dlls/dnsapi/tests)
@@ -3218,6 +3218,7 @@ WINE_CONFIG_MAKEFILE(dlls/dnsapi/tests)
WINE_CONFIG_MAKEFILE(dlls/dplay)
WINE_CONFIG_MAKEFILE(dlls/dplayx)
WINE_CONFIG_MAKEFILE(dlls/dplayx/tests)
@ -30,16 +28,14 @@ index f2be9e7db7a..c6198dd71b6 100644
WINE_CONFIG_MAKEFILE(dlls/dpnet/tests)
diff --git a/dlls/dpmodemx/Makefile.in b/dlls/dpmodemx/Makefile.in
new file mode 100644
index 00000000000..e074ca33164
index 00000000000..c15b7a33112
--- /dev/null
+++ b/dlls/dpmodemx/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dpmodemx.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dpmodemx_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dpmodemx/dpmodemx.spec b/dlls/dpmodemx/dpmodemx.spec
@ -50,54 +46,6 @@ index 00000000000..14fb05053a8
@@ -0,0 +1 @@
+@ stub SPInit
\ No newline at end of file
diff --git a/dlls/dpmodemx/dpmodemx_main.c b/dlls/dpmodemx/dpmodemx_main.c
new file mode 100644
index 00000000000..f5d7a8340ca
--- /dev/null
+++ b/dlls/dpmodemx/dpmodemx_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dpmodemx);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dpmodemx/version.rc b/dlls/dpmodemx/version.rc
new file mode 100644
index 00000000000..b0c644aed83
@ -131,5 +79,5 @@ index 00000000000..b0c644aed83
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From ccab4054c8596d7383904175d6efaad028268cfc Mon Sep 17 00:00:00 2001
From 22b5e83162157f99cc7c114defc08c27053b6868 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:43:44 -0500
Subject: [PATCH] dpnhupnp: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dpnhupnp/Makefile.in | 8 +++++++
dlls/dpnhupnp/dpnhupnp.spec | 5 +++++
dlls/dpnhupnp/dpnhupnp_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/dpnhupnp/version.rc | 26 ++++++++++++++++++++++
5 files changed, 82 insertions(+)
configure.ac | 1 +
dlls/dpnhupnp/Makefile.in | 6 ++++++
dlls/dpnhupnp/dpnhupnp.spec | 5 +++++
dlls/dpnhupnp/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 38 insertions(+)
create mode 100644 dlls/dpnhupnp/Makefile.in
create mode 100644 dlls/dpnhupnp/dpnhupnp.spec
create mode 100644 dlls/dpnhupnp/dpnhupnp_main.c
create mode 100644 dlls/dpnhupnp/version.rc
diff --git a/configure.ac b/configure.ac
index c6198dd71b6..d562902f0f7 100644
index ef321dd2292..8494354b561 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3199,6 +3199,7 @@ WINE_CONFIG_MAKEFILE(dlls/dplayx)
@@ -3220,6 +3220,7 @@ WINE_CONFIG_MAKEFILE(dlls/dplayx)
WINE_CONFIG_MAKEFILE(dlls/dplayx/tests)
WINE_CONFIG_MAKEFILE(dlls/dpmodemx)
WINE_CONFIG_MAKEFILE(dlls/dpnaddr)
@ -30,16 +28,14 @@ index c6198dd71b6..d562902f0f7 100644
WINE_CONFIG_MAKEFILE(dlls/dpnhpast)
diff --git a/dlls/dpnhupnp/Makefile.in b/dlls/dpnhupnp/Makefile.in
new file mode 100644
index 00000000000..7ac77c99471
index 00000000000..566ce038f82
--- /dev/null
+++ b/dlls/dpnhupnp/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dpnhupnp.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dpnhupnp_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dpnhupnp/dpnhupnp.spec b/dlls/dpnhupnp/dpnhupnp.spec
@ -54,54 +50,6 @@ index 00000000000..acc698e99ab
+@ stub DllGetClassObject
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/dpnhupnp/dpnhupnp_main.c b/dlls/dpnhupnp/dpnhupnp_main.c
new file mode 100644
index 00000000000..f7b67d6574f
--- /dev/null
+++ b/dlls/dpnhupnp/dpnhupnp_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dpnhupnp);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dpnhupnp/version.rc b/dlls/dpnhupnp/version.rc
new file mode 100644
index 00000000000..21633a49815
@ -135,5 +83,5 @@ index 00000000000..21633a49815
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,28 +1,32 @@
From de1a88b3f30897fc1e99476f81d7e3c883d69d09 Mon Sep 17 00:00:00 2001
From f9a068def176011ec42e84d370e1708e70de2e2a Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:02 -0500
Subject: [PATCH] dpvacm: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dpvacm/Makefile.in | 8 ++++++++
dlls/dpvacm/dpvacm.spec | 4 ++++
dlls/dpvacm/dpvacm_main.c | 42 +++++++++++++++++++++++++++++++++++++++
dlls/dpvacm/version.rc | 26 ++++++++++++++++++++++++
5 files changed, 81 insertions(+)
configure.ac | 3 ++-
dlls/dpvacm/Makefile.in | 6 ++++++
dlls/dpvacm/dpvacm.spec | 4 ++++
dlls/dpvacm/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 38 insertions(+), 1 deletion(-)
create mode 100644 dlls/dpvacm/Makefile.in
create mode 100644 dlls/dpvacm/dpvacm.spec
create mode 100644 dlls/dpvacm/dpvacm_main.c
create mode 100644 dlls/dpvacm/version.rc
diff --git a/configure.ac b/configure.ac
index d562902f0f7..814de0cda49 100644
index 8494354b561..749781df38a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3204,6 +3204,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpnet)
@@ -3220,11 +3220,12 @@ WINE_CONFIG_MAKEFILE(dlls/dplayx)
WINE_CONFIG_MAKEFILE(dlls/dplayx/tests)
WINE_CONFIG_MAKEFILE(dlls/dpmodemx)
WINE_CONFIG_MAKEFILE(dlls/dpnaddr)
-WINE_CONFIG_MAKEFILE(dlls/dpnhupnp)
WINE_CONFIG_MAKEFILE(dlls/dpnet)
WINE_CONFIG_MAKEFILE(dlls/dpnet/tests)
WINE_CONFIG_MAKEFILE(dlls/dpnhpast)
+WINE_CONFIG_MAKEFILE(dlls/dpnhupnp)
WINE_CONFIG_MAKEFILE(dlls/dpnlobby)
+WINE_CONFIG_MAKEFILE(dlls/dpvacm)
WINE_CONFIG_MAKEFILE(dlls/dpvoice)
@ -30,16 +34,14 @@ index d562902f0f7..814de0cda49 100644
WINE_CONFIG_MAKEFILE(dlls/dpwsockx)
diff --git a/dlls/dpvacm/Makefile.in b/dlls/dpvacm/Makefile.in
new file mode 100644
index 00000000000..04d8b9b5f80
index 00000000000..e9fcafcfc7a
--- /dev/null
+++ b/dlls/dpvacm/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dpvacm.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dpvacm_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dpvacm/dpvacm.spec b/dlls/dpvacm/dpvacm.spec
@ -53,54 +55,6 @@ index 00000000000..fc4ae4a44c0
+@ stub DllGetClassObject
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/dpvacm/dpvacm_main.c b/dlls/dpvacm/dpvacm_main.c
new file mode 100644
index 00000000000..83fd0ab027c
--- /dev/null
+++ b/dlls/dpvacm/dpvacm_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dpvacm);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dpvacm/version.rc b/dlls/dpvacm/version.rc
new file mode 100644
index 00000000000..7c463bca22e
@ -134,5 +88,5 @@ index 00000000000..7c463bca22e
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From bfc43910ce09b06ae1618bc6e2cd1af00526d676 Mon Sep 17 00:00:00 2001
From 98be083cb6866286bcb73d23f7ed1ac13da857e7 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:02 -0500
Subject: [PATCH] dpvvox: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dpvvox/Makefile.in | 8 ++++++++
dlls/dpvvox/dpvvox.spec | 4 ++++
dlls/dpvvox/dpvvox_main.c | 42 +++++++++++++++++++++++++++++++++++++++
dlls/dpvvox/version.rc | 26 ++++++++++++++++++++++++
5 files changed, 81 insertions(+)
configure.ac | 1 +
dlls/dpvvox/Makefile.in | 6 ++++++
dlls/dpvvox/dpvvox.spec | 4 ++++
dlls/dpvvox/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 dlls/dpvvox/Makefile.in
create mode 100644 dlls/dpvvox/dpvvox.spec
create mode 100644 dlls/dpvvox/dpvvox_main.c
create mode 100644 dlls/dpvvox/version.rc
diff --git a/configure.ac b/configure.ac
index 814de0cda49..e8505848dc3 100644
index 749781df38a..ec12df76214 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3207,6 +3207,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpnlobby)
@@ -3228,6 +3228,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpnlobby)
WINE_CONFIG_MAKEFILE(dlls/dpvacm)
WINE_CONFIG_MAKEFILE(dlls/dpvoice)
WINE_CONFIG_MAKEFILE(dlls/dpvoice/tests)
@ -30,16 +28,14 @@ index 814de0cda49..e8505848dc3 100644
WINE_CONFIG_MAKEFILE(dlls/dsdmo)
diff --git a/dlls/dpvvox/Makefile.in b/dlls/dpvvox/Makefile.in
new file mode 100644
index 00000000000..4107042f785
index 00000000000..76c1312e680
--- /dev/null
+++ b/dlls/dpvvox/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dpvvox.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dpvvox_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dpvvox/dpvvox.spec b/dlls/dpvvox/dpvvox.spec
@ -53,54 +49,6 @@ index 00000000000..fc4ae4a44c0
+@ stub DllGetClassObject
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/dpvvox/dpvvox_main.c b/dlls/dpvvox/dpvvox_main.c
new file mode 100644
index 00000000000..8e813cc13d2
--- /dev/null
+++ b/dlls/dpvvox/dpvvox_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dpvvox);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dpvvox/version.rc b/dlls/dpvvox/version.rc
new file mode 100644
index 00000000000..d4e3a34c0a8
@ -134,5 +82,5 @@ index 00000000000..d4e3a34c0a8
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 26163e8bd3dccff151f336e81e620b5898316af7 Mon Sep 17 00:00:00 2001
From 2b847764d114860d9f68eaf0f1c34cddf5bbc5ee Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:44:22 -0500
Subject: [PATCH] dsdmoprp: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dsdmoprp/Makefile.in | 8 +++++++
dlls/dsdmoprp/dsdmoprp.spec | 4 ++++
dlls/dsdmoprp/dsdmoprp_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/dsdmoprp/version.rc | 26 ++++++++++++++++++++++
5 files changed, 81 insertions(+)
configure.ac | 1 +
dlls/dsdmoprp/Makefile.in | 6 ++++++
dlls/dsdmoprp/dsdmoprp.spec | 4 ++++
dlls/dsdmoprp/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 dlls/dsdmoprp/Makefile.in
create mode 100644 dlls/dsdmoprp/dsdmoprp.spec
create mode 100644 dlls/dsdmoprp/dsdmoprp_main.c
create mode 100644 dlls/dsdmoprp/version.rc
diff --git a/configure.ac b/configure.ac
index e8505848dc3..5305312d2aa 100644
index ec12df76214..b69929b6271 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3212,6 +3212,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpwsockx)
@@ -3233,6 +3233,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpwsockx)
WINE_CONFIG_MAKEFILE(dlls/drmclien)
WINE_CONFIG_MAKEFILE(dlls/dsdmo)
WINE_CONFIG_MAKEFILE(dlls/dsdmo/tests)
@ -30,16 +28,14 @@ index e8505848dc3..5305312d2aa 100644
WINE_CONFIG_MAKEFILE(dlls/dsquery)
diff --git a/dlls/dsdmoprp/Makefile.in b/dlls/dsdmoprp/Makefile.in
new file mode 100644
index 00000000000..ca31aa0d359
index 00000000000..b3fcb8c3398
--- /dev/null
+++ b/dlls/dsdmoprp/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dsdmoprp.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dsdmoprp_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dsdmoprp/dsdmoprp.spec b/dlls/dsdmoprp/dsdmoprp.spec
@ -53,54 +49,6 @@ index 00000000000..a043605127d
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/dsdmoprp/dsdmoprp_main.c b/dlls/dsdmoprp/dsdmoprp_main.c
new file mode 100644
index 00000000000..7a547e5d499
--- /dev/null
+++ b/dlls/dsdmoprp/dsdmoprp_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmoprp);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dsdmoprp/version.rc b/dlls/dsdmoprp/version.rc
new file mode 100644
index 00000000000..9a2ca3e1c54
@ -134,5 +82,5 @@ index 00000000000..9a2ca3e1c54
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 0a577ac59e4c1a8dad7ac90374ecf32aabf51057 Mon Sep 17 00:00:00 2001
From 852f2fbdbf1d2615a5fdf95f2cee131b4699c291 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:03 -0500
Subject: [PATCH] dsound3d: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dsound3d/Makefile.in | 8 +++++++
dlls/dsound3d/dsound3d.spec | 1 +
dlls/dsound3d/dsound3d_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/dsound3d/version.rc | 26 ++++++++++++++++++++++
5 files changed, 78 insertions(+)
configure.ac | 1 +
dlls/dsound3d/Makefile.in | 6 ++++++
dlls/dsound3d/dsound3d.spec | 1 +
dlls/dsound3d/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 dlls/dsound3d/Makefile.in
create mode 100644 dlls/dsound3d/dsound3d.spec
create mode 100644 dlls/dsound3d/dsound3d_main.c
create mode 100644 dlls/dsound3d/version.rc
diff --git a/configure.ac b/configure.ac
index 5305312d2aa..00bb6bdf015 100644
index b69929b6271..da6ada3013b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3215,6 +3215,7 @@ WINE_CONFIG_MAKEFILE(dlls/dsdmo/tests)
@@ -3236,6 +3236,7 @@ WINE_CONFIG_MAKEFILE(dlls/dsdmo/tests)
WINE_CONFIG_MAKEFILE(dlls/dsdmoprp)
WINE_CONFIG_MAKEFILE(dlls/dsound)
WINE_CONFIG_MAKEFILE(dlls/dsound/tests)
@ -30,16 +28,14 @@ index 5305312d2aa..00bb6bdf015 100644
WINE_CONFIG_MAKEFILE(dlls/dssenh/tests)
diff --git a/dlls/dsound3d/Makefile.in b/dlls/dsound3d/Makefile.in
new file mode 100644
index 00000000000..780faeb9f68
index 00000000000..f94afbee5b0
--- /dev/null
+++ b/dlls/dsound3d/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dsound3d.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dsound3d_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dsound3d/dsound3d.spec b/dlls/dsound3d/dsound3d.spec
@ -50,54 +46,6 @@ index 00000000000..9859c231f25
@@ -0,0 +1 @@
+@ stub CafBiquadCoeffs
\ No newline at end of file
diff --git a/dlls/dsound3d/dsound3d_main.c b/dlls/dsound3d/dsound3d_main.c
new file mode 100644
index 00000000000..0bd7ecdfdf2
--- /dev/null
+++ b/dlls/dsound3d/dsound3d_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dsound3d);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dsound3d/version.rc b/dlls/dsound3d/version.rc
new file mode 100644
index 00000000000..77dea7a2f70
@ -131,5 +79,5 @@ index 00000000000..77dea7a2f70
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,4 +1,4 @@
From 79a82bb0fba6786ef42d832b6c35c9a74ff4f71e Mon Sep 17 00:00:00 2001
From c4e663329366c37bca65a0beb83d656afea45ecc Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:03 -0500
Subject: [PATCH] dxapi.sys: add stub dll
@ -6,41 +6,37 @@ Subject: [PATCH] dxapi.sys: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dxapi.sys/Makefile.in | 8 +++++++
dlls/dxapi.sys/dxapi.sys.spec | 7 ++++++
dlls/dxapi.sys/main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/dxapi.sys/version.rc | 26 ++++++++++++++++++++++
dlls/dxapi.sys/Makefile.in | 6 ++++++
dlls/dxapi.sys/dxapi.sys.spec | 7 +++++++
dlls/dxapi.sys/version.rc | 26 ++++++++++++++++++++++++++
loader/wine.inf.in | 2 ++
6 files changed, 86 insertions(+)
5 files changed, 42 insertions(+)
create mode 100644 dlls/dxapi.sys/Makefile.in
create mode 100644 dlls/dxapi.sys/dxapi.sys.spec
create mode 100644 dlls/dxapi.sys/main.c
create mode 100644 dlls/dxapi.sys/version.rc
diff --git a/configure.ac b/configure.ac
index 11c7eb88a00..794e3207517 100644
index da6ada3013b..47e8427f6b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3247,6 +3247,7 @@ WINE_CONFIG_MAKEFILE(dlls/dwmapi)
WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
@@ -3248,6 +3248,7 @@ WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
WINE_CONFIG_MAKEFILE(dlls/dwrite)
WINE_CONFIG_MAKEFILE(dlls/dwrite/tests)
+WINE_CONFIG_MAKEFILE(dlls/dxapi.sys)
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
+WINE_CONFIG_MAKEFILE(dlls/dxapi.sys)
WINE_CONFIG_MAKEFILE(dlls/dxdiagn)
WINE_CONFIG_MAKEFILE(dlls/dxdiagn/tests)
WINE_CONFIG_MAKEFILE(dlls/dxerr8)
diff --git a/dlls/dxapi.sys/Makefile.in b/dlls/dxapi.sys/Makefile.in
new file mode 100644
index 00000000000..53df0e25040
index 00000000000..43259f950b5
--- /dev/null
+++ b/dlls/dxapi.sys/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dxapi.sys
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dxapi.sys/dxapi.sys.spec b/dlls/dxapi.sys/dxapi.sys.spec
@ -56,54 +52,6 @@ index 00000000000..05748b5fe59
+@ stub _DxEnableIRQ@8
+@ stub _DxLoseObject@8
+@ stub _DxUpdateCapture@12
diff --git a/dlls/dxapi.sys/main.c b/dlls/dxapi.sys/main.c
new file mode 100644
index 00000000000..be1e04ec188
--- /dev/null
+++ b/dlls/dxapi.sys/main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dxapi);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dxapi.sys/version.rc b/dlls/dxapi.sys/version.rc
new file mode 100644
index 00000000000..7ecd1565052
@ -157,5 +105,5 @@ index 20d5243aa4b..b4052b146b4 100644
12,,dxgmms1.sys
12,,fltmgr.sys
--
2.29.2
2.20.1

View File

@ -1,45 +1,41 @@
From a4b06309034e08bfe26f0aa28e8317b0187be11f Mon Sep 17 00:00:00 2001
From 2703aa7a1e1d811924a8fa59fbdf88f44e4ff035 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:03 -0500
Subject: [PATCH] dx7vb: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/dx7vb/Makefile.in | 8 ++++++++
dlls/dx7vb/dx7vb.spec | 4 ++++
dlls/dx7vb/dx7vb_main.c | 42 +++++++++++++++++++++++++++++++++++++++++
dlls/dx7vb/version.rc | 26 +++++++++++++++++++++++++
5 files changed, 81 insertions(+)
configure.ac | 1 +
dlls/dx7vb/Makefile.in | 6 ++++++
dlls/dx7vb/dx7vb.spec | 4 ++++
dlls/dx7vb/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 dlls/dx7vb/Makefile.in
create mode 100644 dlls/dx7vb/dx7vb.spec
create mode 100644 dlls/dx7vb/dx7vb_main.c
create mode 100644 dlls/dx7vb/version.rc
diff --git a/configure.ac b/configure.ac
index f9e771f4515..32683ac8d61 100644
index 47e8427f6b8..44021303331 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3227,6 +3227,7 @@ WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
@@ -3247,6 +3247,7 @@ WINE_CONFIG_MAKEFILE(dlls/dwmapi)
WINE_CONFIG_MAKEFILE(dlls/dwmapi/tests)
WINE_CONFIG_MAKEFILE(dlls/dwrite)
WINE_CONFIG_MAKEFILE(dlls/dwrite/tests)
WINE_CONFIG_MAKEFILE(dlls/dxapi.sys)
+WINE_CONFIG_MAKEFILE(dlls/dx7vb)
WINE_CONFIG_MAKEFILE(dlls/dx8vb)
WINE_CONFIG_MAKEFILE(dlls/dxapi.sys)
WINE_CONFIG_MAKEFILE(dlls/dxdiagn)
WINE_CONFIG_MAKEFILE(dlls/dxdiagn/tests)
diff --git a/dlls/dx7vb/Makefile.in b/dlls/dx7vb/Makefile.in
new file mode 100644
index 00000000000..b59a24617e6
index 00000000000..104343c9388
--- /dev/null
+++ b/dlls/dx7vb/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = dx7vb.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ dx7vb_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/dx7vb/dx7vb.spec b/dlls/dx7vb/dx7vb.spec
@ -53,54 +49,6 @@ index 00000000000..a043605127d
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/dx7vb/dx7vb_main.c b/dlls/dx7vb/dx7vb_main.c
new file mode 100644
index 00000000000..b985f8bd583
--- /dev/null
+++ b/dlls/dx7vb/dx7vb_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dx7vb);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/dx7vb/version.rc b/dlls/dx7vb/version.rc
new file mode 100644
index 00000000000..c401dfb471d
@ -134,5 +82,5 @@ index 00000000000..c401dfb471d
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 317a6a2e7a0bae37645cb6da6c76f6c8c428da3e Mon Sep 17 00:00:00 2001
From 962ea5ce308538f8a208646fc61fa8f95b199b98 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:04 -0500
Subject: [PATCH] encapi: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/encapi/Makefile.in | 8 ++++++++
dlls/encapi/encapi.spec | 4 ++++
dlls/encapi/encapi_main.c | 42 +++++++++++++++++++++++++++++++++++++++
dlls/encapi/version.rc | 26 ++++++++++++++++++++++++
5 files changed, 81 insertions(+)
configure.ac | 1 +
dlls/encapi/Makefile.in | 6 ++++++
dlls/encapi/encapi.spec | 4 ++++
dlls/encapi/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 37 insertions(+)
create mode 100644 dlls/encapi/Makefile.in
create mode 100644 dlls/encapi/encapi.spec
create mode 100644 dlls/encapi/encapi_main.c
create mode 100644 dlls/encapi/version.rc
diff --git a/configure.ac b/configure.ac
index 32683ac8d61..5ca4d461a29 100644
index 44021303331..6d3f37c6905 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3238,6 +3238,7 @@ WINE_CONFIG_MAKEFILE(dlls/dxgi/tests)
@@ -3261,6 +3261,7 @@ WINE_CONFIG_MAKEFILE(dlls/dxgmms1.sys)
WINE_CONFIG_MAKEFILE(dlls/dxguid)
WINE_CONFIG_MAKEFILE(dlls/dxva2)
WINE_CONFIG_MAKEFILE(dlls/dxva2/tests)
@ -30,16 +28,14 @@ index 32683ac8d61..5ca4d461a29 100644
WINE_CONFIG_MAKEFILE(dlls/evr/tests)
diff --git a/dlls/encapi/Makefile.in b/dlls/encapi/Makefile.in
new file mode 100644
index 00000000000..3f305c76e04
index 00000000000..457b9d64d1f
--- /dev/null
+++ b/dlls/encapi/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = encapi.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ encapi_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/encapi/encapi.spec b/dlls/encapi/encapi.spec
@ -53,54 +49,6 @@ index 00000000000..a043605127d
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/encapi/encapi_main.c b/dlls/encapi/encapi_main.c
new file mode 100644
index 00000000000..ac16fb3c8e9
--- /dev/null
+++ b/dlls/encapi/encapi_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(encapi);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/encapi/version.rc b/dlls/encapi/version.rc
new file mode 100644
index 00000000000..8f10a2c6ce6
@ -134,5 +82,5 @@ index 00000000000..8f10a2c6ce6
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 69a91bc75c9ca7f02008a9a292b55c6b4f4ff503 Mon Sep 17 00:00:00 2001
From 6d1a2eb383f00334e74a283cc11aeee338946734 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:08 -0500
Subject: [PATCH] gcdef: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/gcdef/Makefile.in | 8 ++++++++
dlls/gcdef/gcdef.spec | 2 ++
dlls/gcdef/gcdef_main.c | 42 +++++++++++++++++++++++++++++++++++++++++
dlls/gcdef/version.rc | 26 +++++++++++++++++++++++++
5 files changed, 79 insertions(+)
configure.ac | 1 +
dlls/gcdef/Makefile.in | 6 ++++++
dlls/gcdef/gcdef.spec | 2 ++
dlls/gcdef/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 35 insertions(+)
create mode 100644 dlls/gcdef/Makefile.in
create mode 100644 dlls/gcdef/gcdef.spec
create mode 100644 dlls/gcdef/gcdef_main.c
create mode 100644 dlls/gcdef/version.rc
diff --git a/configure.ac b/configure.ac
index 5ca4d461a29..c1d9a23e889 100644
index 6d3f37c6905..db94b38dcac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3308,6 +3308,7 @@ WINE_CONFIG_MAKEFILE(dlls/fusion/tests)
@@ -3331,6 +3331,7 @@ WINE_CONFIG_MAKEFILE(dlls/fusion/tests)
WINE_CONFIG_MAKEFILE(dlls/fwpuclnt)
WINE_CONFIG_MAKEFILE(dlls/gameux)
WINE_CONFIG_MAKEFILE(dlls/gameux/tests)
@ -30,16 +28,14 @@ index 5ca4d461a29..c1d9a23e889 100644
WINE_CONFIG_MAKEFILE(dlls/gdi32/tests)
diff --git a/dlls/gcdef/Makefile.in b/dlls/gcdef/Makefile.in
new file mode 100644
index 00000000000..754199cfda3
index 00000000000..162b49d70f8
--- /dev/null
+++ b/dlls/gcdef/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = gcdef.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ gcdef_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/gcdef/gcdef.spec b/dlls/gcdef/gcdef.spec
@ -50,54 +46,6 @@ index 00000000000..cacaa27a2ca
@@ -0,0 +1,2 @@
+@ stub DllCanUnloadNow
+@ stub DllGetClassObject
diff --git a/dlls/gcdef/gcdef_main.c b/dlls/gcdef/gcdef_main.c
new file mode 100644
index 00000000000..0c1758db31f
--- /dev/null
+++ b/dlls/gcdef/gcdef_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(gcdef);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/gcdef/version.rc b/dlls/gcdef/version.rc
new file mode 100644
index 00000000000..c71136be6e1
@ -131,5 +79,5 @@ index 00000000000..c71136be6e1
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,4 +1,4 @@
From 5fcbf47b73bc1fddf7141a9fe01dd727f4df56ff Mon Sep 17 00:00:00 2001
From 905724311a9d542122f41ef1eb0b1b98ef0c6897 Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:23 -0500
Subject: [PATCH] qdv: add stub dll
@ -6,21 +6,19 @@ Subject: [PATCH] qdv: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/qdv/Makefile.in | 8 ++++++++
dlls/qdv/Makefile.in | 6 ++++++
dlls/qdv/qdv.spec | 4 ++++
dlls/qdv/qdv_main.c | 42 ++++++++++++++++++++++++++++++++++++++++++
dlls/qdv/version.rc | 26 ++++++++++++++++++++++++++
5 files changed, 81 insertions(+)
4 files changed, 37 insertions(+)
create mode 100644 dlls/qdv/Makefile.in
create mode 100644 dlls/qdv/qdv.spec
create mode 100644 dlls/qdv/qdv_main.c
create mode 100644 dlls/qdv/version.rc
diff --git a/configure.ac b/configure.ac
index c1d9a23e889..2bb8c05cbcb 100644
index db94b38dcac..8e493b3e44b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3604,6 +3604,7 @@ WINE_CONFIG_MAKEFILE(dlls/qasf)
@@ -3627,6 +3627,7 @@ WINE_CONFIG_MAKEFILE(dlls/qasf)
WINE_CONFIG_MAKEFILE(dlls/qasf/tests)
WINE_CONFIG_MAKEFILE(dlls/qcap)
WINE_CONFIG_MAKEFILE(dlls/qcap/tests)
@ -30,16 +28,14 @@ index c1d9a23e889..2bb8c05cbcb 100644
WINE_CONFIG_MAKEFILE(dlls/qedit)
diff --git a/dlls/qdv/Makefile.in b/dlls/qdv/Makefile.in
new file mode 100644
index 00000000000..23445040599
index 00000000000..487b9b8f881
--- /dev/null
+++ b/dlls/qdv/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = qdv.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ qdv_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/qdv/qdv.spec b/dlls/qdv/qdv.spec
@ -53,54 +49,6 @@ index 00000000000..a043605127d
+@ stub DllRegisterServer
+@ stub DllUnregisterServer
\ No newline at end of file
diff --git a/dlls/qdv/qdv_main.c b/dlls/qdv/qdv_main.c
new file mode 100644
index 00000000000..074230acf59
--- /dev/null
+++ b/dlls/qdv/qdv_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(qdv);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/qdv/version.rc b/dlls/qdv/version.rc
new file mode 100644
index 00000000000..6cf198362a8
@ -134,5 +82,5 @@ index 00000000000..6cf198362a8
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,26 +1,24 @@
From 523924d5353b9616dabb3ba0614f0b60d6e7012a Mon Sep 17 00:00:00 2001
From be28c9d2dd113810b120725640879f5d3e8831bb Mon Sep 17 00:00:00 2001
From: Austin English <austinenglish@gmail.com>
Date: Tue, 13 Oct 2020 04:42:24 -0500
Subject: [PATCH] qedwipes: add stub dll
Signed-off-by: Austin English <austinenglish@gmail.com>
---
configure.ac | 1 +
dlls/qedwipes/Makefile.in | 8 +++++++
dlls/qedwipes/qedwipes.spec | 1 +
dlls/qedwipes/qedwipes_main.c | 42 +++++++++++++++++++++++++++++++++++
dlls/qedwipes/version.rc | 26 ++++++++++++++++++++++
5 files changed, 78 insertions(+)
configure.ac | 1 +
dlls/qedwipes/Makefile.in | 6 ++++++
dlls/qedwipes/qedwipes.spec | 1 +
dlls/qedwipes/version.rc | 26 ++++++++++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 dlls/qedwipes/Makefile.in
create mode 100644 dlls/qedwipes/qedwipes.spec
create mode 100644 dlls/qedwipes/qedwipes_main.c
create mode 100644 dlls/qedwipes/version.rc
diff --git a/configure.ac b/configure.ac
index 2bb8c05cbcb..9b9c9bcec7d 100644
index 8e493b3e44b..3907082c38c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3609,6 +3609,7 @@ WINE_CONFIG_MAKEFILE(dlls/qdvd)
@@ -3632,6 +3632,7 @@ WINE_CONFIG_MAKEFILE(dlls/qdvd)
WINE_CONFIG_MAKEFILE(dlls/qdvd/tests)
WINE_CONFIG_MAKEFILE(dlls/qedit)
WINE_CONFIG_MAKEFILE(dlls/qedit/tests)
@ -30,16 +28,14 @@ index 2bb8c05cbcb..9b9c9bcec7d 100644
WINE_CONFIG_MAKEFILE(dlls/qmgrprxy)
diff --git a/dlls/qedwipes/Makefile.in b/dlls/qedwipes/Makefile.in
new file mode 100644
index 00000000000..eff4ffbc813
index 00000000000..0e2223ad4b1
--- /dev/null
+++ b/dlls/qedwipes/Makefile.in
@@ -0,0 +1,8 @@
@@ -0,0 +1,6 @@
+MODULE = qedwipes.dll
+
+EXTRADLLFLAGS = -mno-cygwin
+EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ qedwipes_main.c
+
+RC_SRCS = version.rc
diff --git a/dlls/qedwipes/qedwipes.spec b/dlls/qedwipes/qedwipes.spec
@ -49,54 +45,6 @@ index 00000000000..3a8a8ea0098
+++ b/dlls/qedwipes/qedwipes.spec
@@ -0,0 +1 @@
+# FIXME: native doesn't export any functions?
diff --git a/dlls/qedwipes/qedwipes_main.c b/dlls/qedwipes/qedwipes_main.c
new file mode 100644
index 00000000000..5085213e24f
--- /dev/null
+++ b/dlls/qedwipes/qedwipes_main.c
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(qedwipes);
+
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
+{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+
+ switch (reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE; /* prefer native version */
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(instance);
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/dlls/qedwipes/version.rc b/dlls/qedwipes/version.rc
new file mode 100644
index 00000000000..ce865c2b96f
@ -130,5 +78,5 @@ index 00000000000..ce865c2b96f
+
+#include "wine/wine_common_ver.rc"
--
2.29.2
2.20.1

View File

@ -1,13 +1,30 @@
From a615211907b65642807cdad546a0eaf12e39f43c Mon Sep 17 00:00:00 2001
From 6fe8944830f612188c670f2c5d5f26c8fd572ca2 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sun, 27 Dec 2020 09:57:46 +1100
Subject: [PATCH] dpmodemx: Add stub SPInit
---
dlls/dpmodemx/dpmodemx.spec | 2 +-
dlls/dpmodemx/dpmodemx_main.c | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
dlls/dpmodemx/Makefile.in | 5 ++++-
dlls/dpmodemx/dpmodemx.spec | 2 +-
dlls/dpmodemx/dpmodemx_main.c | 35 +++++++++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 dlls/dpmodemx/dpmodemx_main.c
diff --git a/dlls/dpmodemx/Makefile.in b/dlls/dpmodemx/Makefile.in
index c15b7a33112..b7897fb1cf6 100644
--- a/dlls/dpmodemx/Makefile.in
+++ b/dlls/dpmodemx/Makefile.in
@@ -1,6 +1,9 @@
MODULE = dpmodemx.dll
-EXTRADLLFLAGS = -Wb,--prefer-native
+EXTRADLLFLAGS = -mno-cygwin -Wb,--prefer-native
RC_SRCS = version.rc
+
+C_SRCS = \
+ dpmodemx_main.c
diff --git a/dlls/dpmodemx/dpmodemx.spec b/dlls/dpmodemx/dpmodemx.spec
index 14fb05053a8..e3beb3f8cc7 100644
--- a/dlls/dpmodemx/dpmodemx.spec
@ -18,28 +35,46 @@ index 14fb05053a8..e3beb3f8cc7 100644
+@ stdcall SPInit(ptr)
\ No newline at end of file
diff --git a/dlls/dpmodemx/dpmodemx_main.c b/dlls/dpmodemx/dpmodemx_main.c
index f5d7a8340ca..5d322783b40 100644
--- a/dlls/dpmodemx/dpmodemx_main.c
new file mode 100644
index 00000000000..d87be210165
--- /dev/null
+++ b/dlls/dpmodemx/dpmodemx_main.c
@@ -23,6 +23,8 @@
#include "winbase.h"
#include "wine/debug.h"
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright 2020 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "wine/debug.h"
+
+#include "wine/dplaysp.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(dpmodemx);
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
@@ -40,3 +42,9 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
return TRUE;
}
+WINE_DEFAULT_DEBUG_CHANNEL(dpmodemx);
+
+HRESULT WINAPI SPInit( LPSPINITDATA lpspData )
+{
+ FIXME("Currently not implemented.\n");
+ return DPERR_UNAVAILABLE;
+}
+
--
2.29.2
2.20.1

View File

@ -1,4 +1,4 @@
From 9f1b410e28ff85e4b7f6a36539e159f913c0ff05 Mon Sep 17 00:00:00 2001
From 328517d4516b3767ff21c6ffe4f45b29989edfea Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Sun, 22 Nov 2020 20:51:10 -0600
Subject: [PATCH] ntdll: Reimplement SRW locks on top of Win32 futexes.
@ -13,10 +13,10 @@ Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
5 files changed, 141 insertions(+), 502 deletions(-)
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index 42b62a2cd87..d4944951dc6 100644
index 225216cbe2a..950a5047752 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -161,127 +161,23 @@ DWORD WINAPI RtlRunOnceExecuteOnce( RTL_RUN_ONCE *once, PRTL_RUN_ONCE_INIT_FN fu
@@ -160,127 +160,23 @@ DWORD WINAPI RtlRunOnceExecuteOnce( RTL_RUN_ONCE *once, PRTL_RUN_ONCE_INIT_FN fu
return RtlRunOnceComplete( once, 0, context ? *context : NULL );
}
@ -159,7 +159,7 @@ index 42b62a2cd87..d4944951dc6 100644
/***********************************************************************
* RtlInitializeSRWLock (NTDLL.@)
@@ -308,11 +204,36 @@ void WINAPI RtlInitializeSRWLock( RTL_SRWLOCK *lock )
@@ -307,11 +203,36 @@ void WINAPI RtlInitializeSRWLock( RTL_SRWLOCK *lock )
*/
void WINAPI RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
{
@ -200,7 +200,7 @@ index 42b62a2cd87..d4944951dc6 100644
}
/***********************************************************************
@@ -324,34 +245,34 @@ void WINAPI RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -323,34 +244,34 @@ void WINAPI RtlAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
*/
void WINAPI RtlAcquireSRWLockShared( RTL_SRWLOCK *lock )
{
@ -259,7 +259,7 @@ index 42b62a2cd87..d4944951dc6 100644
}
/***********************************************************************
@@ -359,11 +280,23 @@ void WINAPI RtlAcquireSRWLockShared( RTL_SRWLOCK *lock )
@@ -358,11 +279,23 @@ void WINAPI RtlAcquireSRWLockShared( RTL_SRWLOCK *lock )
*/
void WINAPI RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock )
{
@ -287,7 +287,7 @@ index 42b62a2cd87..d4944951dc6 100644
}
/***********************************************************************
@@ -371,11 +304,22 @@ void WINAPI RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -370,11 +303,22 @@ void WINAPI RtlReleaseSRWLockExclusive( RTL_SRWLOCK *lock )
*/
void WINAPI RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
{
@ -314,7 +314,7 @@ index 42b62a2cd87..d4944951dc6 100644
}
/***********************************************************************
@@ -387,13 +331,28 @@ void WINAPI RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
@@ -386,13 +330,28 @@ void WINAPI RtlReleaseSRWLockShared( RTL_SRWLOCK *lock )
*/
BOOLEAN WINAPI RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
{
@ -348,7 +348,7 @@ index 42b62a2cd87..d4944951dc6 100644
}
/***********************************************************************
@@ -401,20 +360,29 @@ BOOLEAN WINAPI RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
@@ -400,20 +359,29 @@ BOOLEAN WINAPI RtlTryAcquireSRWLockExclusive( RTL_SRWLOCK *lock )
*/
BOOLEAN WINAPI RtlTryAcquireSRWLockShared( RTL_SRWLOCK *lock )
{
@ -391,10 +391,10 @@ index 42b62a2cd87..d4944951dc6 100644
/***********************************************************************
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c
index d5e8153b313..05a45916714 100644
index f161040ff43..8e5e8410d1c 100644
--- a/dlls/ntdll/unix/loader.c
+++ b/dlls/ntdll/unix/loader.c
@@ -1584,12 +1584,6 @@ static struct unix_funcs unix_funcs =
@@ -1595,12 +1595,6 @@ static struct unix_funcs unix_funcs =
#endif
DbgUiIssueRemoteBreakin,
RtlGetSystemTimePrecise,
@ -408,10 +408,10 @@ index d5e8153b313..05a45916714 100644
ntdll_ceil,
ntdll_cos,
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
index 68c2e560938..baa1ab0e786 100644
index d4092438644..b67f5fc8f10 100644
--- a/dlls/ntdll/unix/sync.c
+++ b/dlls/ntdll/unix/sync.c
@@ -115,8 +115,6 @@ static inline ULONGLONG monotonic_counter(void)
@@ -114,8 +114,6 @@ static inline ULONGLONG monotonic_counter(void)
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
@ -420,7 +420,7 @@ index 68c2e560938..baa1ab0e786 100644
static int futex_private = 128;
@@ -130,16 +128,6 @@ static inline int futex_wake( const int *addr, int val )
@@ -129,16 +127,6 @@ static inline int futex_wake( const int *addr, int val )
return syscall( __NR_futex, addr, FUTEX_WAKE | futex_private, val, NULL, 0, 0 );
}
@ -437,7 +437,7 @@ index 68c2e560938..baa1ab0e786 100644
static inline int use_futexes(void)
{
static int supported = -1;
@@ -157,16 +145,6 @@ static inline int use_futexes(void)
@@ -156,16 +144,6 @@ static inline int use_futexes(void)
return supported;
}
@ -454,7 +454,7 @@ index 68c2e560938..baa1ab0e786 100644
#endif
@@ -2449,290 +2427,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
@@ -2390,290 +2368,3 @@ NTSTATUS WINAPI NtWaitForAlertByThreadId( const void *address, const LARGE_INTEG
return NtWaitForSingleObject( ntdll_get_thread_data()->tid_alert_event, FALSE, timeout );
#endif
}
@ -746,10 +746,10 @@ index 68c2e560938..baa1ab0e786 100644
-
-#endif
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
index f3a85dcd8d4..182aa86e68f 100644
index dc6d5462c0c..ffc701b1c27 100644
--- a/dlls/ntdll/unix/unix_private.h
+++ b/dlls/ntdll/unix/unix_private.h
@@ -99,12 +99,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
@@ -98,12 +98,6 @@ extern void (WINAPI *pKiUserApcDispatcher)(CONTEXT*,ULONG_PTR,ULONG_PTR,ULON
extern NTSTATUS (WINAPI *pKiUserExceptionDispatcher)(EXCEPTION_RECORD*,CONTEXT*) DECLSPEC_HIDDEN;
extern void (WINAPI *pLdrInitializeThunk)(CONTEXT*,void**,ULONG_PTR,ULONG_PTR) DECLSPEC_HIDDEN;
extern void (WINAPI *pRtlUserThreadStart)( PRTL_THREAD_START_ROUTINE entry, void *arg ) DECLSPEC_HIDDEN;
@ -763,19 +763,19 @@ index f3a85dcd8d4..182aa86e68f 100644
extern USHORT * CDECL get_unix_codepage_data(void) DECLSPEC_HIDDEN;
diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h
index 31f2c3a5cd8..db7540dc1b7 100644
index 046418e50e3..a90aa183287 100644
--- a/dlls/ntdll/unixlib.h
+++ b/dlls/ntdll/unixlib.h
@@ -27,7 +27,7 @@
@@ -26,7 +26,7 @@
struct _DISPATCHER_CONTEXT;
/* increment this when you change the function table */
-#define NTDLL_UNIXLIB_VERSION 111
+#define NTDLL_UNIXLIB_VERSION 112
-#define NTDLL_UNIXLIB_VERSION 112
+#define NTDLL_UNIXLIB_VERSION 113
struct unix_funcs
{
@@ -40,14 +40,6 @@ struct unix_funcs
@@ -39,14 +39,6 @@ struct unix_funcs
NTSTATUS (WINAPI *DbgUiIssueRemoteBreakin)( HANDLE process );
LONGLONG (WINAPI *RtlGetSystemTimePrecise)(void);
@ -791,5 +791,5 @@ index 31f2c3a5cd8..db7540dc1b7 100644
double (CDECL *atan)( double d );
double (CDECL *ceil)( double d );
--
2.30.0
2.20.1

View File

@ -1,252 +0,0 @@
From 97de1cf5ea27e1da413cd628e8eb3ec1d4f9fd38 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 26 Nov 2020 21:57:29 +1100
Subject: [PATCH] odbccp32: Implement SQLWriteDSNToIni/W
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=50150
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/odbccp32/odbccp32.c | 96 +++++++++++++++++++++++++++++++--
dlls/odbccp32/tests/misc.c | 108 +++++++++++++++++++++++++++++++++++++
2 files changed, 199 insertions(+), 5 deletions(-)
diff --git a/dlls/odbccp32/odbccp32.c b/dlls/odbccp32/odbccp32.c
index 420f206b700..53ca70c0b9f 100644
--- a/dlls/odbccp32/odbccp32.c
+++ b/dlls/odbccp32/odbccp32.c
@@ -1691,16 +1691,102 @@ BOOL WINAPI SQLValidDSN(LPCSTR lpszDSN)
BOOL WINAPI SQLWriteDSNToIniW(LPCWSTR lpszDSN, LPCWSTR lpszDriver)
{
+ BOOL ret = FALSE;
+ HKEY hkey, hkeydriver;
+ WCHAR *filename = NULL;
+ DWORD size = 0, type;
+
+ TRACE("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver));
+
clear_errors();
- FIXME("%s %s\n", debugstr_w(lpszDSN), debugstr_w(lpszDriver));
- return TRUE;
+
+ if (!SQLValidDSNW(lpszDSN))
+ {
+ push_error(ODBC_ERROR_INVALID_DSN, odbc_error_invalid_dsn);
+ return FALSE;
+ }
+
+ /* It doesn't matter if we cannot find the driver, windows just writes a blank value. */
+ if ((ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, odbcini, &hkey)) == ERROR_SUCCESS)
+ {
+ HKEY hkeydriver;
+
+ if ((ret = RegOpenKeyW(hkey, lpszDriver, &hkeydriver)) == ERROR_SUCCESS)
+ {
+ ret = RegGetValueW(hkeydriver, NULL, L"driver", RRF_RT_REG_SZ, &type, NULL, &size);
+ /* Windows ignores the fact the driver key is missing */
+ if(ret == ERROR_SUCCESS && type == REG_SZ && size)
+ {
+ filename = HeapAlloc(GetProcessHeap(), 0, size);
+ if(!filename)
+ {
+ RegCloseKey(hkeydriver);
+ RegCloseKey(hkey);
+ push_error(ODBC_ERROR_OUT_OF_MEM, odbc_error_out_of_mem);
+
+ return FALSE;
+ }
+ ret = RegGetValueW(hkeydriver, NULL, L"driver", RRF_RT_REG_SZ, &type, filename, &size);
+ }
+
+ RegCloseKey(hkeydriver);
+ }
+
+ RegCloseKey(hkey);
+ }
+
+ if (RegCreateKeyW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\ODBC\\ODBC.INI", &hkey) == ERROR_SUCCESS)
+ {
+ HKEY sources;
+
+ if (RegCreateKeyW(hkey, L"ODBC Data Sources", &sources) == ERROR_SUCCESS)
+ {
+ RegSetValueExW(sources, lpszDSN, 0, REG_SZ, (BYTE*)lpszDriver, (lstrlenW(lpszDriver)+1)*sizeof(WCHAR));
+ RegCloseKey(sources);
+ }
+
+ RegDeleteTreeW(hkey, lpszDSN);
+
+ if (RegCreateKeyW(hkey, lpszDSN, &hkeydriver) == ERROR_SUCCESS)
+ {
+ if (filename)
+ RegSetValueExW(sources, L"driver", 0, REG_SZ, (BYTE*)filename, (lstrlenW(filename)+1)*sizeof(WCHAR));
+ else
+ RegSetValueExW(sources, L"driver", 0, REG_SZ, (BYTE*)L"", sizeof(L""));
+
+ RegCloseKey(hkeydriver);
+ ret = TRUE;
+ }
+
+ RegCloseKey(hkey);
+ }
+
+ if (!ret)
+ push_error(ODBC_ERROR_REQUEST_FAILED, odbc_error_request_failed);
+
+ heap_free(filename);
+
+ return ret;
}
BOOL WINAPI SQLWriteDSNToIni(LPCSTR lpszDSN, LPCSTR lpszDriver)
{
- clear_errors();
- FIXME("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver));
- return TRUE;
+ BOOL ret = FALSE;
+ WCHAR *dsn, *driver;
+
+ TRACE("%s %s\n", debugstr_a(lpszDSN), debugstr_a(lpszDriver));
+
+ dsn = SQLInstall_strdup(lpszDSN);
+ driver = SQLInstall_strdup(lpszDriver);
+ if (dsn && driver)
+ ret = SQLWriteDSNToIniW(dsn, driver);
+ else
+ push_error(ODBC_ERROR_OUT_OF_MEM, odbc_error_out_of_mem);
+
+ heap_free(dsn);
+ heap_free(driver);
+
+ return ret;
}
BOOL WINAPI SQLWriteFileDSNW(LPCWSTR lpszFileName, LPCWSTR lpszAppName,
diff --git a/dlls/odbccp32/tests/misc.c b/dlls/odbccp32/tests/misc.c
index 0120504227d..f52dcee7acd 100644
--- a/dlls/odbccp32/tests/misc.c
+++ b/dlls/odbccp32/tests/misc.c
@@ -771,6 +771,113 @@ static void test_SQLConfigDataSource(void)
check_error(ODBC_ERROR_COMPONENT_NOT_FOUND);
}
+static void test_SQLWriteDSNToIni(void)
+{
+ BOOL ret;
+ char buffer[MAX_PATH];
+ char path[MAX_PATH];
+ DWORD type, size;
+
+ SQLSetConfigMode(ODBC_SYSTEM_DSN);
+
+ ret = SQLWriteDSNToIni("wine_dbs", "SQL Server");
+ if (!ret)
+ {
+ win_skip("Doesn't have permission to write a System DSN\n");
+ return;
+ }
+
+ if(ret)
+ {
+ HKEY hkey;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\ODBC Data Sources", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(buffer, 0, sizeof(buffer));
+ res = RegQueryValueExA(hkey, "wine_dbs", NULL, &type, (BYTE *)buffer, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ ok(!strcmp(buffer, "SQL Server"), "incorrect string '%s'\n", buffer);
+
+ RegCloseKey(hkey);
+ }
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\wine_dbs", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(path, 0, sizeof(path));
+ res = RegQueryValueExA(hkey, "driver", NULL, &type, (BYTE *)path, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ /* WINE doesn't have a 'SQL Server' driver available */
+ todo_wine ok(strlen(path) != 0, "Invalid value\n");
+
+ RegCloseKey(hkey);
+ }
+
+ ret = SQLRemoveDSNFromIni("wine_dbs");
+ ok(ret, "got %d\n", ret);
+ }
+
+ /* Show that values are writen, even though an invalid driver was specified. */
+ ret = SQLWriteDSNToIni("wine_mis", "Missing Access Driver (*.mis)");
+ ok(ret, "got %d\n", ret);
+ if(ret)
+ {
+ HKEY hkey;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\ODBC Data Sources", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(buffer, 0, sizeof(buffer));
+ res = RegQueryValueExA(hkey, "wine_mis", NULL, &type, (BYTE *)buffer, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ ok(!strcmp(buffer, "Missing Access Driver (*.mis)"), "incorrect string '%s'\n", buffer);
+
+ RegCloseKey(hkey);
+ }
+
+ res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\ODBC\\ODBC.INI\\wine_mis", 0,
+ KEY_READ, &hkey);
+ ok(res == ERROR_SUCCESS, "RegOpenKeyExW failed\n");
+ if (res == ERROR_SUCCESS)
+ {
+ type = 0xdeadbeef;
+ size = MAX_PATH;
+
+ memset(path, 0, sizeof(path));
+ res = RegQueryValueExA(hkey, "driver", NULL, &type, (BYTE *)path, &size);
+ ok(res == ERROR_SUCCESS, "RegGetValueA failed\n");
+ ok(type == REG_SZ, "got %u\n", type);
+ ok(strlen(path) == 0, "Invalid value\n");
+
+ RegCloseKey(hkey);
+ }
+
+ ret = SQLRemoveDSNFromIni("wine_mis");
+ ok(ret, "got %d\n", ret);
+ }
+}
+
START_TEST(misc)
{
test_SQLConfigMode();
@@ -785,4 +892,5 @@ START_TEST(misc)
test_SQLValidDSN();
test_SQLValidDSNW();
test_SQLConfigDataSource();
+ test_SQLWriteDSNToIni();
}
--
2.29.2

View File

@ -1 +0,0 @@
Fixes: [50150]: odbccp32: Implement SQLWriteDSNToIni/W

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "c6a3072051fb88edd3847c750c2ec852f11870f6"
echo "b8719736c5a022fa9c50f64adfc3ef58b40460f2"
}
# Show version information
@ -189,7 +189,6 @@ patch_enable_all ()
enable_nvcuda_CUDA_Support="$1"
enable_nvcuvid_CUDA_Video_Support="$1"
enable_nvencodeapi_Video_Encoder="$1"
enable_odbccp32_SQLWriteDSNToIni="$1"
enable_oleaut32_CreateTypeLib="$1"
enable_oleaut32_Load_Save_EMF="$1"
enable_oleaut32_OLEPictureImpl_SaveAsFile="$1"
@ -252,7 +251,6 @@ patch_enable_all ()
enable_user32_rawinput_mouse="$1"
enable_user32_rawinput_mouse_experimental="$1"
enable_user32_recursive_activation="$1"
enable_user32_window_activation="$1"
enable_uxtheme_CloseThemeClass="$1"
enable_version_VerQueryValue="$1"
enable_widl_SLTG_Typelib_Support="$1"
@ -639,9 +637,6 @@ patch_enable ()
nvencodeapi-Video_Encoder)
enable_nvencodeapi_Video_Encoder="$2"
;;
odbccp32-SQLWriteDSNToIni)
enable_odbccp32_SQLWriteDSNToIni="$2"
;;
oleaut32-CreateTypeLib)
enable_oleaut32_CreateTypeLib="$2"
;;
@ -828,9 +823,6 @@ patch_enable ()
user32-recursive-activation)
enable_user32_recursive_activation="$2"
;;
user32-window-activation)
enable_user32_window_activation="$2"
;;
uxtheme-CloseThemeClass)
enable_uxtheme_CloseThemeClass="$2"
;;
@ -1380,13 +1372,6 @@ if test "$enable_wineboot_ProxySettings" -eq 1; then
enable_wineboot_drivers_etc_Stubs=1
fi
if test "$enable_user32_window_activation" -eq 1; then
if test "$enable_user32_recursive_activation" -gt 1; then
abort "Patchset user32-recursive-activation disabled, but user32-window-activation depends on that."
fi
enable_user32_recursive_activation=1
fi
if test "$enable_user32_rawinput_mouse_experimental" -eq 1; then
if test "$enable_user32_rawinput_mouse" -gt 1; then
abort "Patchset user32-rawinput-mouse disabled, but user32-rawinput-mouse-experimental depends on that."
@ -2303,21 +2288,18 @@ fi
# | * [#50293] : native dxdiag complains about missing
# |
# | Modified files:
# | * configure.ac, dlls/d3dpmesh/Makefile.in, dlls/d3dpmesh/d3dpmesh.spec, dlls/d3dpmesh/d3dpmesh_main.c,
# | dlls/d3dpmesh/version.rc, dlls/diactfrm/Makefile.in, dlls/diactfrm/diactfrm.spec, dlls/diactfrm/diactfrm_main.c,
# | dlls/diactfrm/version.rc, dlls/dimap/Makefile.in, dlls/dimap/dimap.spec, dlls/dimap/dimap_main.c, dlls/dimap/version.rc,
# | dlls/dpmodemx/Makefile.in, dlls/dpmodemx/dpmodemx.spec, dlls/dpmodemx/dpmodemx_main.c, dlls/dpmodemx/version.rc,
# | dlls/dpnhupnp/Makefile.in, dlls/dpnhupnp/dpnhupnp.spec, dlls/dpnhupnp/dpnhupnp_main.c, dlls/dpnhupnp/version.rc,
# | dlls/dpvacm/Makefile.in, dlls/dpvacm/dpvacm.spec, dlls/dpvacm/dpvacm_main.c, dlls/dpvacm/version.rc,
# | dlls/dpvvox/Makefile.in, dlls/dpvvox/dpvvox.spec, dlls/dpvvox/dpvvox_main.c, dlls/dpvvox/version.rc,
# | dlls/dsdmoprp/Makefile.in, dlls/dsdmoprp/dsdmoprp.spec, dlls/dsdmoprp/dsdmoprp_main.c, dlls/dsdmoprp/version.rc,
# | dlls/dsound3d/Makefile.in, dlls/dsound3d/dsound3d.spec, dlls/dsound3d/dsound3d_main.c, dlls/dsound3d/version.rc,
# | dlls/dx7vb/Makefile.in, dlls/dx7vb/dx7vb.spec, dlls/dx7vb/dx7vb_main.c, dlls/dx7vb/version.rc,
# | dlls/dxapi.sys/Makefile.in, dlls/dxapi.sys/dxapi.sys.spec, dlls/dxapi.sys/main.c, dlls/dxapi.sys/version.rc,
# | dlls/encapi/Makefile.in, dlls/encapi/encapi.spec, dlls/encapi/encapi_main.c, dlls/encapi/version.rc,
# | dlls/gcdef/Makefile.in, dlls/gcdef/gcdef.spec, dlls/gcdef/gcdef_main.c, dlls/gcdef/version.rc, dlls/qdv/Makefile.in,
# | dlls/qdv/qdv.spec, dlls/qdv/qdv_main.c, dlls/qdv/version.rc, dlls/qedwipes/Makefile.in, dlls/qedwipes/qedwipes.spec,
# | dlls/qedwipes/qedwipes_main.c, dlls/qedwipes/version.rc, loader/wine.inf.in
# | * configure.ac, dlls/d3dpmesh/Makefile.in, dlls/d3dpmesh/d3dpmesh.spec, dlls/d3dpmesh/version.rc,
# | dlls/diactfrm/Makefile.in, dlls/diactfrm/diactfrm.spec, dlls/diactfrm/version.rc, dlls/dimap/Makefile.in,
# | dlls/dimap/dimap.spec, dlls/dimap/version.rc, dlls/dpmodemx/Makefile.in, dlls/dpmodemx/dpmodemx.spec,
# | dlls/dpmodemx/dpmodemx_main.c, dlls/dpmodemx/version.rc, dlls/dpnhupnp/Makefile.in, dlls/dpnhupnp/dpnhupnp.spec,
# | dlls/dpnhupnp/version.rc, dlls/dpvacm/Makefile.in, dlls/dpvacm/dpvacm.spec, dlls/dpvacm/version.rc,
# | dlls/dpvvox/Makefile.in, dlls/dpvvox/dpvvox.spec, dlls/dpvvox/version.rc, dlls/dsdmoprp/Makefile.in,
# | dlls/dsdmoprp/dsdmoprp.spec, dlls/dsdmoprp/version.rc, dlls/dsound3d/Makefile.in, dlls/dsound3d/dsound3d.spec,
# | dlls/dsound3d/version.rc, dlls/dx7vb/Makefile.in, dlls/dx7vb/dx7vb.spec, dlls/dx7vb/version.rc,
# | dlls/dxapi.sys/Makefile.in, dlls/dxapi.sys/dxapi.sys.spec, dlls/dxapi.sys/version.rc, dlls/encapi/Makefile.in,
# | dlls/encapi/encapi.spec, dlls/encapi/version.rc, dlls/gcdef/Makefile.in, dlls/gcdef/gcdef.spec, dlls/gcdef/version.rc,
# | dlls/qdv/Makefile.in, dlls/qdv/qdv.spec, dlls/qdv/version.rc, dlls/qedwipes/Makefile.in, dlls/qedwipes/qedwipes.spec,
# | dlls/qedwipes/version.rc, loader/wine.inf.in
# |
if test "$enable_dxdiag_new_dlls" -eq 1; then
patch_apply dxdiag-new-dlls/0001-d3dpmesh-add-stub-dll.patch
@ -3283,18 +3265,6 @@ if test "$enable_nvencodeapi_Video_Encoder" -eq 1; then
patch_apply nvencodeapi-Video_Encoder/0003-nvencodeapi-Add-support-for-version-6.0.patch
fi
# Patchset odbccp32-SQLWriteDSNToIni
# |
# | This patchset fixes the following Wine bugs:
# | * [#50150] : odbccp32: Implement SQLWriteDSNToIni/W
# |
# | Modified files:
# | * dlls/odbccp32/odbccp32.c, dlls/odbccp32/tests/misc.c
# |
if test "$enable_odbccp32_SQLWriteDSNToIni" -eq 1; then
patch_apply odbccp32-SQLWriteDSNToIni/0001-odbccp32-Implement-SQLWriteDSNToIni-W.patch
fi
# Patchset oleaut32-CreateTypeLib
# |
# | This patchset fixes the following Wine bugs:
@ -4125,21 +4095,6 @@ if test "$enable_user32_recursive_activation" -eq 1; then
patch_apply user32-recursive-activation/0002-user32-tests-Test-a-recursive-activation-loop-on-WM_.patch
fi
# Patchset user32-window-activation
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * user32-recursive-activation
# |
# | This patchset fixes the following Wine bugs:
# | * [#47507] Send a WM_ACTIVATE message after restoring a minimized window.
# |
# | Modified files:
# | * dlls/user32/tests/msg.c, dlls/user32/winpos.c
# |
if test "$enable_user32_window_activation" -eq 1; then
patch_apply user32-window-activation/0001-user32-Send-a-WM_ACTIVATE-message-after-restoring-a-.patch
fi
# Patchset uxtheme-CloseThemeClass
# |
# | This patchset fixes the following Wine bugs:
@ -4841,7 +4796,6 @@ fi
# | * dlls/xactengine3_7/xact_dll.c
# |
if test "$enable_xactengine3_7_PrepareWave" -eq 1; then
patch_apply xactengine3_7-PrepareWave/0001-xactengine3_7-Implement-IXACT3Engine-PrepareWave.patch
patch_apply xactengine3_7-PrepareWave/0002-xactengine3_7-Implement-IXACT3Engine-PrepareStreamin.patch
patch_apply xactengine3_7-PrepareWave/0003-xactengine3_7-Implement-IXACT3Engine-PrepareInMemory.patch
fi

View File

@ -1,179 +0,0 @@
From 01c9f751698b45255b3a43f44ae656bf09646ddc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 7 Mar 2017 18:30:33 +0100
Subject: [PATCH] ntdll: Implement SystemExtendedHandleInformation in
NtQuerySystemInformation.
---
dlls/ntdll/tests/info.c | 51 +++++++++++++++++++++++++++++++++++++++
dlls/ntdll/unix/system.c | 52 ++++++++++++++++++++++++++++++++++++++++
include/winternl.h | 21 ++++++++++++++++
3 files changed, 124 insertions(+)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index e5137ef5a45..04b8a6c454d 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -570,6 +570,56 @@ done:
HeapFree( GetProcessHeap(), 0, shi);
}
+static void test_query_handle_ex(void)
+{
+ NTSTATUS status;
+ ULONG ExpectedLength, ReturnLength;
+ ULONG SystemInformationLength = sizeof(SYSTEM_HANDLE_INFORMATION_EX);
+ SYSTEM_HANDLE_INFORMATION_EX* shi = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength);
+ HANDLE EventHandle;
+ BOOL found;
+ INT i;
+
+ EventHandle = CreateEventA(NULL, FALSE, FALSE, NULL);
+ ok( EventHandle != NULL, "CreateEventA failed %u\n", GetLastError() );
+
+ ReturnLength = 0xdeadbeef;
+ status = pNtQuerySystemInformation(SystemExtendedHandleInformation, shi, SystemInformationLength, &ReturnLength);
+ ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08x\n", status);
+ ok( ReturnLength != 0xdeadbeef, "Expected valid ReturnLength\n" );
+
+ SystemInformationLength = ReturnLength;
+ shi = HeapReAlloc(GetProcessHeap(), 0, shi , SystemInformationLength);
+ memset(shi, 0x55, SystemInformationLength);
+
+ ReturnLength = 0xdeadbeef;
+ status = pNtQuerySystemInformation(SystemExtendedHandleInformation, shi, SystemInformationLength, &ReturnLength);
+ ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status );
+ ExpectedLength = FIELD_OFFSET(SYSTEM_HANDLE_INFORMATION_EX, Handle[shi->Count]);
+ ok( ReturnLength == ExpectedLength, "Expected length %u, got %u\n", ExpectedLength, ReturnLength );
+ ok( shi->Count > 1, "Expected more than 1 handle, got %u\n", (DWORD)shi->Count );
+
+ for (i = 0, found = FALSE; i < shi->Count && !found; i++)
+ found = (shi->Handle[i].UniqueProcessId == GetCurrentProcessId()) &&
+ ((HANDLE)(ULONG_PTR)shi->Handle[i].HandleValue == EventHandle);
+ ok( found, "Expected to find event handle %p (pid %x) in handle list\n", EventHandle, GetCurrentProcessId() );
+
+ CloseHandle(EventHandle);
+
+ ReturnLength = 0xdeadbeef;
+ status = pNtQuerySystemInformation(SystemExtendedHandleInformation, shi, SystemInformationLength, &ReturnLength);
+ ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status );
+ for (i = 0, found = FALSE; i < shi->Count && !found; i++)
+ found = (shi->Handle[i].UniqueProcessId == GetCurrentProcessId()) &&
+ ((HANDLE)(ULONG_PTR)shi->Handle[i].HandleValue == EventHandle);
+ ok( !found, "Unexpectedly found event handle in handle list\n" );
+
+ status = pNtQuerySystemInformation(SystemExtendedHandleInformation, NULL, SystemInformationLength, &ReturnLength);
+ ok( status == STATUS_ACCESS_VIOLATION, "Expected STATUS_ACCESS_VIOLATION, got %08x\n", status );
+
+ HeapFree( GetProcessHeap(), 0, shi);
+}
+
static void test_query_cache(void)
{
NTSTATUS status;
@@ -2593,6 +2643,7 @@ START_TEST(info)
test_query_procperf();
test_query_module();
test_query_handle();
+ test_query_handle_ex();
test_query_cache();
test_query_interrupt();
test_time_adjustment();
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index e34f6ab9384..4597a8d788e 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -2399,6 +2399,58 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
break;
}
+ case SystemExtendedHandleInformation:
+ {
+ struct handle_info *handle_info;
+ DWORD i, num_handles;
+
+ if (size < sizeof(SYSTEM_HANDLE_INFORMATION_EX))
+ {
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ break;
+ }
+
+ if (!info)
+ {
+ ret = STATUS_ACCESS_VIOLATION;
+ break;
+ }
+
+ num_handles = size - FIELD_OFFSET( SYSTEM_HANDLE_INFORMATION_EX, Handle );
+ num_handles /= sizeof(SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX);
+ if (!(handle_info = malloc( sizeof(*handle_info) * num_handles )))
+ return STATUS_NO_MEMORY;
+
+ SERVER_START_REQ( get_system_handles )
+ {
+ wine_server_set_reply( req, handle_info, sizeof(*handle_info) * num_handles );
+ if (!(ret = wine_server_call( req )))
+ {
+ SYSTEM_HANDLE_INFORMATION_EX *shi = info;
+ shi->Count = wine_server_reply_size( req ) / sizeof(*handle_info);
+ shi->Reserved = 0;
+ len = FIELD_OFFSET( SYSTEM_HANDLE_INFORMATION_EX, Handle[shi->Count] );
+ for (i = 0; i < shi->Count; i++)
+ {
+ memset( &shi->Handle[i], 0, sizeof(shi->Handle[i]) );
+ shi->Handle[i].UniqueProcessId = handle_info[i].owner;
+ shi->Handle[i].HandleValue = handle_info[i].handle;
+ shi->Handle[i].GrantedAccess = handle_info[i].access;
+ /* FIXME: Fill out remaining fields */
+ }
+ }
+ else if (ret == STATUS_BUFFER_TOO_SMALL)
+ {
+ len = FIELD_OFFSET( SYSTEM_HANDLE_INFORMATION_EX, Handle[reply->count] );
+ ret = STATUS_INFO_LENGTH_MISMATCH;
+ }
+ }
+ SERVER_END_REQ;
+
+ free( handle_info );
+ break;
+ }
+
case SystemCacheInformation:
{
SYSTEM_CACHE_INFORMATION sci = { 0 };
diff --git a/include/winternl.h b/include/winternl.h
index 091a22376f8..1266f55c6b1 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -1532,6 +1532,27 @@ typedef struct _SYSTEM_HANDLE_INFORMATION {
SYSTEM_HANDLE_ENTRY Handle[1];
} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
+/* System Information Class 0x40 */
+
+typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX
+{
+ PVOID Object;
+ ULONG_PTR UniqueProcessId;
+ ULONG_PTR HandleValue;
+ ULONG GrantedAccess;
+ USHORT CreatorBackTraceIndex;
+ USHORT ObjectTypeIndex;
+ ULONG HandleAttributes;
+ ULONG Reserved;
+} SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO_EX;
+
+typedef struct _SYSTEM_HANDLE_INFORMATION_EX
+{
+ ULONG_PTR Count;
+ ULONG_PTR Reserved;
+ SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX Handle[1];
+} SYSTEM_HANDLE_INFORMATION_EX, *PSYSTEM_HANDLE_INFORMATION_EX;
+
/* System Information Class 0x15 */
typedef struct _SYSTEM_CACHE_INFORMATION {
--
2.27.0

View File

@ -1,108 +0,0 @@
From f4c44206896c0fdbcff7c465e631acff98bc920e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 8 Mar 2017 17:44:17 +0100
Subject: [PATCH] ntdll: Set object type for System(Extended)HandleInformation
in NtQuerySystemInformation.
---
dlls/ntdll/unix/system.c | 4 +++-
server/directory.c | 6 ++++++
server/handle.c | 10 ++++++++++
server/object.h | 1 +
server/protocol.def | 1 +
5 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
index 34cea04f852..7ae3f12753b 100644
--- a/dlls/ntdll/unix/system.c
+++ b/dlls/ntdll/unix/system.c
@@ -1970,7 +1970,8 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
shi->Handle[i].OwnerPid = handle_info[i].owner;
shi->Handle[i].HandleValue = handle_info[i].handle;
shi->Handle[i].AccessMask = handle_info[i].access;
- /* FIXME: Fill out ObjectType, HandleFlags, ObjectPointer */
+ shi->Handle[i].ObjectType = handle_info[i].type;
+ /* FIXME: Fill out HandleFlags, ObjectPointer */
}
}
else if (ret == STATUS_BUFFER_TOO_SMALL)
@@ -2022,6 +2023,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
shi->Handle[i].UniqueProcessId = handle_info[i].owner;
shi->Handle[i].HandleValue = handle_info[i].handle;
shi->Handle[i].GrantedAccess = handle_info[i].access;
+ shi->Handle[i].ObjectTypeIndex = handle_info[i].type;
/* FIXME: Fill out remaining fields */
}
}
diff --git a/server/directory.c b/server/directory.c
index e6c1edc719a..021bc149c4d 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -247,6 +247,12 @@ struct object_type *get_object_type( const struct unicode_str *name )
return type;
}
+/* retrieve the object type index */
+unsigned int type_get_index( struct object_type *type )
+{
+ return type->index;
+}
+
/* Global initialization */
static void create_session( unsigned int id )
diff --git a/server/handle.c b/server/handle.c
index a2a8bb5479c..e40e9e95d8f 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -790,6 +790,7 @@ static int enum_handles( struct process *process, void *user )
struct handle_table *table = process->handles;
struct handle_entry *entry;
struct handle_info *handle;
+ struct object_type *type;
unsigned int i;
if (!table)
@@ -808,6 +809,15 @@ static int enum_handles( struct process *process, void *user )
handle->owner = process->id;
handle->handle = index_to_handle(i);
handle->access = entry->access & ~RESERVED_ALL;
+
+ if ((type = entry->ptr->ops->get_type(entry->ptr)))
+ {
+ handle->type = type_get_index(type);
+ release_object(type);
+ }
+ else
+ handle->type = 0;
+
info->count--;
}
diff --git a/server/object.h b/server/object.h
index f3f7617394d..1517e8c98fb 100644
--- a/server/object.h
+++ b/server/object.h
@@ -262,6 +262,7 @@ static const WCHAR type_Type[] = {'T','y','p','e'};
static const WCHAR type_WindowStation[] = {'W','i','n','d','o','w','S','t','a','t','i','o','n'};
extern void init_types(void);
+extern unsigned int type_get_index( struct object_type *type );
/* symbolic link functions */
diff --git a/server/protocol.def b/server/protocol.def
index 2ec81bb6ad1..72f148b12e7 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3493,6 +3493,7 @@ struct handle_info
process_id_t owner;
obj_handle_t handle;
unsigned int access;
+ unsigned int type;
};
/* Return a list of all opened handles */
--
2.27.0

View File

@ -1,5 +0,0 @@
Fixes: [44629] Process Hacker can't enumerate handles
Fixes: [45374] Yet Another Process Monitor (.NET 2.0 app) reports System.AccessViolationException
#Depends: server-Shared_Memory
# In the process of upstreaming...
Disabled: true

View File

@ -1,328 +0,0 @@
From c9edb576a00f4af2405b088341136ff149233bb2 Mon Sep 17 00:00:00 2001
From: Zhiyi Zhang <zzhang@codeweavers.com>
Date: Tue, 3 Dec 2019 22:54:27 +0800
Subject: [PATCH] user32: Send a WM_ACTIVATE message after restoring a
minimized window.
The WmShowRestoreMinimizedOverlappedSeq message sequence in tests
clearly show that there is a WM_ACTIVATE message at the end of
ShowWindow() calls after restoring a minimized window, and it's
not from SetFocus().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47507
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
---
dlls/user32/tests/msg.c | 247 +++++++++++++++++++++++++++++++++++++++-
dlls/user32/winpos.c | 9 +-
2 files changed, 254 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index cac989860ff..8cec5798511 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -892,6 +892,145 @@ static const struct message WmShowVisMaxPopupSeq[] = {
{ EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, 0, 0 },
{ 0 }
};
+/* ShowWindow(hwnd, SW_RESTORE) to a minimized window */
+static const struct message WmShowRestoreMinimizedOverlappedSeq[] =
+{
+ { HCBT_MINMAX, hook },
+ { WM_QUERYOPEN, sent },
+ { WM_GETTEXT, sent|optional },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_GETMINMAXINFO, sent|defwinproc },
+ { WM_NCCALCSIZE, sent },
+ { HCBT_ACTIVATE, hook },
+ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE },
+ { WM_NCACTIVATE, sent },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ACTIVATE, sent|wparam, WA_ACTIVE },
+ { HCBT_SETFOCUS, hook },
+ { WM_SETFOCUS, sent|defwinproc },
+ { WM_NCPAINT, sent },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ERASEBKGND, sent },
+ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_MOVE, sent|defwinproc },
+ { WM_SIZE, sent|defwinproc },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_NCPAINT, sent|optional },
+ { WM_ERASEBKGND, sent|optional },
+ /* Note this WM_ACTIVATE message even if the window is already active and focused */
+ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
+ { WM_SYNCPAINT, sent|optional },
+ { WM_PAINT, sent },
+ { WM_GETMINMAXINFO, sent|optional },
+ { 0 }
+};
+/* ShowWindow(hwnd, SW_SHOWNOACTIVATE) to a minimized window */
+static const struct message WmShowNoActivateMinimizedOverlappedSeq[] =
+{
+ { HCBT_MINMAX, hook },
+ { WM_QUERYOPEN, sent },
+ { WM_GETTEXT, sent|optional },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_GETMINMAXINFO, sent|defwinproc },
+ { WM_NCCALCSIZE, sent },
+ { WM_NCPAINT, sent },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ERASEBKGND, sent },
+ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_MOVE, sent|defwinproc },
+ { WM_SIZE, sent|defwinproc },
+ /* Following optional messages are on XP/2003 */
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_NCPAINT, sent|optional },
+ { WM_ERASEBKGND, sent|optional },
+ { HCBT_SETFOCUS, hook|optional },
+ { WM_SETFOCUS, sent|optional },
+ { HCBT_ACTIVATE, hook|optional },
+ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE },
+ { WM_NCACTIVATE, sent|optional },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ACTIVATE, sent|wparam|optional, WA_ACTIVE },
+ { HCBT_SETFOCUS, hook|optional },
+ { WM_SETFOCUS, sent|defwinproc|optional },
+ { WM_KILLFOCUS, sent|optional },
+ { WM_SETFOCUS, sent|optional },
+ /* Note this WM_ACTIVATE message on XP even if the window is already active and focused */
+ { WM_ACTIVATE, sent|wparam|lparam|optional, WA_ACTIVE, 0 },
+ { WM_SYNCPAINT, sent|optional },
+ { WM_PAINT, sent },
+ { WM_GETMINMAXINFO, sent|optional },
+ { 0 }
+};
+/* ShowWindow(hwnd, SW_RESTORE) to an active minimized window */
+static const struct message WmShowRestoreActiveMinimizedOverlappedSeq[] =
+{
+ { HCBT_MINMAX, hook },
+ { WM_QUERYOPEN, sent },
+ { WM_GETTEXT, sent|optional },
+ { WM_NCACTIVATE, sent },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
+ { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_MOVE, sent|optional },
+ { WM_SIZE, sent|optional },
+ { WM_GETTEXT, sent|optional },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_GETMINMAXINFO, sent|defwinproc },
+ { WM_NCCALCSIZE, sent },
+ { WM_NCPAINT, sent },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ERASEBKGND, sent },
+ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_MOVE, sent|defwinproc },
+ { WM_SIZE, sent|defwinproc },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_NCPAINT, sent|optional },
+ { WM_ERASEBKGND, sent|optional },
+ { HCBT_SETFOCUS, hook },
+ { WM_SETFOCUS, sent },
+ /* Note this WM_ACTIVATE message even if the window is already active */
+ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
+ { WM_SYNCPAINT, sent|optional },
+ { WM_PAINT, sent },
+ { WM_GETMINMAXINFO, sent|optional },
+ { 0 }
+};
+/* ShowWindow(hwnd, SW_SHOWNOACTIVATE) to an active minimized window */
+static const struct message WmShowNoActivateActiveMinimizedOverlappedSeq[] =
+{
+ { HCBT_MINMAX, hook },
+ { WM_QUERYOPEN, sent },
+ { WM_GETTEXT, sent|optional },
+ { WM_NCACTIVATE, sent },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
+ { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_MOVE, sent|optional },
+ { WM_SIZE, sent|optional },
+ { WM_GETTEXT, sent|optional },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_GETMINMAXINFO, sent|defwinproc },
+ { WM_NCCALCSIZE, sent },
+ { WM_NCPAINT, sent },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ERASEBKGND, sent },
+ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_MOVE, sent|defwinproc },
+ { WM_SIZE, sent|defwinproc },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_NCPAINT, sent|optional },
+ { WM_ERASEBKGND, sent|optional },
+ /* Following optional messages are present on XP */
+ { HCBT_SETFOCUS, hook|optional },
+ { WM_SETFOCUS, sent|optional },
+ /* Note this WM_ACTIVATE message even if the window is already active and with flag SW_SHOWNOACTIVATE */
+ { WM_ACTIVATE, sent|wparam|lparam|optional, WA_ACTIVE, 0 },
+ { WM_SYNCPAINT, sent|optional },
+ { WM_PAINT, sent },
+ { WM_GETMINMAXINFO, sent|optional },
+ { 0 }
+};
/* CreateWindow (for a child popup window, not initially visible) */
static const struct message WmCreateChildPopupSeq[] = {
{ HCBT_CREATEWND, hook },
@@ -4661,7 +4800,7 @@ static void test_scroll_messages(HWND hwnd)
static void test_showwindow(void)
{
- HWND hwnd, hchild;
+ HWND hwnd, hwnd2, hchild;
RECT rc;
hwnd = CreateWindowExA(0, "TestWindowClass", "Test overlapped", WS_OVERLAPPEDWINDOW,
@@ -4798,6 +4937,68 @@ static void test_showwindow(void)
ok_sequence(WmShowVisMaxPopupSeq, "ShowWindow(SW_SHOWMAXIMIZED):popup", FALSE);
DestroyWindow(hwnd);
flush_sequence();
+
+ /* Test 5:
+ * 1. Restoring a minimized window.
+ */
+ hwnd = CreateWindowA("TestWindowClass", "window1", WS_VISIBLE | WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, 0, 0);
+ ok(hwnd != NULL, "Failed to create window\n");
+
+ hwnd2 = CreateWindowA("static", "window2", WS_VISIBLE | WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, 0, 0);
+ ok(hwnd2 != NULL, "Failed to create window\n");
+
+ ShowWindow(hwnd, SW_MINIMIZE);
+ SetActiveWindow(hwnd2);
+ ok(GetActiveWindow() == hwnd2, "Unexpected active window\n");
+ flush_events();
+ flush_sequence();
+ ShowWindow(hwnd, SW_RESTORE);
+ flush_events();
+ ok_sequence(WmShowRestoreMinimizedOverlappedSeq,
+ "ShowWindow(hwnd, SW_RESTORE): minimized overlapped", TRUE);
+
+ ShowWindow(hwnd, SW_MINIMIZE);
+ SetActiveWindow(hwnd2);
+ ok(GetActiveWindow() == hwnd2, "Unexpected active window\n");
+ flush_events();
+ flush_sequence();
+ ShowWindow(hwnd, SW_SHOWNOACTIVATE);
+ flush_events();
+ ok_sequence(WmShowNoActivateMinimizedOverlappedSeq,
+ "ShowWindow(hwnd, SW_SHOWNOACTIVATE): minimized overlapped", TRUE);
+
+ DestroyWindow(hwnd2);
+ DestroyWindow(hwnd);
+ flush_sequence();
+
+ /* Test 6:
+ * 1. Restoring a minimized but active window.
+ */
+ hwnd = CreateWindowA("TestWindowClass", "parent", WS_VISIBLE | WS_OVERLAPPEDWINDOW, 0, 0, 100, 100, 0, 0, 0, 0);
+ ok(hwnd != NULL, "Failed to create window\n");
+
+ ShowWindow(hwnd, SW_MINIMIZE);
+ SetActiveWindow(hwnd);
+ ok(GetActiveWindow() == hwnd, "Unexpected active window\n");
+ flush_events();
+ flush_sequence();
+ ShowWindow(hwnd, SW_RESTORE);
+ flush_events();
+ ok_sequence(WmShowRestoreActiveMinimizedOverlappedSeq,
+ "ShowWindow(hwnd, SW_RESTORE): active minimized overlapped", TRUE);
+
+ ShowWindow(hwnd, SW_MINIMIZE);
+ SetActiveWindow(hwnd);
+ ok(GetActiveWindow() == hwnd, "Unexpected active window\n");
+ flush_events();
+ flush_sequence();
+ ShowWindow(hwnd, SW_SHOWNOACTIVATE);
+ flush_events();
+ ok_sequence(WmShowNoActivateActiveMinimizedOverlappedSeq,
+ "ShowWindow(hwnd, SW_SHOWNOACTIVATE): active minimized overlapped", TRUE);
+
+ DestroyWindow(hwnd);
+ flush_sequence();
}
static void test_recursive_activation(void)
@@ -15614,6 +15815,42 @@ static const struct message WmRestoreMinimizedOverlappedSeq[] =
{ 0 }
};
+/* DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0) to an active minimized window */
+static const struct message WmRestoreActiveMinimizedOverlappedSeq[] =
+{
+ { HCBT_SYSCOMMAND, hook|wparam|lparam, SC_RESTORE, 0 },
+ { HCBT_MINMAX, hook },
+ { WM_QUERYOPEN, sent },
+ { WM_GETTEXT, sent|optional },
+ { WM_NCACTIVATE, sent },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE|SWP_NOMOVE },
+ { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_MOVE, sent|optional },
+ { WM_SIZE, sent|optional },
+ { WM_GETTEXT, sent|optional },
+ { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_GETMINMAXINFO, sent|defwinproc },
+ { WM_NCCALCSIZE, sent },
+ { WM_NCPAINT, sent },
+ { WM_GETTEXT, sent|defwinproc|optional },
+ { WM_ERASEBKGND, sent },
+ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED },
+ { WM_MOVE, sent|defwinproc },
+ { WM_SIZE, sent|defwinproc },
+ { WM_NCCALCSIZE, sent|optional },
+ { WM_NCPAINT, sent|optional },
+ { WM_ERASEBKGND, sent|optional },
+ { HCBT_SETFOCUS, hook },
+ { WM_SETFOCUS, sent },
+ /* Note this WM_ACTIVATE messages even if the window is already active */
+ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
+ { WM_SYNCPAINT, sent|optional },
+ { WM_PAINT, sent },
+ { WM_GETMINMAXINFO, sent|optional },
+ { 0 }
+};
+
struct rbuttonup_thread_data
{
HWND hwnd;
@@ -15675,7 +15912,15 @@ static void test_defwinproc(void)
DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
flush_events();
ok_sequence(WmRestoreMinimizedOverlappedSeq, "DefWindowProcA(SC_RESTORE):overlapped", TRUE);
+
+ ShowWindow(hwnd, SW_MINIMIZE);
+ SetActiveWindow(hwnd);
+ ok(GetActiveWindow() == hwnd, "Unexpected active window\n");
+ flush_events();
flush_sequence();
+ DefWindowProcA(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
+ flush_events();
+ ok_sequence(WmRestoreActiveMinimizedOverlappedSeq, "DefWindowProcA(SC_RESTORE):active minimized overlapped", TRUE);
GetCursorPos(&pos);
GetWindowRect(hwnd, &rect);
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 968f519478c..66e8dcb15b8 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -1182,7 +1182,14 @@ static BOOL show_window( HWND hwnd, INT cmd )
else WIN_ReleasePtr( wndPtr );
/* if previous state was minimized Windows sets focus to the window */
- if (style & WS_MINIMIZE) SetFocus( hwnd );
+ if (style & WS_MINIMIZE)
+ {
+ SetFocus( hwnd );
+ /* Send a WM_ACTIVATE message for a top level window, even if the window is already active */
+ style = GetWindowLongW( hwnd, GWL_STYLE );
+ if (!(style & WS_CHILD) && !(swp & SWP_NOACTIVATE))
+ SendMessageW( hwnd, WM_ACTIVATE, WA_ACTIVE, 0 );
+ }
done:
SetThreadDpiAwarenessContext( context );
--
2.17.1

View File

@ -1,2 +0,0 @@
Fixes: [47507] Send a WM_ACTIVATE message after restoring a minimized window.
Depends: user32-recursive-activation

View File

@ -1,364 +0,0 @@
From bb8fd38219aa4696173b859eeefcea793a4738b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 17:16:55 +0100
Subject: [PATCH] widl: Support WinRT delegate type.
---
tools/widl/expr.c | 1 +
tools/widl/header.c | 16 +++++++++-----
tools/widl/parser.l | 1 +
tools/widl/parser.y | 20 +++++++++++++++++
tools/widl/typegen.c | 4 ++++
tools/widl/typelib.c | 1 +
tools/widl/typetree.c | 49 ++++++++++++++++++++++++++++++++++++++++++
tools/widl/typetree.h | 10 +++++++++
tools/widl/widltypes.h | 7 ++++++
9 files changed, 104 insertions(+), 5 deletions(-)
diff --git a/tools/widl/expr.c b/tools/widl/expr.c
index c83e9aa5ec0..88d59290d6b 100644
--- a/tools/widl/expr.c
+++ b/tools/widl/expr.c
@@ -466,6 +466,7 @@ static type_t *find_identifier(const char *identifier, const type_t *cont_type,
case TYPE_RUNTIMECLASS:
case TYPE_PARAMETERIZED_TYPE:
case TYPE_PARAMETER:
+ case TYPE_DELEGATE:
/* nothing to do */
break;
case TYPE_ALIAS:
diff --git a/tools/widl/header.c b/tools/widl/header.c
index a4f1db56a01..7ab79d3b6e1 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -470,6 +470,9 @@ void write_type_left(FILE *h, const decl_spec_t *ds, enum name_type name_type, i
case TYPE_RUNTIMECLASS:
fprintf(h, "%s", type_get_name(type_runtimeclass_get_default_iface(t), name_type));
break;
+ case TYPE_DELEGATE:
+ fprintf(h, "%s", type_get_name(type_delegate_get_iface(t), name_type));
+ break;
case TYPE_VOID:
fprintf(h, "void");
break;
@@ -555,6 +558,7 @@ void write_type_right(FILE *h, type_t *t, int is_field)
case TYPE_COCLASS:
case TYPE_INTERFACE:
case TYPE_RUNTIMECLASS:
+ case TYPE_DELEGATE:
break;
case TYPE_APICONTRACT:
case TYPE_PARAMETERIZED_TYPE:
@@ -974,7 +978,7 @@ int has_out_arg_or_return(const var_t *func)
int is_object(const type_t *iface)
{
const attr_t *attr;
- if (type_is_defined(iface) && type_iface_get_inherit(iface))
+ if (type_is_defined(iface) && (type_get_type(iface) == TYPE_DELEGATE || type_iface_get_inherit(iface)))
return 1;
if (iface->attrs) LIST_FOR_EACH_ENTRY( attr, iface->attrs, const attr_t, entry )
if (attr->type == ATTR_OBJECT || attr->type == ATTR_ODL) return 1;
@@ -1799,9 +1803,10 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts)
switch (stmt->type)
{
case STMT_TYPE:
- if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
+ if (type_get_type(stmt->u.type) == TYPE_INTERFACE || type_get_type(stmt->u.type) == TYPE_DELEGATE)
{
type_t *iface = stmt->u.type;
+ if (type_get_type(iface) == TYPE_DELEGATE) iface = type_delegate_get_iface(iface);
if (is_object(iface) || is_attr(iface->attrs, ATTR_DISPINTERFACE))
{
write_forward(header, iface);
@@ -1841,10 +1846,11 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons
switch (stmt->type)
{
case STMT_TYPE:
- if (type_get_type(stmt->u.type) == TYPE_INTERFACE)
+ if (type_get_type(stmt->u.type) == TYPE_INTERFACE || type_get_type(stmt->u.type) == TYPE_DELEGATE)
{
- type_t *iface = stmt->u.type;
- type_t *async_iface = type_iface_get_async_iface(iface);
+ type_t *iface = stmt->u.type, *async_iface;
+ if (type_get_type(stmt->u.type) == TYPE_DELEGATE) iface = type_delegate_get_iface(iface);
+ async_iface = type_iface_get_async_iface(iface);
if (is_object(iface)) is_object_interface++;
if (is_attr(stmt->u.type->attrs, ATTR_DISPINTERFACE) || is_object(stmt->u.type))
{
diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index d319954edd3..f5e91dc741a 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -278,6 +278,7 @@ static const struct keyword keywords[] = {
{"cpp_quote", tCPPQUOTE, 0},
{"declare", tDECLARE, 1},
{"default", tDEFAULT, 0},
+ {"delegate", tDELEGATE, 1},
{"dispinterface", tDISPINTERFACE, 0},
{"double", tDOUBLE, 0},
{"enum", tENUM, 0},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 7ab825b612b..5c3eae7bf82 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -110,6 +110,7 @@ static statement_t *make_statement_module(type_t *type);
static statement_t *make_statement_typedef(var_list_t *names, int declonly);
static statement_t *make_statement_import(const char *str);
static statement_t *make_statement_parameterized_type(type_t *type, type_list_t *params);
+static statement_t *make_statement_delegate(type_t *ret, var_list_t *args);
static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt);
static statement_list_t *append_statements(statement_list_t *, statement_list_t *);
static attr_list_t *append_attribs(attr_list_t *, attr_list_t *);
@@ -185,6 +186,7 @@ static typelib_t *current_typelib;
%token tCUSTOM
%token tDECLARE
%token tDECODE tDEFAULT tDEFAULTBIND
+%token tDELEGATE
%token tDEFAULTCOLLELEM
%token tDEFAULTVALUE
%token tDEFAULTVTABLE
@@ -283,6 +285,7 @@ static typelib_t *current_typelib;
%type <expr_list> m_exprs /* exprs expr_list */ expr_list_int_const
%type <expr> contract_req
%type <expr> static_attr
+%type <type> delegatedef
%type <stgclass> storage_cls_spec
%type <type_qualifier> type_qualifier m_type_qual_list
%type <function_specifier> function_specifier
@@ -388,6 +391,7 @@ gbl_statements: { $$ = NULL; }
| gbl_statements interface ';' { $$ = append_statement($1, make_statement_reference($2)); }
| gbl_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference($2)); }
| gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); }
+ | gbl_statements delegatedef { $$ = append_statement($1, make_statement_type_decl($2)); }
| gbl_statements coclass ';' { $$ = $1;
reg_type($2, $2->name, current_namespace, 0);
}
@@ -412,6 +416,7 @@ imp_statements: { $$ = NULL; }
| imp_statements namespacedef '{' { push_namespace($2); } imp_statements '}'
{ pop_namespace($2); $$ = append_statements($1, $5); }
| imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); }
+ | imp_statements delegatedef { $$ = append_statement($1, make_statement_type_decl($2)); }
| imp_statements coclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); }
| imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2));
reg_type($2, $2->name, current_namespace, 0);
@@ -1024,6 +1029,12 @@ interface:
{ $$ = type_parameterized_interface_declare($2, current_namespace, $5); }
;
+delegatedef: m_attributes tDELEGATE type ident '(' m_args ')' semicolon_opt
+ { $$ = type_delegate_declare($4->name, current_namespace);
+ $$ = type_delegate_define($$, $1, append_statement(NULL, make_statement_delegate($3, $6)));
+ }
+ ;
+
required_types:
qualified_type { $$ = append_type(NULL, $1); }
| parameterized_type { $$ = append_type(NULL, $1); }
@@ -2677,6 +2688,7 @@ static int is_allowed_conf_type(const type_t *type)
case TYPE_INTERFACE:
case TYPE_BITFIELD:
case TYPE_RUNTIMECLASS:
+ case TYPE_DELEGATE:
return FALSE;
case TYPE_APICONTRACT:
case TYPE_PARAMETERIZED_TYPE:
@@ -3319,6 +3331,14 @@ static statement_t *make_statement_parameterized_type(type_t *type, type_list_t
return stmt;
}
+static statement_t *make_statement_delegate(type_t *ret, var_list_t *args)
+{
+ declarator_t *decl = make_declarator(make_var(xstrdup("Invoke")));
+ decl_spec_t *spec = make_decl_spec(ret, NULL, NULL, STG_NONE, 0, 0);
+ append_chain_type(decl, type_new_function(args), 0);
+ return make_statement_declaration(declare_var(NULL, spec, decl, FALSE));
+}
+
static statement_list_t *append_statements(statement_list_t *l1, statement_list_t *l2)
{
if (!l2) return l1;
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 1b5fe16b6ec..ec85f149da1 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -354,6 +354,7 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att
case TYPE_POINTER:
if (type_get_type(type_pointer_get_ref_type(type)) == TYPE_INTERFACE ||
type_get_type(type_pointer_get_ref_type(type)) == TYPE_RUNTIMECLASS ||
+ type_get_type(type_pointer_get_ref_type(type)) == TYPE_DELEGATE ||
(type_get_type(type_pointer_get_ref_type(type)) == TYPE_VOID && is_attr(attrs, ATTR_IIDIS)))
return TGT_IFACE_POINTER;
else if (is_aliaschain_attr(type_pointer_get_ref_type(type), ATTR_CONTEXTHANDLE))
@@ -375,6 +376,7 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att
case TYPE_ALIAS:
case TYPE_BITFIELD:
case TYPE_RUNTIMECLASS:
+ case TYPE_DELEGATE:
break;
case TYPE_APICONTRACT:
case TYPE_PARAMETERIZED_TYPE:
@@ -1978,6 +1980,7 @@ unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align)
case TYPE_RUNTIMECLASS:
case TYPE_PARAMETERIZED_TYPE:
case TYPE_PARAMETER:
+ case TYPE_DELEGATE:
/* these types should not be encountered here due to language
* restrictions (interface, void, coclass, module), logical
* restrictions (alias - due to type_get_type call above) or
@@ -2083,6 +2086,7 @@ static unsigned int type_buffer_alignment(const type_t *t)
case TYPE_RUNTIMECLASS:
case TYPE_PARAMETERIZED_TYPE:
case TYPE_PARAMETER:
+ case TYPE_DELEGATE:
/* these types should not be encountered here due to language
* restrictions (interface, void, coclass, module), logical
* restrictions (alias - due to type_get_type call above) or
diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index 6f6c5f3ccc8..8b2a2401367 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -219,6 +219,7 @@ unsigned short get_type_vt(type_t *t)
case TYPE_UNION:
case TYPE_ENCAPSULATED_UNION:
case TYPE_RUNTIMECLASS:
+ case TYPE_DELEGATE:
return VT_USERDEFINED;
case TYPE_VOID:
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 77148de8d0f..08f9a0e0c09 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -640,6 +640,54 @@ type_t *type_apicontract_define(type_t *apicontract, attr_list_t *attrs)
return apicontract;
}
+static void compute_delegate_iface_names(type_t *delegate)
+{
+ type_t *iface = delegate->details.delegate.iface;
+ iface->namespace = delegate->namespace;
+ iface->name = strmake("I%s", delegate->name);
+ iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
+}
+
+type_t *type_delegate_declare(char *name, struct namespace *namespace)
+{
+ type_t *type = get_type(TYPE_DELEGATE, name, NULL, 0);
+ if (type_get_type_detect_alias(type) != TYPE_DELEGATE)
+ error_loc("delegate %s previously not declared a delegate at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+ return type;
+}
+
+type_t *type_delegate_define(type_t *delegate, attr_list_t *attrs, statement_list_t *stmts)
+{
+ type_t *iface;
+
+ if (delegate->defined)
+ error_loc("delegate %s already defined at %s:%d\n",
+ delegate->name, delegate->loc_info.input_name, delegate->loc_info.line_number);
+
+ delegate->attrs = check_interface_attrs(delegate->name, attrs);
+
+ iface = make_type(TYPE_INTERFACE);
+ iface->attrs = delegate->attrs;
+ iface->details.iface = xmalloc(sizeof(*iface->details.iface));
+ iface->details.iface->disp_props = NULL;
+ iface->details.iface->disp_methods = NULL;
+ iface->details.iface->stmts = stmts;
+ iface->details.iface->inherit = find_type("IUnknown", NULL, 0);
+ if (!iface->details.iface->inherit) error_loc("IUnknown is undefined\n");
+ iface->details.iface->disp_inherit = NULL;
+ iface->details.iface->async_iface = NULL;
+ iface->details.iface->requires = NULL;
+ iface->defined = TRUE;
+ compute_method_indexes(iface);
+
+ delegate->details.delegate.iface = iface;
+ delegate->defined = TRUE;
+ compute_delegate_iface_names(delegate);
+
+ return delegate;
+}
+
type_t *type_parameterized_interface_declare(char *name, struct namespace *namespace, type_list_t *params)
{
type_t *type = get_type(TYPE_PARAMETERIZED_TYPE, name, namespace, 0);
@@ -799,6 +847,7 @@ static type_t *replace_type_parameters_in_type(type_t *type, type_list_t *orig,
case TYPE_BITFIELD:
case TYPE_INTERFACE:
case TYPE_RUNTIMECLASS:
+ case TYPE_DELEGATE:
return type;
case TYPE_PARAMETER:
for (o = orig, r = repl; o && r; o = o->next, r = r->next)
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index b3812649f59..413f1f9e41b 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -64,6 +64,8 @@ type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *i
type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref_list_t *ifaces);
type_t *type_apicontract_declare(char *name, struct namespace *namespace);
type_t *type_apicontract_define(type_t *apicontract, attr_list_t *attrs);
+type_t *type_delegate_declare(char *name, struct namespace *namespace);
+type_t *type_delegate_define(type_t *delegate, attr_list_t *attrs, statement_list_t *stmts);
type_t *type_parameterized_interface_declare(char *name, struct namespace *namespace, type_list_t *params);
type_t *type_parameterized_interface_define(type_t *type, attr_list_t *attrs, type_t *inherit, statement_list_t *stmts, type_list_t *requires);
type_t *type_parameterized_type_specialize_partial(type_t *type, type_list_t *params);
@@ -251,6 +253,7 @@ static inline int type_is_complete(const type_t *type)
case TYPE_ARRAY:
case TYPE_BITFIELD:
case TYPE_RUNTIMECLASS:
+ case TYPE_DELEGATE:
return TRUE;
case TYPE_APICONTRACT:
case TYPE_PARAMETERIZED_TYPE:
@@ -373,6 +376,13 @@ static inline type_t *type_runtimeclass_get_default_iface(const type_t *type)
return NULL;
}
+static inline type_t *type_delegate_get_iface(const type_t *type)
+{
+ type = type_get_real_type(type);
+ assert(type_get_type(type) == TYPE_DELEGATE);
+ return type->details.delegate.iface;
+}
+
static inline const decl_spec_t *type_pointer_get_ref(const type_t *type)
{
type = type_get_real_type(type);
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index be82342e31a..d55922b72e9 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -442,6 +442,11 @@ struct parameterized_details
type_list_t *params;
};
+struct delegate_details
+{
+ type_t *iface;
+};
+
#define HASHMAX 64
struct namespace {
@@ -472,6 +477,7 @@ enum type_type
TYPE_RUNTIMECLASS,
TYPE_PARAMETERIZED_TYPE,
TYPE_PARAMETER,
+ TYPE_DELEGATE,
};
struct _type_t {
@@ -494,6 +500,7 @@ struct _type_t {
struct alias_details alias;
struct runtimeclass_details runtimeclass;
struct parameterized_details parameterized;
+ struct delegate_details delegate;
} details;
const char *c_name;
unsigned int typestring_offset;
--
2.20.1

View File

@ -1,206 +0,0 @@
From bb804812bf6bd0e15e3c2474f1ef2c0d24873fac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 4 Feb 2021 17:19:39 +0100
Subject: [PATCH] widl: Support WinRT parameterized delegate type.
---
include/windows.foundation.idl | 6 +++
tools/widl/parser.y | 6 +++
tools/widl/typetree.c | 73 ++++++++++++++++++++++++++++++----
tools/widl/typetree.h | 2 +
4 files changed, 80 insertions(+), 7 deletions(-)
diff --git a/include/windows.foundation.idl b/include/windows.foundation.idl
index 5f7a49c38e4..9583fa5bcc8 100644
--- a/include/windows.foundation.idl
+++ b/include/windows.foundation.idl
@@ -113,6 +113,12 @@ namespace Windows {
}
#ifdef __WIDL__
+ [
+ contract(Windows.Foundation.FoundationContract, 1.0),
+ uuid(9de1c535-6ae1-11e0-84e1-18a905bcc53f)
+ ]
+ delegate void EventHandler<T>([in] IInspectable *sender, [in] T args);
+
namespace Collections
{
[
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 5c3eae7bf82..d8ab4a24ced 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1033,6 +1033,12 @@ delegatedef: m_attributes tDELEGATE type ident '(' m_args ')' semicolon_opt
{ $$ = type_delegate_declare($4->name, current_namespace);
$$ = type_delegate_define($$, $1, append_statement(NULL, make_statement_delegate($3, $6)));
}
+ | m_attributes tDELEGATE type ident
+ '<' { push_parameters_namespace($4->name); } type_parameters '>'
+ '(' m_args ')' { pop_parameters_namespace($4->name); } semicolon_opt
+ { $$ = type_parameterized_delegate_declare($4->name, current_namespace, $7);
+ $$ = type_parameterized_delegate_define($$, $1, append_statement(NULL, make_statement_delegate($3, $10)));
+ }
;
required_types:
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 08f9a0e0c09..a83e175d288 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -142,16 +142,16 @@ static char const *parameterized_type_shorthands[][2] = {
{"Windows_CFoundation_C", "__F"},
};
-static char *format_parameterized_type_c_name(type_t *type, type_list_t *params)
+static char *format_parameterized_type_c_name(type_t *type, type_list_t *params, const char *prefix)
{
size_t len = 0, pos = 0;
char *buf = NULL, *tmp;
type_list_t *entry;
int i, count = 0;
- pos += append_namespaces(&buf, &len, pos, type->namespace, "__x_", "_C", type->name, use_abi_namespace ? "ABI" : NULL);
+ pos += append_namespaces(&buf, &len, pos, type->namespace, "__x_", "_C", "", use_abi_namespace ? "ABI" : NULL);
for (entry = params; entry; entry = entry->next) count++;
- pos += strappend(&buf, &len, pos, "_%d", count);
+ pos += strappend(&buf, &len, pos, "%s%s_%d", prefix, type->name, count);
for (entry = params; entry; entry = entry->next)
{
for (type = entry->type; type->type_type == TYPE_POINTER; type = type_pointer_get_ref_type(type)) {}
@@ -640,12 +640,13 @@ type_t *type_apicontract_define(type_t *apicontract, attr_list_t *attrs)
return apicontract;
}
-static void compute_delegate_iface_names(type_t *delegate)
+static void compute_delegate_iface_names(type_t *delegate, type_t *type, type_list_t *params)
{
type_t *iface = delegate->details.delegate.iface;
iface->namespace = delegate->namespace;
iface->name = strmake("I%s", delegate->name);
- iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
+ if (type) iface->c_name = format_parameterized_type_c_name(type, params, "I");
+ else iface->c_name = format_namespace(delegate->namespace, "__x_", "_C", iface->name, use_abi_namespace ? "ABI" : NULL);
}
type_t *type_delegate_declare(char *name, struct namespace *namespace)
@@ -683,7 +684,7 @@ type_t *type_delegate_define(type_t *delegate, attr_list_t *attrs, statement_lis
delegate->details.delegate.iface = iface;
delegate->defined = TRUE;
- compute_delegate_iface_names(delegate);
+ compute_delegate_iface_names(delegate, NULL, NULL);
return delegate;
}
@@ -727,6 +728,46 @@ type_t *type_parameterized_interface_define(type_t *type, attr_list_t *attrs, ty
return type;
}
+type_t *type_parameterized_delegate_declare(char *name, struct namespace *namespace, type_list_t *params)
+{
+ type_t *type = get_type(TYPE_PARAMETERIZED_TYPE, name, namespace, 0);
+ if (type_get_type_detect_alias(type) != TYPE_PARAMETERIZED_TYPE)
+ error_loc("pdelegate %s previously not declared a pdelegate at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+ type->details.parameterized.type = make_type(TYPE_DELEGATE);
+ type->details.parameterized.params = params;
+ return type;
+}
+
+type_t *type_parameterized_delegate_define(type_t *type, attr_list_t *attrs, statement_list_t *stmts)
+{
+ type_t *iface, *delegate;
+
+ if (type->defined)
+ error_loc("pdelegate %s already defined at %s:%d\n",
+ type->name, type->loc_info.input_name, type->loc_info.line_number);
+
+ type->attrs = check_interface_attrs(type->name, attrs);
+
+ delegate = type->details.parameterized.type;
+ delegate->attrs = type->attrs;
+ delegate->details.delegate.iface = make_type(TYPE_INTERFACE);
+
+ iface = delegate->details.delegate.iface;
+ iface->details.iface = xmalloc(sizeof(*iface->details.iface));
+ iface->details.iface->disp_props = NULL;
+ iface->details.iface->disp_methods = NULL;
+ iface->details.iface->stmts = stmts;
+ iface->details.iface->inherit = find_type("IUnknown", NULL, 0);
+ if (!iface->details.iface->inherit) error_loc("IUnknown is undefined\n");
+ iface->details.iface->disp_inherit = NULL;
+ iface->details.iface->async_iface = NULL;
+ iface->details.iface->requires = NULL;
+
+ type->defined = TRUE;
+ return type;
+}
+
type_t *type_parameterized_type_specialize_partial(type_t *type, type_list_t *params)
{
type_t *new_type = duptype(type, 0);
@@ -907,6 +948,11 @@ static void type_parameterized_interface_specialize(type_t *tmpl, type_t *iface,
iface->details.iface->requires = NULL;
}
+static void type_parameterized_delegate_specialize(type_t *tmpl, type_t *delegate, type_list_t *orig, type_list_t *repl)
+{
+ type_parameterized_interface_specialize(tmpl->details.delegate.iface, delegate->details.delegate.iface, orig, repl);
+}
+
type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *params)
{
type_t *tmpl = type->details.parameterized.type;
@@ -915,7 +961,13 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
new_type->namespace = type->namespace;
new_type->name = format_parameterized_type_name(type, params);
reg_type(new_type, new_type->name, new_type->namespace, 0);
- new_type->c_name = format_parameterized_type_c_name(type, params);
+ new_type->c_name = format_parameterized_type_c_name(type, params, "");
+
+ if (new_type->type_type == TYPE_DELEGATE)
+ {
+ new_type->details.delegate.iface = duptype(tmpl->details.delegate.iface, 0);
+ compute_delegate_iface_names(new_type, type, params);
+ }
return new_type;
}
@@ -928,6 +980,8 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
if (tmpl->type_type == TYPE_INTERFACE)
type_parameterized_interface_specialize(tmpl, iface, orig, params);
+ else if (tmpl->type_type == TYPE_DELEGATE)
+ type_parameterized_delegate_specialize(tmpl, iface, orig, params);
else
{
error_loc("Unsupported parameterized type template %d\n", tmpl->type_type);
@@ -935,6 +989,11 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
}
iface->defined = TRUE;
+ if (iface->type_type == TYPE_DELEGATE)
+ {
+ iface = iface->details.delegate.iface;
+ iface->defined = TRUE;
+ }
compute_method_indexes(iface);
return iface;
}
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index 413f1f9e41b..b2592473c8c 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -68,6 +68,8 @@ type_t *type_delegate_declare(char *name, struct namespace *namespace);
type_t *type_delegate_define(type_t *delegate, attr_list_t *attrs, statement_list_t *stmts);
type_t *type_parameterized_interface_declare(char *name, struct namespace *namespace, type_list_t *params);
type_t *type_parameterized_interface_define(type_t *type, attr_list_t *attrs, type_t *inherit, statement_list_t *stmts, type_list_t *requires);
+type_t *type_parameterized_delegate_declare(char *name, struct namespace *namespace, type_list_t *params);
+type_t *type_parameterized_delegate_define(type_t *type, attr_list_t *attrs, statement_list_t *stmts);
type_t *type_parameterized_type_specialize_partial(type_t *type, type_list_t *params);
type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *params);
type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *params);
--
2.20.1

View File

@ -1,249 +0,0 @@
From 4280840f7593bfdcd5d20891640271617d570801 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Tue, 1 Dec 2020 17:44:43 +0100
Subject: [PATCH] widl: Compute signatures for parameterized types.
---
tools/widl/typetree.c | 151 +++++++++++++++++++++++++++++++++++++++++
tools/widl/typetree.h | 10 +++
tools/widl/widltypes.h | 2 +
3 files changed, 163 insertions(+)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index a83e175d288..de7f24aeed5 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -49,6 +49,7 @@ type_t *make_type(enum type_type type)
t->type_type = type;
t->attrs = NULL;
t->c_name = NULL;
+ t->signature = NULL;
memset(&t->details, 0, sizeof(t->details));
t->typestring_offset = 0;
t->ptrdesc = 0;
@@ -110,6 +111,125 @@ static size_t append_namespaces(char **buf, size_t *len, size_t pos, struct name
return n;
}
+static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t *type);
+
+static size_t append_var_list_signature(char **buf, size_t *len, size_t pos, var_list_t *var_list)
+{
+ var_t *var;
+ size_t n = 0;
+ if (!var_list) n += strappend(buf, len, pos + n, ";");
+ else LIST_FOR_EACH_ENTRY(var, var_list, var_t, entry)
+ {
+ n += strappend(buf, len, pos + n, ";");
+ n += append_type_signature(buf, len, pos + n, var->declspec.type);
+ }
+ return n;
+}
+
+static size_t append_type_signature(char **buf, size_t *len, size_t pos, type_t *type)
+{
+ const GUID *uuid;
+ size_t n = 0;
+ if (!type) return 0;
+ switch (type->type_type)
+ {
+ case TYPE_INTERFACE:
+ if (type->signature) n += strappend(buf, len, pos + n, "%s", type->signature);
+ else
+ {
+ uuid = type_get_uuid(type);
+ n += strappend(buf, len, pos + n, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ uuid->Data1, uuid->Data2, uuid->Data3,
+ uuid->Data4[0], uuid->Data4[1], uuid->Data4[2], uuid->Data4[3],
+ uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], uuid->Data4[7]);
+ }
+ return n;
+ case TYPE_DELEGATE:
+ n += strappend(buf, len, pos + n, "delegate(");
+ n += append_type_signature(buf, len, pos + n, type_delegate_get_iface(type));
+ n += strappend(buf, len, pos + n, ")");
+ return n;
+ case TYPE_RUNTIMECLASS:
+ n += strappend(buf, len, pos + n, "rc(");
+ n += append_namespaces(buf, len, pos + n, type->namespace, "", ".", type->name, NULL);
+ n += strappend(buf, len, pos + n, ";");
+ n += append_type_signature(buf, len, pos + n, type_runtimeclass_get_default_iface(type));
+ n += strappend(buf, len, pos + n, ")");
+ return n;
+ case TYPE_POINTER:
+ n += append_type_signature(buf, len, pos + n, type->details.pointer.ref.type);
+ return n;
+ case TYPE_ALIAS:
+ if (!strcmp(type->name, "boolean")) n += strappend(buf, len, pos + n, "b1");
+ else n += append_type_signature(buf, len, pos + n, type->details.alias.aliasee.type);
+ return n;
+ case TYPE_STRUCT:
+ n += strappend(buf, len, pos + n, "struct(");
+ n += append_namespaces(buf, len, pos + n, type->namespace, "", ".", type->name, NULL);
+ n += append_var_list_signature(buf, len, pos + n, type->details.structure->fields);
+ n += strappend(buf, len, pos + n, ")");
+ return n;
+ case TYPE_BASIC:
+ switch (type_basic_get_type(type))
+ {
+ case TYPE_BASIC_INT:
+ case TYPE_BASIC_INT32:
+ n += strappend(buf, len, pos + n, type_basic_get_sign(type) < 0 ? "i4" : "u4");
+ return n;
+ case TYPE_BASIC_INT64:
+ n += strappend(buf, len, pos + n, type_basic_get_sign(type) < 0 ? "i8" : "u8");
+ return n;
+ case TYPE_BASIC_INT8:
+ assert(type_basic_get_sign(type) >= 0); /* signature string for signed char isn't specified */
+ n += strappend(buf, len, pos + n, "u1");
+ return n;
+ case TYPE_BASIC_FLOAT:
+ n += strappend(buf, len, pos + n, "f4");
+ return n;
+ case TYPE_BASIC_DOUBLE:
+ n += strappend(buf, len, pos + n, "f8");
+ return n;
+ case TYPE_BASIC_INT16:
+ case TYPE_BASIC_INT3264:
+ case TYPE_BASIC_LONG:
+ case TYPE_BASIC_CHAR:
+ case TYPE_BASIC_HYPER:
+ case TYPE_BASIC_BYTE:
+ case TYPE_BASIC_WCHAR:
+ case TYPE_BASIC_ERROR_STATUS_T:
+ case TYPE_BASIC_HANDLE:
+ error("basic type '%d' signature not implemented\n", type_basic_get_type(type));
+ assert(0); /* FIXME: implement when needed */
+ break;
+ }
+ case TYPE_ENUM:
+ n += strappend(buf, len, pos + n, "enum(");
+ n += append_namespaces(buf, len, pos + n, type->namespace, "", ".", type->name, NULL);
+ if (is_attr(type->attrs, ATTR_FLAGS)) n += strappend(buf, len, pos + n, ";u4");
+ else n += strappend(buf, len, pos + n, ";i4");
+ n += strappend(buf, len, pos + n, ")");
+ return n;
+ case TYPE_ARRAY:
+ case TYPE_ENCAPSULATED_UNION:
+ case TYPE_UNION:
+ case TYPE_COCLASS:
+ error("type '%d' signature for '%s' not implemented\n", type->type_type, type->name);
+ assert(0); /* FIXME: implement when needed */
+ break;
+ case TYPE_VOID:
+ case TYPE_FUNCTION:
+ case TYPE_BITFIELD:
+ case TYPE_MODULE:
+ case TYPE_PARAMETERIZED_TYPE:
+ case TYPE_PARAMETER:
+ case TYPE_APICONTRACT:
+ assert(0); /* should not be there */
+ break;
+ }
+
+ return n;
+}
+
char *format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix, const char *abi_prefix)
{
size_t len = 0;
@@ -137,6 +257,14 @@ char *format_parameterized_type_name(type_t *type, type_list_t *params)
return buf;
}
+char *format_type_signature(type_t *type)
+{
+ size_t len = 0;
+ char *buf = NULL;
+ append_type_signature(&buf, &len, 0, type);
+ return buf;
+}
+
static char const *parameterized_type_shorthands[][2] = {
{"Windows_CFoundation_CCollections_C", "__F"},
{"Windows_CFoundation_C", "__F"},
@@ -172,6 +300,27 @@ static char *format_parameterized_type_c_name(type_t *type, type_list_t *params,
return buf;
}
+static char *format_parameterized_type_signature(type_t *type, type_list_t *params)
+{
+ size_t len = 0, pos = 0;
+ char *buf = NULL;
+ type_list_t *entry;
+
+ const GUID *uuid = type_get_uuid(type);
+ pos += strappend(&buf, &len, pos, "pinterface({%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
+ uuid->Data1, uuid->Data2, uuid->Data3,
+ uuid->Data4[0], uuid->Data4[1], uuid->Data4[2], uuid->Data4[3],
+ uuid->Data4[4], uuid->Data4[5], uuid->Data4[6], uuid->Data4[7]);
+ for (entry = params; entry; entry = entry->next)
+ {
+ pos += strappend(&buf, &len, pos, ";");
+ pos += append_type_signature(&buf, &len, pos, entry->type);
+ }
+ pos += strappend(&buf, &len, pos, ")");
+
+ return buf;
+}
+
type_t *type_new_function(var_list_t *args)
{
var_t *arg;
@@ -988,10 +1137,12 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
return NULL;
}
+ iface->signature = format_parameterized_type_signature(type, params);
iface->defined = TRUE;
if (iface->type_type == TYPE_DELEGATE)
{
iface = iface->details.delegate.iface;
+ iface->signature = format_parameterized_type_signature(type, params);
iface->defined = TRUE;
}
compute_method_indexes(iface);
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index b2592473c8c..9697c4a639f 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -95,6 +95,16 @@ static inline enum type_type type_get_type(const type_t *type)
return type_get_type_detect_alias(type_get_real_type(type));
}
+static inline const GUID *type_get_uuid(const type_t *type)
+{
+ static const GUID empty;
+ attr_t *attr;
+ LIST_FOR_EACH_ENTRY(attr, type->attrs, attr_t, entry)
+ if (attr->type == ATTR_UUID) return attr->u.pval;
+ error("type '%s' uuid not found\n", type->name);
+ return &empty;
+}
+
static inline enum type_basic_type type_basic_get_type(const type_t *type)
{
type = type_get_real_type(type);
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index d55922b72e9..a1fce0ef87d 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -503,6 +503,7 @@ struct _type_t {
struct delegate_details delegate;
} details;
const char *c_name;
+ const char *signature;
unsigned int typestring_offset;
unsigned int ptrdesc; /* used for complex structs */
int typelib_idx;
@@ -658,6 +659,7 @@ void init_loc_info(loc_info_t *);
char *format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix,
const char *abi_prefix);
char *format_parameterized_type_name(type_t *type, type_list_t *params);
+char *format_type_signature(type_t *type);
static inline enum type_type type_get_type_detect_alias(const type_t *type)
{
--
2.20.1

View File

@ -1,317 +0,0 @@
From 9da07acdf882567f4f1e6c3fd017af96ba11348e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Mon, 28 Sep 2020 17:00:41 +0200
Subject: [PATCH] widl: Compute uuids for parameterized types.
---
tools/widl/hash.c | 178 ++++++++++++++++++++++++++++++++++++++++++
tools/widl/hash.h | 14 ++++
tools/widl/typetree.c | 53 +++++++++++++
tools/widl/typetree.h | 2 +-
4 files changed, 246 insertions(+), 1 deletion(-)
diff --git a/tools/widl/hash.c b/tools/widl/hash.c
index 15ec88001d6..df6133866e0 100644
--- a/tools/widl/hash.c
+++ b/tools/widl/hash.c
@@ -639,3 +639,181 @@ unsigned int lhash_val_of_name_sys( syskind_t skind, LCID lcid, LPCSTR lpStr)
return nHiWord | nLoWord;
}
+
+/* SHA1 algorithm
+ *
+ * Based on public domain SHA code by Steve Reid <steve@edmweb.com>
+ */
+
+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
+/* FIXME: This definition of DWORD2BE is little endian specific! */
+#define DWORD2BE(x) (((x) >> 24) & 0xff) | (((x) >> 8) & 0xff00) | (((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000);
+/* FIXME: This definition of blk0 is little endian specific! */
+#define blk0(i) (Block[i] = (rol(Block[i],24)&0xFF00FF00)|(rol(Block[i],8)&0x00FF00FF))
+#define blk1(i) (Block[i&15] = rol(Block[(i+13)&15]^Block[(i+8)&15]^Block[(i+2)&15]^Block[i&15],1))
+#define f1(x,y,z) (z^(x&(y^z)))
+#define f2(x,y,z) (x^y^z)
+#define f3(x,y,z) ((x&y)|(z&(x|y)))
+#define f4(x,y,z) (x^y^z)
+/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
+#define R0(v,w,x,y,z,i) z+=f1(w,x,y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=f1(w,x,y)+blk1(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=f2(w,x,y)+blk1(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=f3(w,x,y)+blk1(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=f4(w,x,y)+blk1(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+/* Hash a single 512-bit block. This is the core of the algorithm. */
+static void SHA1Transform(ULONG State[5], UCHAR Buffer[64])
+{
+ ULONG a, b, c, d, e;
+ ULONG *Block;
+
+ Block = (ULONG*)Buffer;
+
+ /* Copy Context->State[] to working variables */
+ a = State[0];
+ b = State[1];
+ c = State[2];
+ d = State[3];
+ e = State[4];
+
+ /* 4 rounds of 20 operations each. Loop unrolled. */
+ R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+ R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+ R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+ R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+ R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+ R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+ R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+ R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+ R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+ R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+ R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+ R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+ R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+ R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+ R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+ R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+ R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+ R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+ R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+ R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+
+ /* Add the working variables back into Context->State[] */
+ State[0] += a;
+ State[1] += b;
+ State[2] += c;
+ State[3] += d;
+ State[4] += e;
+
+ /* Wipe variables */
+ a = b = c = d = e = 0;
+}
+
+
+/******************************************************************************
+ * A_SHAInit (ntdll.@)
+ *
+ * Initialize a SHA context structure.
+ *
+ * PARAMS
+ * Context [O] SHA context
+ *
+ * RETURNS
+ * Nothing
+ */
+void A_SHAInit(SHA_CTX *Context)
+{
+ /* SHA1 initialization constants */
+ Context->State[0] = 0x67452301;
+ Context->State[1] = 0xEFCDAB89;
+ Context->State[2] = 0x98BADCFE;
+ Context->State[3] = 0x10325476;
+ Context->State[4] = 0xC3D2E1F0;
+ Context->Count[0] =
+ Context->Count[1] = 0;
+}
+
+/******************************************************************************
+ * A_SHAUpdate (ntdll.@)
+ *
+ * Update a SHA context with a hashed data from supplied buffer.
+ *
+ * PARAMS
+ * Context [O] SHA context
+ * Buffer [I] hashed data
+ * BufferSize [I] hashed data size
+ *
+ * RETURNS
+ * Nothing
+ */
+void A_SHAUpdate(SHA_CTX *Context, const unsigned char *Buffer, UINT BufferSize)
+{
+ ULONG BufferContentSize;
+
+ BufferContentSize = Context->Count[1] & 63;
+ Context->Count[1] += BufferSize;
+ if (Context->Count[1] < BufferSize)
+ Context->Count[0]++;
+ Context->Count[0] += (BufferSize >> 29);
+
+ if (BufferContentSize + BufferSize < 64)
+ {
+ RtlCopyMemory(&Context->Buffer[BufferContentSize], Buffer,
+ BufferSize);
+ }
+ else
+ {
+ while (BufferContentSize + BufferSize >= 64)
+ {
+ RtlCopyMemory(Context->Buffer + BufferContentSize, Buffer,
+ 64 - BufferContentSize);
+ Buffer += 64 - BufferContentSize;
+ BufferSize -= 64 - BufferContentSize;
+ SHA1Transform(Context->State, Context->Buffer);
+ BufferContentSize = 0;
+ }
+ RtlCopyMemory(Context->Buffer + BufferContentSize, Buffer, BufferSize);
+ }
+}
+
+/******************************************************************************
+ * A_SHAFinal (ntdll.@)
+ *
+ * Finalize SHA context and return the resulting hash.
+ *
+ * PARAMS
+ * Context [I/O] SHA context
+ * Result [O] resulting hash
+ *
+ * RETURNS
+ * Nothing
+ */
+void A_SHAFinal(SHA_CTX *Context, PULONG Result)
+{
+ INT Pad, Index;
+ UCHAR Buffer[72];
+ ULONG *Count;
+ ULONG BufferContentSize, LengthHi, LengthLo;
+
+ BufferContentSize = Context->Count[1] & 63;
+ if (BufferContentSize >= 56)
+ Pad = 56 + 64 - BufferContentSize;
+ else
+ Pad = 56 - BufferContentSize;
+
+ LengthHi = (Context->Count[0] << 3) | (Context->Count[1] >> (32 - 3));
+ LengthLo = (Context->Count[1] << 3);
+
+ RtlZeroMemory(Buffer + 1, Pad - 1);
+ Buffer[0] = 0x80;
+ Count = (ULONG*)(Buffer + Pad);
+ Count[0] = DWORD2BE(LengthHi);
+ Count[1] = DWORD2BE(LengthLo);
+ A_SHAUpdate(Context, Buffer, Pad + 8);
+
+ for (Index = 0; Index < 5; Index++)
+ Result[Index] = DWORD2BE(Context->State[Index]);
+
+ A_SHAInit(Context);
+}
diff --git a/tools/widl/hash.h b/tools/widl/hash.h
index 3c2fd2914bf..208b193ac87 100644
--- a/tools/widl/hash.h
+++ b/tools/widl/hash.h
@@ -22,6 +22,20 @@
#ifndef __WIDL_HASH_H
#define __WIDL_HASH_H
+#include "windef.h"
+
extern unsigned int lhash_val_of_name_sys( syskind_t skind, LCID lcid, LPCSTR lpStr);
+typedef struct
+{
+ ULONG Unknown[6];
+ ULONG State[5];
+ ULONG Count[2];
+ UCHAR Buffer[64];
+} SHA_CTX;
+
+VOID A_SHAInit(SHA_CTX *ctx);
+VOID A_SHAUpdate(SHA_CTX *ctx, const UCHAR *buffer, UINT size);
+VOID A_SHAFinal(SHA_CTX *ctx, PULONG result);
+
#endif
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index de7f24aeed5..ae11a7cb171 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -29,6 +29,7 @@
#include "parser.h"
#include "typetree.h"
#include "header.h"
+#include "hash.h"
type_t *duptype(type_t *t, int dupname)
{
@@ -1121,6 +1122,57 @@ type_t *type_parameterized_type_specialize_declare(type_t *type, type_list_t *pa
return new_type;
}
+static void compute_interface_signature_uuid(type_t *iface)
+{
+ static unsigned char const wrt_pinterface_namespace[] = {0x11,0xf4,0x7a,0xd5,0x7b,0x73,0x42,0xc0,0xab,0xae,0x87,0x8b,0x1e,0x16,0xad,0xee};
+ static const int version = 5;
+ unsigned char hash[20];
+ SHA_CTX sha_ctx;
+ attr_t *attr;
+ GUID *uuid;
+
+ if (!iface->attrs)
+ {
+ iface->attrs = xmalloc( sizeof(*iface->attrs) );
+ list_init( iface->attrs );
+ }
+
+ LIST_FOR_EACH_ENTRY(attr, iface->attrs, attr_t, entry)
+ if (attr->type == ATTR_UUID) break;
+
+ if (&attr->entry == iface->attrs)
+ {
+ attr = xmalloc( sizeof(*attr) );
+ attr->type = ATTR_UUID;
+ attr->u.pval = xmalloc( sizeof(GUID) );
+ list_add_tail( iface->attrs, &attr->entry );
+ }
+
+ A_SHAInit(&sha_ctx);
+ A_SHAUpdate(&sha_ctx, wrt_pinterface_namespace, sizeof(wrt_pinterface_namespace));
+ A_SHAUpdate(&sha_ctx, (const UCHAR *)iface->signature, strlen(iface->signature));
+ A_SHAFinal(&sha_ctx, (ULONG *)hash);
+
+ /* https://tools.ietf.org/html/rfc4122:
+
+ * Set the four most significant bits (bits 12 through 15) of the
+ time_hi_and_version field to the appropriate 4-bit version number
+ from Section 4.1.3.
+
+ * Set the two most significant bits (bits 6 and 7) of the
+ clock_seq_hi_and_reserved to zero and one, respectively.
+ */
+
+ hash[6] = ((hash[6] & 0x0f) | (version << 4));
+ hash[8] = ((hash[8] & 0x3f) | 0x80);
+
+ uuid = attr->u.pval;
+ uuid->Data1 = ((DWORD)hash[0] << 24)|((DWORD)hash[1] << 16)|((DWORD)hash[2] << 8)|(DWORD)hash[3];
+ uuid->Data2 = ((WORD)hash[4] << 8)|(WORD)hash[5];
+ uuid->Data3 = ((WORD)hash[6] << 8)|(WORD)hash[7];
+ memcpy(&uuid->Data4, hash + 8, sizeof(*uuid) - offsetof(GUID, Data4));
+}
+
type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *params)
{
type_list_t *orig = type->details.parameterized.params;
@@ -1145,6 +1197,7 @@ type_t *type_parameterized_type_specialize_define(type_t *type, type_list_t *par
iface->signature = format_parameterized_type_signature(type, params);
iface->defined = TRUE;
}
+ compute_interface_signature_uuid(iface);
compute_method_indexes(iface);
return iface;
}
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index 9697c4a639f..db43a9aa456 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -99,7 +99,7 @@ static inline const GUID *type_get_uuid(const type_t *type)
{
static const GUID empty;
attr_t *attr;
- LIST_FOR_EACH_ENTRY(attr, type->attrs, attr_t, entry)
+ if (type->attrs) LIST_FOR_EACH_ENTRY(attr, type->attrs, attr_t, entry)
if (attr->type == ATTR_UUID) return attr->u.pval;
error("type '%s' uuid not found\n", type->name);
return &empty;
--
2.20.1

View File

@ -1,4 +1,4 @@
From cacb65b29f688766745372653bd406116e87ee87 Mon Sep 17 00:00:00 2001
From 15ea5663924cc00d76617d4691179e205b9ce323 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Wed, 8 Aug 2018 20:00:15 -0500
Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition.
@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Add a stub implementation of Wow64Transition.
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 4ededa838b4..b0c4853ca48 100644
index abc2c3f828c..645826a61e8 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4109,6 +4109,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
@@ -3940,6 +3940,7 @@ BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
return TRUE;
}
@ -20,7 +20,7 @@ index 4ededa838b4..b0c4853ca48 100644
/***********************************************************************
* restart_winevdm
@@ -4139,7 +4140,7 @@ static void restart_winevdm( RTL_USER_PROCESS_PARAMETERS *params )
@@ -3970,7 +3971,7 @@ static void restart_winevdm( RTL_USER_PROCESS_PARAMETERS *params )
static NTSTATUS process_init(void)
{
RTL_USER_PROCESS_PARAMETERS *params;
@ -29,13 +29,13 @@ index 4ededa838b4..b0c4853ca48 100644
NTSTATUS status;
ANSI_STRING func_name;
UNICODE_STRING nt_name;
@@ -4201,6 +4202,13 @@ static NTSTATUS process_init(void)
@@ -4086,6 +4087,13 @@ static NTSTATUS process_init(void)
MESSAGE( "wine: could not load kernel32.dll, status %x\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
}
+
+ RtlInitUnicodeString( &nt_name, L"\\??\\C:\\windows\\system32\\wow64cpu.dll" );
+ if ((status = load_builtin_dll( NULL, &nt_name, 0, &wow64cpu_wm )) == STATUS_SUCCESS)
+ if ((status = load_builtin_dll( NULL, &nt_name, 0, &wow64cpu_wm, FALSE )) == STATUS_SUCCESS)
+ Wow64Transition = wow64cpu_wm->ldr.DllBase;
+ else
+ WARN( "could not load wow64cpu.dll, status %#x\n", status );
@ -44,10 +44,10 @@ index 4ededa838b4..b0c4853ca48 100644
if ((status = LdrGetProcedureAddress( wm->ldr.DllBase, &func_name,
0, (void **)&pBaseThreadInitThunk )) != STATUS_SUCCESS)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index aa34fdf04d9..34cdeaa1479 100644
index 185dd6767eb..4b40e292fad 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1130,6 +1130,7 @@
@@ -1129,6 +1129,7 @@
@ stdcall WinSqmIsOptedIn()
@ stdcall WinSqmSetDWORD(ptr long long)
@ stdcall WinSqmStartSession(ptr long long)
@ -56,5 +56,5 @@ index aa34fdf04d9..34cdeaa1479 100644
@ stdcall -private -syscall ZwAccessCheck(ptr long long ptr ptr ptr ptr ptr) NtAccessCheck
@ stdcall -private -syscall ZwAccessCheckAndAuditAlarm(ptr long ptr ptr ptr long ptr long ptr ptr ptr) NtAccessCheckAndAuditAlarm
--
2.29.2
2.20.1

View File

@ -1,60 +0,0 @@
From 34fad63be385d80ebee850eb4ae613ea23f758b3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 14 Aug 2020 17:16:07 +1000
Subject: [PATCH 1/3] xactengine3_7: Implement IXACT3Engine PrepareWave
v2: Deal with FACTAudioEngine_PrepareWave isn't implemented.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=49689
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/xactengine3_7/xact_dll.c | 32 ++++++++++++++++++++++++++++++--
1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/dlls/xactengine3_7/xact_dll.c b/dlls/xactengine3_7/xact_dll.c
index c5f96decb72..5bcd8a6202c 100644
--- a/dlls/xactengine3_7/xact_dll.c
+++ b/dlls/xactengine3_7/xact_dll.c
@@ -986,8 +986,36 @@ static HRESULT WINAPI IXACT3EngineImpl_PrepareWave(IXACT3Engine *iface,
IXACT3Wave **ppWave)
{
XACT3EngineImpl *This = impl_from_IXACT3Engine(iface);
- FIXME("(%p): stub!\n", This);
- return E_NOTIMPL;
+ XACT3WaveImpl *wave;
+ FACTWave *fwave = NULL;
+ UINT ret;
+
+ TRACE("(%p)->(0x%08x, %s, %d, %d, %d, %d, %p)\n", This, dwFlags, debugstr_a(szWavePath),
+ wStreamingPacketSize, dwAlignment, dwPlayOffset, nLoopCount, ppWave);
+
+ ret = FACTAudioEngine_PrepareWave(This->fact_engine, dwFlags, szWavePath, wStreamingPacketSize,
+ dwAlignment, dwPlayOffset, nLoopCount, &fwave);
+ if(ret != 0 || !fwave)
+ {
+ ERR("Failed to CreateWave: %d (%p)\n", ret, fwave);
+ return E_FAIL;
+ }
+
+ wave = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*wave));
+ if (!wave)
+ {
+ FACTWave_Destroy(fwave);
+ ERR("Failed to allocate XACT3WaveImpl!");
+ return E_OUTOFMEMORY;
+ }
+
+ wave->IXACT3Wave_iface.lpVtbl = &XACT3Wave_Vtbl;
+ wave->fact_wave = fwave;
+ *ppWave = &wave->IXACT3Wave_iface;
+
+ TRACE("Created Wave: %p\n", wave);
+
+ return S_OK;
}
enum {
--
2.28.0

View File

@ -1 +1 @@
c6a3072051fb88edd3847c750c2ec852f11870f6
b8719736c5a022fa9c50f64adfc3ef58b40460f2