You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
36 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
127b7fafb4 | ||
|
054ecfb60a | ||
|
85146f009d | ||
|
8fc0710def | ||
|
e84e5d31e9 | ||
|
1f578b2d53 | ||
|
164a792cb2 | ||
|
506d9500b8 | ||
|
6839d5b534 | ||
|
9d59c4b21a | ||
|
ac31c3f5c5 | ||
|
a1057e16a6 | ||
|
bcf38efc5b | ||
|
320847e6f5 | ||
|
5d8ef8d881 | ||
|
fdd0f9a334 | ||
|
3ed5b91e33 | ||
|
f3b50676a1 | ||
|
4ca74ae0ca | ||
|
1219be1be0 | ||
|
9dc6767d18 | ||
|
810ecd4aab | ||
|
722ee5ed7e | ||
|
126e7db0e0 | ||
|
5a1e1cb2e0 | ||
|
9160b38ad3 | ||
|
e1966ac26e | ||
|
a5a28003b4 | ||
|
621740283c | ||
|
761fef8d70 | ||
|
63300ffaad | ||
|
badfcbc451 | ||
|
6a314e5994 | ||
|
435e01412e | ||
|
410820a918 | ||
|
a604ca1f6d |
@@ -1,4 +1,4 @@
|
||||
From 0a5214d0fe032778fa3ca4ee60c3d2ba64f8f4c0 Mon Sep 17 00:00:00 2001
|
||||
From 2c5da9b35cb387a1ca09fe49f662189536ee664a Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Wong <itsmattkc@gmail.com>
|
||||
Date: Fri, 18 Sep 2020 00:47:13 +0000
|
||||
Subject: [PATCH] ddraw: Implement Pick() and GetPickRecords().
|
||||
@@ -31,16 +31,16 @@ Signed-off-by: Matthew Wong <itsmattkc@gmail.com>
|
||||
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
|
||||
---
|
||||
dlls/ddraw/ddraw_private.h | 7 +-
|
||||
dlls/ddraw/device.c | 67 ++++++++++++--
|
||||
dlls/ddraw/device.c | 77 ++++++++++++----
|
||||
dlls/ddraw/executebuffer.c | 176 ++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ddraw/tests/ddraw1.c | 133 ++++++++++++++++++++++++++++
|
||||
4 files changed, 373 insertions(+), 10 deletions(-)
|
||||
4 files changed, 372 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
|
||||
index 6fc93b91860..c90b894ea61 100644
|
||||
index 1f0c94a9c6e..157384e3579 100644
|
||||
--- a/dlls/ddraw/ddraw_private.h
|
||||
+++ b/dlls/ddraw/ddraw_private.h
|
||||
@@ -338,6 +338,11 @@ struct d3d_device
|
||||
@@ -337,6 +337,11 @@ struct d3d_device
|
||||
struct d3d_viewport *current_viewport;
|
||||
D3DVIEWPORT7 active_viewport;
|
||||
|
||||
@@ -52,7 +52,7 @@ index 6fc93b91860..c90b894ea61 100644
|
||||
/* Required to keep track which of two available texture blending modes in d3ddevice3 is used */
|
||||
BOOL legacyTextureBlending;
|
||||
D3DTEXTUREBLEND texture_map_blend;
|
||||
@@ -571,7 +576,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
|
||||
@@ -573,7 +578,7 @@ struct d3d_execute_buffer *unsafe_impl_from_IDirect3DExecuteBuffer(IDirect3DExec
|
||||
|
||||
/* The execute function */
|
||||
HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *execute_buffer,
|
||||
@@ -62,20 +62,30 @@ index 6fc93b91860..c90b894ea61 100644
|
||||
/*****************************************************************************
|
||||
* IDirect3DVertexBuffer
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index bc1d91ee00b..82a813f9064 100644
|
||||
index f64db3aa633..fe29bf0d16e 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -349,6 +349,9 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
|
||||
@@ -321,17 +321,8 @@ static ULONG WINAPI d3d_device_inner_Release(IUnknown *iface)
|
||||
IDirect3DDevice3_DeleteViewport(&This->IDirect3DDevice3_iface, &vp->IDirect3DViewport3_iface);
|
||||
}
|
||||
|
||||
- wined3d_stateblock_decref(This->state);
|
||||
- if (This->recording)
|
||||
- wined3d_stateblock_decref(This->recording);
|
||||
-
|
||||
- /* Releasing the render target below may release the last reference to the ddraw object. Detach
|
||||
- * the device from it before so it doesn't try to save / restore state on the teared down device. */
|
||||
- if (This->ddraw)
|
||||
- {
|
||||
- list_remove(&This->ddraw_entry);
|
||||
- This->ddraw = NULL;
|
||||
- }
|
||||
+ if (This->pick_record_size > 0)
|
||||
+ free(This->pick_records);
|
||||
+
|
||||
|
||||
TRACE("Releasing render target %p.\n", This->rt_iface);
|
||||
rt_iface = This->rt_iface;
|
||||
This->rt_iface = NULL;
|
||||
@@ -758,7 +761,7 @@ static HRESULT WINAPI d3d_device1_Execute(IDirect3DDevice *iface,
|
||||
@@ -739,7 +730,7 @@ static HRESULT WINAPI d3d_device1_Execute(IDirect3DDevice *iface,
|
||||
|
||||
/* Execute... */
|
||||
wined3d_mutex_lock();
|
||||
@@ -84,7 +94,7 @@ index bc1d91ee00b..82a813f9064 100644
|
||||
wined3d_mutex_unlock();
|
||||
|
||||
return hr;
|
||||
@@ -1025,16 +1028,44 @@ static HRESULT WINAPI d3d_device1_NextViewport(IDirect3DDevice *iface,
|
||||
@@ -1006,16 +997,44 @@ static HRESULT WINAPI d3d_device1_NextViewport(IDirect3DDevice *iface,
|
||||
* x2 and y2 are ignored.
|
||||
*
|
||||
* Returns:
|
||||
@@ -133,7 +143,7 @@ index bc1d91ee00b..82a813f9064 100644
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -1050,13 +1081,35 @@ static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface, IDirect3DExecuteB
|
||||
@@ -1031,13 +1050,35 @@ static HRESULT WINAPI d3d_device1_Pick(IDirect3DDevice *iface, IDirect3DExecuteB
|
||||
* D3DPickRec: Address to store the resulting D3DPICKRECORD array.
|
||||
*
|
||||
* Returns:
|
||||
@@ -172,7 +182,7 @@ index bc1d91ee00b..82a813f9064 100644
|
||||
return D3D_OK;
|
||||
}
|
||||
diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c
|
||||
index 320ce6649d4..84366dafd7d 100644
|
||||
index 0cf0bf121f3..89915fb7145 100644
|
||||
--- a/dlls/ddraw/executebuffer.c
|
||||
+++ b/dlls/ddraw/executebuffer.c
|
||||
@@ -45,15 +45,106 @@ static void _dump_D3DEXECUTEBUFFERDESC(const D3DEXECUTEBUFFERDESC *lpDesc) {
|
||||
@@ -378,7 +388,7 @@ index 320ce6649d4..84366dafd7d 100644
|
||||
/* Drop through. */
|
||||
case 2:
|
||||
indices[(i * primitive_size) + 1] = ci->v2;
|
||||
@@ -426,6 +597,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
|
||||
@@ -424,6 +595,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, struct d3d
|
||||
end_of_buffer:
|
||||
return D3D_OK;
|
||||
}
|
||||
@@ -387,7 +397,7 @@ index 320ce6649d4..84366dafd7d 100644
|
||||
static inline struct d3d_execute_buffer *impl_from_IDirect3DExecuteBuffer(IDirect3DExecuteBuffer *iface)
|
||||
{
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index d8fcb188c40..bacd9049d6e 100644
|
||||
index 0940aa8d78a..faf4e2b7694 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -15467,6 +15467,137 @@ static void test_enum_devices(void)
|
||||
@@ -536,7 +546,7 @@ index d8fcb188c40..bacd9049d6e 100644
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@@ -15646,6 +15778,7 @@ START_TEST(ddraw1)
|
||||
@@ -15749,6 +15881,7 @@ START_TEST(ddraw1)
|
||||
test_vtbl_protection();
|
||||
test_window_position();
|
||||
test_get_display_mode();
|
||||
|
@@ -1,15 +1,15 @@
|
||||
From e4688a88901a1c13b2df67a0444c34e3ee02bbab Mon Sep 17 00:00:00 2001
|
||||
From 9c7acdba85edafc52bc0cc2719ac556894a59351 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew D'Addesio <andrew@fatbag.net>
|
||||
Date: Fri, 8 Feb 2019 18:48:33 -1000
|
||||
Subject: [PATCH] ddraw: Return correct devices based off requested DirectX
|
||||
version.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 232 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 129 insertions(+), 103 deletions(-)
|
||||
dlls/ddraw/ddraw.c | 240 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 131 insertions(+), 109 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 5887854556b..5ac95dc3043 100644
|
||||
index 8f2fd9f3b4b..0ef400b7a26 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -44,37 +44,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
|
||||
@@ -122,7 +122,7 @@ index 5887854556b..5ac95dc3043 100644
|
||||
/* Fill the missing members, and do some fixup */
|
||||
caps->dpcLineCaps.dwSize = sizeof(caps->dpcLineCaps);
|
||||
caps->dpcLineCaps.dwTextureBlendCaps = D3DPTBLENDCAPS_ADD
|
||||
@@ -3746,8 +3780,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
|
||||
@@ -3770,8 +3804,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
|
||||
/*****************************************************************************
|
||||
* IDirect3D7::EnumDevices
|
||||
*
|
||||
@@ -132,7 +132,7 @@ index 5887854556b..5ac95dc3043 100644
|
||||
*
|
||||
* Params:
|
||||
* callback: Function to call for each enumerated device
|
||||
@@ -3779,13 +3812,16 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3803,13 +3836,16 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
}
|
||||
dev_caps = device_desc7.dwDevCaps;
|
||||
|
||||
@@ -153,7 +153,7 @@ index 5887854556b..5ac95dc3043 100644
|
||||
if (ret != DDENUMRET_OK)
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
@@ -3801,11 +3837,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3825,11 +3861,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ index 5887854556b..5ac95dc3043 100644
|
||||
*
|
||||
* Versions 1, 2 and 3
|
||||
*
|
||||
@@ -3820,18 +3866,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3844,18 +3890,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
*****************************************************************************/
|
||||
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ index 5887854556b..5ac95dc3043 100644
|
||||
|
||||
TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
|
||||
|
||||
@@ -3840,55 +3886,60 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3864,58 +3910,59 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@@ -221,7 +221,6 @@ index 5887854556b..5ac95dc3043 100644
|
||||
wined3d_mutex_unlock();
|
||||
return hr;
|
||||
}
|
||||
+
|
||||
ddraw_d3dcaps1_from_7(&device_desc1, &device_desc7);
|
||||
+ device_desc1.dwSize = desc_size;
|
||||
|
||||
@@ -245,15 +244,12 @@ index 5887854556b..5ac95dc3043 100644
|
||||
- * flag set. This way it refuses the emulation device, and HAL devices
|
||||
- * never have POW2 unset in d3d7 on windows. */
|
||||
- if (ddraw->d3dversion != 1)
|
||||
+ clear_device_desc(&empty_desc1);
|
||||
+ empty_desc1.dwSize = desc_size;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(device_list); i++)
|
||||
{
|
||||
- static CHAR reference_description[] = "RGB Direct3D emulation";
|
||||
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
|
||||
+ continue;
|
||||
|
||||
- {
|
||||
- /* Tomb Raider 3 overwrites the reference device description buffer
|
||||
- * with its own custom string. Reserve some extra space in the array
|
||||
- * to avoid a buffer overrun. */
|
||||
- static CHAR reference_description[64] = "RGB Direct3D emulation";
|
||||
-
|
||||
- TRACE("Enumerating WineD3D D3DDevice interface.\n");
|
||||
- hal_desc = device_desc1;
|
||||
- hel_desc = device_desc1;
|
||||
@@ -269,13 +265,22 @@ index 5887854556b..5ac95dc3043 100644
|
||||
- /* RGB, REF, RAMP and MMX devices don't report hardware transform and lighting capability */
|
||||
- hal_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION);
|
||||
- hel_desc.dwDevCaps &= ~(D3DDEVCAPS_HWTRANSFORMANDLIGHT | D3DDEVCAPS_DRAWPRIMITIVES2EX | D3DDEVCAPS_HWRASTERIZATION);
|
||||
+ if (IsEqualGUID(&IID_IDirect3DHALDevice, device_list[i].device_guid))
|
||||
+ {
|
||||
+ hal_desc = device_desc1;
|
||||
|
||||
-
|
||||
- hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description,
|
||||
- device_name, &hal_desc, &hel_desc, context);
|
||||
- if (hr != D3DENUMRET_OK)
|
||||
+ clear_device_desc(&empty_desc1);
|
||||
+ empty_desc1.dwSize = desc_size;
|
||||
+
|
||||
+ for (i = 0; i < ARRAY_SIZE(device_list); i++)
|
||||
+ {
|
||||
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
|
||||
+ continue;
|
||||
+
|
||||
+ if (IsEqualGUID(&IID_IDirect3DHALDevice, device_list[i].device_guid))
|
||||
+ {
|
||||
+ hal_desc = device_desc1;
|
||||
+
|
||||
+ /* The HAL device's hel_desc is almost empty -- but not completely */
|
||||
+ hel_desc = empty_desc1;
|
||||
+ hel_desc.dwFlags = D3DDD_COLORMODEL | D3DDD_DEVCAPS | D3DDD_TRANSFORMCAPS
|
||||
@@ -305,7 +310,7 @@ index 5887854556b..5ac95dc3043 100644
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
wined3d_mutex_unlock();
|
||||
@@ -3896,31 +3947,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3923,31 +3970,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d09ac9a348309f956a2f3985a1b465b51b6e174c Mon Sep 17 00:00:00 2001
|
||||
From 6ef73a30a9f0c7c6775786d4cdba169f95056393 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 28 Mar 2015 08:18:10 +0100
|
||||
Subject: [PATCH] dsound: Apply filters before sound is multiplied to speakers.
|
||||
@@ -11,10 +11,10 @@ Based on a patch by Mark Harmstone.
|
||||
3 files changed, 81 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
|
||||
index 0b8edaaaf06..bdf3a824511 100644
|
||||
index 7629810db50..4c1c022acb7 100644
|
||||
--- a/dlls/dsound/dsound.c
|
||||
+++ b/dlls/dsound/dsound.c
|
||||
@@ -234,6 +234,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
@@ -236,6 +236,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
|
||||
if(device->mmdevice)
|
||||
IMMDevice_Release(device->mmdevice);
|
||||
CloseHandle(device->sleepev);
|
||||
@@ -23,10 +23,10 @@ index 0b8edaaaf06..bdf3a824511 100644
|
||||
free(device->cp_buffer);
|
||||
free(device->buffer);
|
||||
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
|
||||
index 124a4311b4c..fe39ca221fa 100644
|
||||
index 61323be99d8..c2656ab82f1 100644
|
||||
--- a/dlls/dsound/dsound_private.h
|
||||
+++ b/dlls/dsound/dsound_private.h
|
||||
@@ -89,8 +89,8 @@ struct DirectSoundDevice
|
||||
@@ -90,8 +90,8 @@ struct DirectSoundDevice
|
||||
int speaker_num[DS_MAX_CHANNELS];
|
||||
int num_speakers;
|
||||
int lfe_channel;
|
||||
@@ -34,14 +34,14 @@ index 124a4311b4c..fe39ca221fa 100644
|
||||
- DWORD tmp_buffer_len, cp_buffer_len;
|
||||
+ float *tmp_buffer, *cp_buffer, *dsp_buffer;
|
||||
+ DWORD tmp_buffer_len, cp_buffer_len, dsp_buffer_len;
|
||||
CO_MTA_USAGE_COOKIE mta_cookie;
|
||||
|
||||
DSVOLUMEPAN volpan;
|
||||
|
||||
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
|
||||
index c26b19ea8c1..68a45c46d1e 100644
|
||||
index 042b9499727..f261588454a 100644
|
||||
--- a/dlls/dsound/mixer.c
|
||||
+++ b/dlls/dsound/mixer.c
|
||||
@@ -283,10 +283,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
|
||||
@@ -286,10 +286,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb,
|
||||
return dsb->get(dsb, buffer + (mixpos % buflen), channel);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
UINT committed_samples = 0;
|
||||
DWORD channel, i;
|
||||
|
||||
@@ -305,17 +304,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
|
||||
@@ -308,17 +307,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count)
|
||||
|
||||
for (; i < count; i++)
|
||||
for (channel = 0; channel < dsb->mix_channels; channel++)
|
||||
@@ -74,7 +74,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
UINT channels = dsb->mix_channels;
|
||||
|
||||
LONG64 freqAcc_start = *freqAccNum;
|
||||
@@ -343,7 +341,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
@@ -346,7 +344,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
float s1 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx, channel);
|
||||
float s2 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx + istride, channel);
|
||||
float result = s1 * cur_freqAcc2 + s2 * cur_freqAcc;
|
||||
@@ -83,7 +83,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,11 +349,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
@@ -354,11 +352,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
return max_ipos;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
UINT committed_samples = 0;
|
||||
|
||||
LONG64 freqAcc_start = *freqAccNum;
|
||||
@@ -430,23 +428,24 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
@@ -433,23 +431,24 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6
|
||||
float* cache = &intermediate[channel * required_input + ipos];
|
||||
for (j = 0; j < fir_used; j++)
|
||||
sum += fir_copy[j] * cache[j];
|
||||
@@ -127,7 +127,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
|
||||
ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign;
|
||||
if (ipos >= dsb->buflen) {
|
||||
@@ -482,6 +481,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
@@ -485,6 +484,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
return buflen + ptr1 - ptr2;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
/**
|
||||
* Mix at most the given amount of data into the allocated temporary buffer
|
||||
* of the given secondary buffer, starting from the dsb's first currently
|
||||
@@ -497,31 +511,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
@@ -500,31 +514,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2)
|
||||
*/
|
||||
static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
|
||||
{
|
||||
@@ -180,12 +180,22 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
+ }
|
||||
+ if(dsb->put_aux == putieee32_sum)
|
||||
+ memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
||||
+
|
||||
|
||||
- if (size_bytes > 0) {
|
||||
- for (i = 0; i < dsb->num_filters; i++) {
|
||||
- if (dsb->filters[i].inplace) {
|
||||
- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL);
|
||||
+ if (using_filters) {
|
||||
+ put = putieee32_dsp;
|
||||
+ ostride = dsb->mix_channels * sizeof(float);
|
||||
+ size_bytes = frames * ostride;
|
||||
+
|
||||
|
||||
- if (FAILED(hr))
|
||||
- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i);
|
||||
- } else
|
||||
- WARN("filter %u has no inplace object - unsupported\n", i);
|
||||
- }
|
||||
- }
|
||||
+ if (dsb->device->dsp_buffer_len < size_bytes || !dsb->device->dsp_buffer) {
|
||||
+ if (dsb->device->dsp_buffer)
|
||||
+ dsb->device->dsp_buffer = HeapReAlloc(GetProcessHeap(), 0, dsb->device->dsp_buffer, size_bytes);
|
||||
@@ -194,11 +204,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
+ dsb->device->dsp_buffer_len = size_bytes;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (size_bytes > 0) {
|
||||
- for (i = 0; i < dsb->num_filters; i++) {
|
||||
- if (dsb->filters[i].inplace) {
|
||||
- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL);
|
||||
+
|
||||
+ cp_fields(dsb, put, ostride, frames, &dsb->freqAccNum);
|
||||
+
|
||||
+ if (using_filters) {
|
||||
@@ -213,13 +219,7 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
+ WARN("filter %lu has no inplace object - unsupported\n", i);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- if (FAILED(hr))
|
||||
- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i);
|
||||
- } else
|
||||
- WARN("filter %u has no inplace object - unsupported\n", i);
|
||||
- }
|
||||
- }
|
||||
+
|
||||
+ istride = ostride;
|
||||
+ ostride = dsb->device->pwfx->nChannels * sizeof(float);
|
||||
+ for (i = 0; i < frames; i++) {
|
||||
@@ -232,5 +232,5 @@ index c26b19ea8c1..68a45c46d1e 100644
|
||||
|
||||
static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames)
|
||||
--
|
||||
2.39.2
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,153 +0,0 @@
|
||||
From 8caf8262a8ae8b5f0275172a62d807240d86968d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 29 Aug 2021 13:26:53 +1000
|
||||
Subject: [PATCH 1/3] fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/fltmgr.sys/Makefile.in | 1 +
|
||||
dlls/fltmgr.sys/fltmgr.sys.spec | 4 +-
|
||||
dlls/fltmgr.sys/main.c | 75 ++++++++++++++++++++++++++++++++-
|
||||
include/ddk/fltkernel.h | 3 +-
|
||||
4 files changed, 79 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in
|
||||
index 6ebd48d9412..ae0e812cb22 100644
|
||||
--- a/dlls/fltmgr.sys/Makefile.in
|
||||
+++ b/dlls/fltmgr.sys/Makefile.in
|
||||
@@ -1,5 +1,6 @@
|
||||
MODULE = fltmgr.sys
|
||||
EXTRADLLFLAGS = -Wl,--subsystem,native
|
||||
+IMPORTS = ntoskrnl
|
||||
|
||||
SOURCES = \
|
||||
fltmgr.sys.spec \
|
||||
diff --git a/dlls/fltmgr.sys/fltmgr.sys.spec b/dlls/fltmgr.sys/fltmgr.sys.spec
|
||||
index 39ce6798178..8943b9f85cf 100644
|
||||
--- a/dlls/fltmgr.sys/fltmgr.sys.spec
|
||||
+++ b/dlls/fltmgr.sys/fltmgr.sys.spec
|
||||
@@ -10,7 +10,7 @@
|
||||
@ stub FltAllocatePoolAlignedWithTag
|
||||
@ stub FltAttachVolume
|
||||
@ stub FltAttachVolumeAtAltitude
|
||||
-@ stub FltBuildDefaultSecurityDescriptor
|
||||
+@ stdcall FltBuildDefaultSecurityDescriptor(ptr long)
|
||||
@ stub FltCancelFileOpen
|
||||
@ stub FltCancelIo
|
||||
@ stub FltCbdqDisable
|
||||
@@ -60,7 +60,7 @@
|
||||
@ stub FltFreeFileLock
|
||||
@ stub FltFreeGenericWorkItem
|
||||
@ stub FltFreePoolAlignedWithTag
|
||||
-@ stub FltFreeSecurityDescriptor
|
||||
+@ stdcall FltFreeSecurityDescriptor(ptr)
|
||||
@ stub FltFsControlFile
|
||||
@ stub FltGetBottomInstance
|
||||
@ stub FltGetContexts
|
||||
diff --git a/dlls/fltmgr.sys/main.c b/dlls/fltmgr.sys/main.c
|
||||
index e1016a4989c..9a85f4b6c82 100644
|
||||
--- a/dlls/fltmgr.sys/main.c
|
||||
+++ b/dlls/fltmgr.sys/main.c
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windef.h"
|
||||
-#include "winbase.h"
|
||||
#include "winternl.h"
|
||||
#include "ddk/fltkernel.h"
|
||||
|
||||
@@ -93,3 +92,77 @@ void* WINAPI FltGetRoutineAddress(LPCSTR name)
|
||||
|
||||
return func;
|
||||
}
|
||||
+
|
||||
+NTSTATUS WINAPI FltBuildDefaultSecurityDescriptor(PSECURITY_DESCRIPTOR *descriptor, ACCESS_MASK access)
|
||||
+{
|
||||
+ PACL dacl;
|
||||
+ NTSTATUS ret = STATUS_INSUFFICIENT_RESOURCES;
|
||||
+ DWORD sid_len;
|
||||
+ SID *sid;
|
||||
+ SID *sid_system = NULL;
|
||||
+ PSECURITY_DESCRIPTOR sec_desc = NULL;
|
||||
+ SID_IDENTIFIER_AUTHORITY auth = { SECURITY_NULL_SID_AUTHORITY };
|
||||
+
|
||||
+ *descriptor = NULL;
|
||||
+
|
||||
+ sid_len = RtlLengthRequiredSid(2);
|
||||
+ sid = ExAllocatePool(PagedPool, sid_len);
|
||||
+ if (!sid)
|
||||
+ goto done;
|
||||
+ RtlInitializeSid(sid, &auth, 2);
|
||||
+ sid->SubAuthority[1] = DOMAIN_GROUP_RID_ADMINS;
|
||||
+ sid->SubAuthority[0] = SECURITY_BUILTIN_DOMAIN_RID;
|
||||
+
|
||||
+ sid_len = RtlLengthRequiredSid(1);
|
||||
+ sid_system = ExAllocatePool(PagedPool, sid_len);
|
||||
+ if (!sid_system)
|
||||
+ goto done;
|
||||
+ RtlInitializeSid(sid_system, &auth, 1);
|
||||
+ sid_system->SubAuthority[0] = SECURITY_LOCAL_SYSTEM_RID;
|
||||
+
|
||||
+ sid_len = SECURITY_DESCRIPTOR_MIN_LENGTH + sizeof(ACL) +
|
||||
+ sizeof(ACCESS_ALLOWED_ACE) + RtlLengthSid(sid) +
|
||||
+ sizeof(ACCESS_ALLOWED_ACE) + RtlLengthSid(sid_system);
|
||||
+
|
||||
+ sec_desc = ExAllocatePool(PagedPool, sid_len);
|
||||
+ if (!sec_desc)
|
||||
+ {
|
||||
+ ret = STATUS_NO_MEMORY;
|
||||
+ goto done;
|
||||
+ }
|
||||
+
|
||||
+ ret = RtlCreateSecurityDescriptor(sec_desc, SECURITY_DESCRIPTOR_REVISION);
|
||||
+ if (ret != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ dacl = (PACL)((char*)sec_desc + SECURITY_DESCRIPTOR_MIN_LENGTH);
|
||||
+ ret = RtlCreateAcl(dacl, sid_len - SECURITY_DESCRIPTOR_MIN_LENGTH, ACL_REVISION);
|
||||
+ if (ret != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ ret = RtlAddAccessAllowedAce(dacl, ACL_REVISION, access, sid);
|
||||
+ if (ret != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ ret = RtlAddAccessAllowedAce(dacl, ACL_REVISION, access, sid_system);
|
||||
+ if (ret != STATUS_SUCCESS)
|
||||
+ goto done;
|
||||
+
|
||||
+ ret = RtlSetDaclSecurityDescriptor(sec_desc, 1, dacl, 0);
|
||||
+ if (ret == STATUS_SUCCESS)
|
||||
+ *descriptor = sec_desc;
|
||||
+
|
||||
+done:
|
||||
+ if (ret != STATUS_SUCCESS)
|
||||
+ ExFreePool(sec_desc);
|
||||
+
|
||||
+ ExFreePool(sid);
|
||||
+ ExFreePool(sid_system);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+void WINAPI FltFreeSecurityDescriptor(PSECURITY_DESCRIPTOR descriptor)
|
||||
+{
|
||||
+ ExFreePool(descriptor);
|
||||
+}
|
||||
diff --git a/include/ddk/fltkernel.h b/include/ddk/fltkernel.h
|
||||
index 49c9d55dbaa..e5483d5a3fa 100644
|
||||
--- a/include/ddk/fltkernel.h
|
||||
+++ b/include/ddk/fltkernel.h
|
||||
@@ -653,7 +653,8 @@ typedef struct _FLT_REGISTRATION
|
||||
PFLT_SECTION_CONFLICT_NOTIFICATION_CALLBACK SectionNotificationCallback;
|
||||
} FLT_REGISTRATION, *PFLT_REGISTRATION;
|
||||
|
||||
-
|
||||
+NTSTATUS WINAPI FltBuildDefaultSecurityDescriptor(PSECURITY_DESCRIPTOR *, ACCESS_MASK);
|
||||
+void WINAPI FltFreeSecurityDescriptor(PSECURITY_DESCRIPTOR);
|
||||
void* WINAPI FltGetRoutineAddress(LPCSTR name);
|
||||
NTSTATUS WINAPI FltRegisterFilter(PDRIVER_OBJECT, const FLT_REGISTRATION *, PFLT_FILTER *);
|
||||
NTSTATUS WINAPI FltStartFiltering(PFLT_FILTER);
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,23 +0,0 @@
|
||||
From c1af142bac149b296b2dea06cd99c13e0f8814c9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 30 Aug 2021 15:15:35 +1000
|
||||
Subject: [PATCH 2/3] fltmgr.sys: Create import library
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/fltmgr.sys/Makefile.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/fltmgr.sys/Makefile.in b/dlls/fltmgr.sys/Makefile.in
|
||||
index ae0e812cb22..ae02da9b5d6 100644
|
||||
--- a/dlls/fltmgr.sys/Makefile.in
|
||||
+++ b/dlls/fltmgr.sys/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
MODULE = fltmgr.sys
|
||||
+IMPORTLIB = fltmgr
|
||||
EXTRADLLFLAGS = -Wl,--subsystem,native
|
||||
IMPORTS = ntoskrnl
|
||||
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,133 +0,0 @@
|
||||
From c69247afcbd83af223f471342c67bc06deeffda0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 30 Aug 2021 15:16:06 +1000
|
||||
Subject: [PATCH] ntoskrnl.exe: Add FltBuildDefaultSecurityDescriptor test
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/ntoskrnl.exe/tests/Makefile.in | 2 +-
|
||||
dlls/ntoskrnl.exe/tests/driver.c | 81 +++++++++++++++++++++++++++++
|
||||
2 files changed, 82 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntoskrnl.exe/tests/Makefile.in b/dlls/ntoskrnl.exe/tests/Makefile.in
|
||||
index f610df6a947..97dee8b25cf 100644
|
||||
--- a/dlls/ntoskrnl.exe/tests/Makefile.in
|
||||
+++ b/dlls/ntoskrnl.exe/tests/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
TESTDLL = ntoskrnl.exe
|
||||
IMPORTS = advapi32 crypt32 newdev setupapi user32 wintrust ws2_32 hid
|
||||
|
||||
-driver_IMPORTS = winecrt0 ntoskrnl hal
|
||||
+driver_IMPORTS = winecrt0 ntoskrnl hal fltmgr
|
||||
driver_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
|
||||
driver2_IMPORTS = winecrt0 ntoskrnl hal
|
||||
driver2_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
|
||||
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
index ea4bd03ee44..844a181472c 100644
|
||||
--- a/dlls/ntoskrnl.exe/tests/driver.c
|
||||
+++ b/dlls/ntoskrnl.exe/tests/driver.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "ddk/ntddk.h"
|
||||
#include "ddk/ntifs.h"
|
||||
#include "ddk/wdm.h"
|
||||
+#include "ddk/fltkernel.h"
|
||||
|
||||
#include "driver.h"
|
||||
|
||||
@@ -2393,6 +2394,85 @@ static void test_default_modules(void)
|
||||
ok(dxgmms1, "Failed to find dxgmms1.sys\n");
|
||||
}
|
||||
|
||||
+static void test_default_security(void)
|
||||
+{
|
||||
+ PSECURITY_DESCRIPTOR sd = NULL;
|
||||
+ NTSTATUS status;
|
||||
+ PSID group = NULL, owner = NULL;
|
||||
+ BOOLEAN isdefault, present;
|
||||
+ PACL acl = NULL;
|
||||
+ PACCESS_ALLOWED_ACE ace;
|
||||
+ SID_IDENTIFIER_AUTHORITY auth = { SECURITY_NULL_SID_AUTHORITY };
|
||||
+ SID_IDENTIFIER_AUTHORITY authwine7 = { SECURITY_NT_AUTHORITY };
|
||||
+ PSID sid1, sid2, sidwin7;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ status = FltBuildDefaultSecurityDescriptor(&sd, STANDARD_RIGHTS_ALL);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+ if (status != STATUS_SUCCESS)
|
||||
+ {
|
||||
+ win_skip("Skipping FltBuildDefaultSecurityDescriptor tests\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ ok(sd != NULL, "Failed to return descriptor\n");
|
||||
+
|
||||
+ status = RtlGetGroupSecurityDescriptor(sd, &group, &isdefault);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+ ok(group == NULL, "group isn't NULL\n");
|
||||
+
|
||||
+ status = RtlGetOwnerSecurityDescriptor(sd, &owner, &isdefault);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+ ok(owner == NULL, "owner isn't NULL\n");
|
||||
+
|
||||
+ status = RtlGetDaclSecurityDescriptor(sd, &present, &acl, &isdefault);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+ ok(acl != NULL, "acl is NULL\n");
|
||||
+ ok(acl->AceCount == 2, "got %d\n", acl->AceCount);
|
||||
+
|
||||
+ sid1 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(2));
|
||||
+ status = RtlInitializeSid(sid1, &auth, 2);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+ *RtlSubAuthoritySid(sid1, 0) = SECURITY_BUILTIN_DOMAIN_RID;
|
||||
+ *RtlSubAuthoritySid(sid1, 1) = DOMAIN_GROUP_RID_ADMINS;
|
||||
+
|
||||
+ sidwin7 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(2));
|
||||
+ status = RtlInitializeSid(sidwin7, &authwine7, 2);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+ *RtlSubAuthoritySid(sidwin7, 0) = SECURITY_BUILTIN_DOMAIN_RID;
|
||||
+ *RtlSubAuthoritySid(sidwin7, 1) = DOMAIN_ALIAS_RID_ADMINS;
|
||||
+
|
||||
+ sid2 = ExAllocatePool(NonPagedPool, RtlLengthRequiredSid(1));
|
||||
+ RtlInitializeSid(sid2, &auth, 1);
|
||||
+ *RtlSubAuthoritySid(sid2, 0) = SECURITY_LOCAL_SYSTEM_RID;
|
||||
+
|
||||
+ /* SECURITY_BUILTIN_DOMAIN_RID */
|
||||
+ status = RtlGetAce(acl, 0, (void**)&ace);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+
|
||||
+ ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "got %#x\n", ace->Header.AceType);
|
||||
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
|
||||
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
|
||||
+
|
||||
+ ret = RtlEqualSid(sid1, (PSID)&ace->SidStart) || RtlEqualSid(sidwin7, (PSID)&ace->SidStart);
|
||||
+ ok(ret, "SID not equal\n");
|
||||
+
|
||||
+ /* SECURITY_LOCAL_SYSTEM_RID */
|
||||
+ status = RtlGetAce(acl, 1, (void**)&ace);
|
||||
+ ok(status == STATUS_SUCCESS, "got %#lx\n", status);
|
||||
+
|
||||
+ ok(ace->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, "got %#x\n", ace->Header.AceType);
|
||||
+ ok(ace->Header.AceFlags == 0, "got %#x\n", ace->Header.AceFlags);
|
||||
+ ok(ace->Mask == STANDARD_RIGHTS_ALL, "got %#lx\n", ace->Mask);
|
||||
+
|
||||
+ ret = RtlEqualSid(sid2, (PSID)&ace->SidStart) || RtlEqualSid(sidwin7, (PSID)&ace->SidStart);
|
||||
+ ok(ret, "SID not equal\n");
|
||||
+
|
||||
+ ExFreePool(sid1);
|
||||
+ ExFreePool(sid2);
|
||||
+
|
||||
+ FltFreeSecurityDescriptor(sd);
|
||||
+}
|
||||
+
|
||||
static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *stack)
|
||||
{
|
||||
void *buffer = irp->AssociatedIrp.SystemBuffer;
|
||||
@@ -2438,6 +2518,7 @@ static NTSTATUS main_test(DEVICE_OBJECT *device, IRP *irp, IO_STACK_LOCATION *st
|
||||
test_process_memory(test_input);
|
||||
test_permanence();
|
||||
test_driver_object_extension();
|
||||
+ test_default_security();
|
||||
|
||||
IoMarkIrpPending(irp);
|
||||
IoQueueWorkItem(work_item, main_test_task, DelayedWorkQueue, irp);
|
||||
--
|
||||
2.42.0
|
||||
|
@@ -1,2 +0,0 @@
|
||||
Fixes: [49089] fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor
|
||||
Depends: winedevice-Default_Drivers
|
@@ -174,7 +174,7 @@ index 7806ad2ec1f..e5adc0d4e2c 100644
|
||||
+ basic_info.LastAccessTime = info.LastAccessTime;
|
||||
+ basic_info.LastWriteTime = info.LastWriteTime;
|
||||
+ basic_info.ChangeTime = info.ChangeTime;
|
||||
+ basic_info.FileAttributes &= FILE_ATTRIBUTE_READONLY;
|
||||
+ basic_info.FileAttributes = info.FileAttributes & FILE_ATTRIBUTE_READONLY;
|
||||
+ NtSetInformationFile( h2, &io, &basic_info, sizeof(basic_info), FileBasicInformation );
|
||||
HeapFree( GetProcessHeap(), 0, buffer );
|
||||
CloseHandle( h1 );
|
||||
|
@@ -1,223 +0,0 @@
|
||||
From dd46b005cfcc8aa02bf25c031326e28bd75e0ff2 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Jansen <mark.jansen@reactos.org>
|
||||
Date: Sun, 24 Sep 2017 22:45:22 +0200
|
||||
Subject: [PATCH] kernel32/tests: Add tests for job object accounting
|
||||
|
||||
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
|
||||
---
|
||||
dlls/kernel32/tests/process.c | 95 +++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 95 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
|
||||
index e9e8555c32e..e5a9914ca7b 100644
|
||||
--- a/dlls/kernel32/tests/process.c
|
||||
+++ b/dlls/kernel32/tests/process.c
|
||||
@@ -2541,6 +2541,69 @@ static void _create_process(int line, const char *command, LPPROCESS_INFORMATION
|
||||
ok_(__FILE__, line)(ret, "CreateProcess error %lu\n", GetLastError());
|
||||
}
|
||||
|
||||
+#define test_assigned_proc(job, ...) _test_assigned_proc(__LINE__, job, __VA_ARGS__)
|
||||
+static void _test_assigned_proc(int line, HANDLE job, int expected_count, ...)
|
||||
+{
|
||||
+ char buf[sizeof(JOBOBJECT_BASIC_PROCESS_ID_LIST) + sizeof(ULONG_PTR) * 20];
|
||||
+ PJOBOBJECT_BASIC_PROCESS_ID_LIST pid_list = (JOBOBJECT_BASIC_PROCESS_ID_LIST *)buf;
|
||||
+ DWORD ret_len, pid;
|
||||
+ va_list valist;
|
||||
+ int n;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ memset(buf, 0, sizeof(buf));
|
||||
+ ret = pQueryInformationJobObject(job, JobObjectBasicProcessIdList, pid_list, sizeof(buf), &ret_len);
|
||||
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %lu\n", GetLastError());
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ todo_wine_if(expected_count)
|
||||
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfAssignedProcesses,
|
||||
+ "Expected NumberOfAssignedProcesses to be %d (expected_count) is %ld\n",
|
||||
+ expected_count, pid_list->NumberOfAssignedProcesses);
|
||||
+ todo_wine_if(expected_count)
|
||||
+ ok_(__FILE__, line)(expected_count == pid_list->NumberOfProcessIdsInList,
|
||||
+ "Expected NumberOfProcessIdsInList to be %d (expected_count) is %ld\n",
|
||||
+ expected_count, pid_list->NumberOfProcessIdsInList);
|
||||
+
|
||||
+ va_start(valist, expected_count);
|
||||
+ for (n = 0; n < min(expected_count, pid_list->NumberOfProcessIdsInList); ++n)
|
||||
+ {
|
||||
+ pid = va_arg(valist, DWORD);
|
||||
+ ok_(__FILE__, line)(pid == pid_list->ProcessIdList[n],
|
||||
+ "Expected pid_list->ProcessIdList[%d] to be %lx is %Ix\n",
|
||||
+ n, pid, pid_list->ProcessIdList[n]);
|
||||
+ }
|
||||
+ va_end(valist);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#define test_accounting(job, total_proc, active_proc, terminated_proc) _test_accounting(__LINE__, job, total_proc, active_proc, terminated_proc)
|
||||
+static void _test_accounting(int line, HANDLE job, int total_proc, int active_proc, int terminated_proc)
|
||||
+{
|
||||
+ JOBOBJECT_BASIC_ACCOUNTING_INFORMATION basic_accounting;
|
||||
+ DWORD ret_len;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ memset(&basic_accounting, 0, sizeof(basic_accounting));
|
||||
+ ret = pQueryInformationJobObject(job, JobObjectBasicAccountingInformation, &basic_accounting, sizeof(basic_accounting), &ret_len);
|
||||
+ ok_(__FILE__, line)(ret, "QueryInformationJobObject error %lu\n", GetLastError());
|
||||
+ if (ret)
|
||||
+ {
|
||||
+ /* Not going to check process times or page faults */
|
||||
+
|
||||
+ todo_wine_if(total_proc)
|
||||
+ ok_(__FILE__, line)(total_proc == basic_accounting.TotalProcesses,
|
||||
+ "Expected basic_accounting.TotalProcesses to be %d (total_proc) is %ld\n",
|
||||
+ total_proc, basic_accounting.TotalProcesses);
|
||||
+ todo_wine_if(active_proc)
|
||||
+ ok_(__FILE__, line)(active_proc == basic_accounting.ActiveProcesses,
|
||||
+ "Expected basic_accounting.ActiveProcesses to be %d (active_proc) is %ld\n",
|
||||
+ active_proc, basic_accounting.ActiveProcesses);
|
||||
+ ok_(__FILE__, line)(terminated_proc == basic_accounting.TotalTerminatedProcesses,
|
||||
+ "Expected basic_accounting.TotalTerminatedProcesses to be %d (terminated_proc) is %ld\n",
|
||||
+ terminated_proc, basic_accounting.TotalTerminatedProcesses);
|
||||
+ }
|
||||
+}
|
||||
|
||||
static void test_IsProcessInJob(void)
|
||||
{
|
||||
@@ -2566,11 +2629,15 @@ static void test_IsProcessInJob(void)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(!out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 0);
|
||||
+ test_accounting(job, 0, 0, 0);
|
||||
|
||||
out = TRUE;
|
||||
ret = pIsProcessInJob(pi.hProcess, job2, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(!out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job2, 0);
|
||||
+ test_accounting(job2, 0, 0, 0);
|
||||
|
||||
ret = pAssignProcessToJobObject(job, pi.hProcess);
|
||||
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
|
||||
@@ -2579,11 +2646,15 @@ static void test_IsProcessInJob(void)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 1, pi.dwProcessId);
|
||||
+ test_accounting(job, 1, 1, 0);
|
||||
|
||||
out = TRUE;
|
||||
ret = pIsProcessInJob(pi.hProcess, job2, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(!out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job2, 0);
|
||||
+ test_accounting(job2, 0, 0, 0);
|
||||
|
||||
out = FALSE;
|
||||
ret = pIsProcessInJob(pi.hProcess, NULL, &out);
|
||||
@@ -2597,6 +2668,8 @@ static void test_IsProcessInJob(void)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 0);
|
||||
+ test_accounting(job, 1, 0, 0);
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
@@ -2613,11 +2686,15 @@ static void test_TerminateJobObject(void)
|
||||
|
||||
job = pCreateJobObjectW(NULL, NULL);
|
||||
ok(job != NULL, "CreateJobObject error %lu\n", GetLastError());
|
||||
+ test_assigned_proc(job, 0);
|
||||
+ test_accounting(job, 0, 0, 0);
|
||||
|
||||
create_process("wait", &pi);
|
||||
|
||||
ret = pAssignProcessToJobObject(job, pi.hProcess);
|
||||
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
|
||||
+ test_assigned_proc(job, 1, pi.dwProcessId);
|
||||
+ test_accounting(job, 1, 1, 0);
|
||||
|
||||
ret = pTerminateJobObject(job, 123);
|
||||
ok(ret, "TerminateJobObject error %lu\n", GetLastError());
|
||||
@@ -2626,6 +2703,8 @@ static void test_TerminateJobObject(void)
|
||||
dwret = WaitForSingleObject(pi.hProcess, 1000);
|
||||
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %lu\n", dwret);
|
||||
if (dwret == WAIT_TIMEOUT) TerminateProcess(pi.hProcess, 0);
|
||||
+ test_assigned_proc(job, 0);
|
||||
+ test_accounting(job, 1, 0, 0);
|
||||
|
||||
ret = GetExitCodeProcess(pi.hProcess, &dwret);
|
||||
ok(ret, "GetExitCodeProcess error %lu\n", GetLastError());
|
||||
@@ -2643,6 +2722,8 @@ static void test_TerminateJobObject(void)
|
||||
ret = pAssignProcessToJobObject(job, pi.hProcess);
|
||||
ok(!ret, "AssignProcessToJobObject unexpectedly succeeded\n");
|
||||
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
|
||||
+ test_assigned_proc(job, 0);
|
||||
+ test_accounting(job, 1, 0, 0);
|
||||
|
||||
CloseHandle(pi.hProcess);
|
||||
CloseHandle(pi.hThread);
|
||||
@@ -2841,11 +2922,15 @@ static void test_KillOnJobClose(void)
|
||||
return;
|
||||
}
|
||||
ok(ret, "SetInformationJobObject error %lu\n", GetLastError());
|
||||
+ test_assigned_proc(job, 0);
|
||||
+ test_accounting(job, 0, 0, 0);
|
||||
|
||||
create_process("wait", &pi);
|
||||
|
||||
ret = pAssignProcessToJobObject(job, pi.hProcess);
|
||||
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
|
||||
+ test_assigned_proc(job, 1, pi.dwProcessId);
|
||||
+ test_accounting(job, 1, 1, 0);
|
||||
|
||||
CloseHandle(job);
|
||||
|
||||
@@ -2955,6 +3040,8 @@ static HANDLE test_AddSelfToJob(void)
|
||||
|
||||
ret = pAssignProcessToJobObject(job, GetCurrentProcess());
|
||||
ok(ret, "AssignProcessToJobObject error %lu\n", GetLastError());
|
||||
+ test_assigned_proc(job, 1, GetCurrentProcessId());
|
||||
+ test_accounting(job, 1, 1, 0);
|
||||
|
||||
return job;
|
||||
}
|
||||
@@ -2976,6 +3063,8 @@ static void test_jobInheritance(HANDLE job)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 2, GetCurrentProcessId(), pi.dwProcessId);
|
||||
+ test_accounting(job, 2, 2, 0);
|
||||
|
||||
wait_and_close_child_process(&pi);
|
||||
}
|
||||
@@ -3009,6 +3098,8 @@ static void test_BreakawayOk(HANDLE parent_job)
|
||||
ret = CreateProcessA(NULL, buffer, NULL, NULL, FALSE, CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
|
||||
ok(!ret, "CreateProcessA expected failure\n");
|
||||
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
|
||||
+ test_assigned_proc(job, 1, GetCurrentProcessId());
|
||||
+ test_accounting(job, 2, 1, 0);
|
||||
|
||||
if (ret)
|
||||
{
|
||||
@@ -3048,6 +3139,8 @@ static void test_BreakawayOk(HANDLE parent_job)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(!out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 1, GetCurrentProcessId());
|
||||
+ test_accounting(job, 2, 1, 0);
|
||||
|
||||
ret = pIsProcessInJob(pi.hProcess, parent_job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
@@ -3065,6 +3158,8 @@ static void test_BreakawayOk(HANDLE parent_job)
|
||||
ret = pIsProcessInJob(pi.hProcess, job, &out);
|
||||
ok(ret, "IsProcessInJob error %lu\n", GetLastError());
|
||||
ok(!out, "IsProcessInJob returned out=%u\n", out);
|
||||
+ test_assigned_proc(job, 1, GetCurrentProcessId());
|
||||
+ test_accounting(job, 2, 1, 0);
|
||||
|
||||
wait_and_close_child_process(&pi);
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d4f9fa0c33b6a414fe3b6c604f3039e98d416263 Mon Sep 17 00:00:00 2001
|
||||
From a808aeb6fbb9c7cace366a262715607379ca1b58 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 9 Jul 2019 14:13:28 +1000
|
||||
Subject: [PATCH] user32: Do not enumerate the registry in
|
||||
@@ -13,10 +13,10 @@ not the complete list from the registry.
|
||||
3 files changed, 36 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||||
index 1fff29c7f87..9bf65573d87 100644
|
||||
index 00337aa72b7..375ca3abee3 100644
|
||||
--- a/dlls/user32/input.c
|
||||
+++ b/dlls/user32/input.c
|
||||
@@ -486,7 +486,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
@@ -497,7 +497,6 @@ BOOL WINAPI UnloadKeyboardLayout( HKL layout )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@ index 1fff29c7f87..9bf65573d87 100644
|
||||
{
|
||||
SendMessageTimeoutW(handle, WM_DEVICECHANGE, flags, (LPARAM)header, SMTO_ABORTIFHUNG, 2000, NULL);
|
||||
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
|
||||
index 350baff600d..27066fc46f4 100644
|
||||
index b92e59396ac..364afc08b26 100644
|
||||
--- a/dlls/user32/tests/input.c
|
||||
+++ b/dlls/user32/tests/input.c
|
||||
@@ -5542,6 +5542,40 @@ static void test_keyboard_ll_hook_blocking(void)
|
||||
ok_ret( 1, DestroyWindow( hwnd ) );
|
||||
@@ -5637,6 +5637,40 @@ static void test_LoadKeyboardLayoutEx(void)
|
||||
ok_eq( old_hkl, GetKeyboardLayout( 0 ), HKL, "%p" );
|
||||
}
|
||||
|
||||
+static void test_GetKeyboardLayoutList(void)
|
||||
@@ -69,7 +69,7 @@ index 350baff600d..27066fc46f4 100644
|
||||
/* run the tests in a separate desktop to avoid interaction with other
|
||||
* tests, current desktop state, or user actions. */
|
||||
static void test_input_desktop( char **argv )
|
||||
@@ -5633,6 +5667,7 @@ START_TEST(input)
|
||||
@@ -5730,6 +5764,7 @@ START_TEST(input)
|
||||
test_GetKeyState();
|
||||
test_OemKeyScan();
|
||||
test_rawinput(argv[0]);
|
||||
@@ -78,10 +78,10 @@ index 350baff600d..27066fc46f4 100644
|
||||
|
||||
if(pGetMouseMovePointsEx)
|
||||
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
|
||||
index ef8d564c264..9a7c58f359d 100644
|
||||
index 1886ff979d7..1834ae40441 100644
|
||||
--- a/dlls/win32u/input.c
|
||||
+++ b/dlls/win32u/input.c
|
||||
@@ -1267,11 +1267,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
@@ -1266,11 +1266,7 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
|
||||
*/
|
||||
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
{
|
||||
@@ -94,7 +94,7 @@ index ef8d564c264..9a7c58f359d 100644
|
||||
HKL layout;
|
||||
|
||||
TRACE_(keyboard)( "size %d, layouts %p.\n", size, layouts );
|
||||
@@ -1285,33 +1281,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
@@ -1284,33 +1280,6 @@ UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
|
||||
if (size && layouts)
|
||||
{
|
||||
layouts[count - 1] = layout;
|
||||
|
@@ -1,37 +0,0 @@
|
||||
From af54761b8536f81831f2813ef0ff9b627dcc5ca4 Mon Sep 17 00:00:00 2001
|
||||
From: Nikolay Sivov <nsivov@codeweavers.com>
|
||||
Date: Wed, 12 Jan 2022 22:48:35 +0300
|
||||
Subject: [PATCH] winegstreamer: Add MFVideoFormat_ARGB32 output for the
|
||||
source.
|
||||
|
||||
(cherry picked from commit 9812591f0003c5c611faa59ab9b3cb73a85be637)
|
||||
|
||||
CW-Bug-Id: #19975
|
||||
---
|
||||
dlls/winegstreamer/media_source.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 00c40dc2f47..7a0f65b4247 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -856,7 +856,7 @@ static HRESULT new_media_stream(struct media_source *source,
|
||||
static HRESULT media_stream_init_desc(struct media_stream *stream)
|
||||
{
|
||||
IMFMediaTypeHandler *type_handler = NULL;
|
||||
- IMFMediaType *stream_types[6];
|
||||
+ IMFMediaType *stream_types[7];
|
||||
struct wg_format format;
|
||||
DWORD type_count = 0;
|
||||
unsigned int i;
|
||||
@@ -875,6 +875,7 @@ static HRESULT media_stream_init_desc(struct media_stream *stream)
|
||||
WG_VIDEO_FORMAT_YV12,
|
||||
WG_VIDEO_FORMAT_YUY2,
|
||||
WG_VIDEO_FORMAT_I420,
|
||||
+ WG_VIDEO_FORMAT_BGRA,
|
||||
};
|
||||
|
||||
IMFMediaType *base_type = mf_media_type_from_wg_format(&format);
|
||||
--
|
||||
2.40.0
|
||||
|
@@ -1,20 +1,20 @@
|
||||
From aba54e8536ab5423e8293452db6462dcca0bea0b Mon Sep 17 00:00:00 2001
|
||||
From d683f0129b0df79227b23133874960284b76baa8 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 11 Sep 2020 17:55:59 +1000
|
||||
Subject: [PATCH] include: Remove interfaces already define in msxml6.idl
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/msxml3/factory.c | 1 +
|
||||
dlls/msxml3/factory.c | 3 +-
|
||||
dlls/msxml3/tests/saxreader.c | 1 +
|
||||
dlls/msxml3/tests/schema.c | 5 ++
|
||||
dlls/msxml3/uuid.c | 11 ++++
|
||||
include/msxml2.idl | 109 ----------------------------------
|
||||
dlls/msxml3/uuid.c | 10 ++++
|
||||
include/msxml2.idl | 101 ----------------------------------
|
||||
include/msxml6.idl | 24 ++++----
|
||||
6 files changed, 30 insertions(+), 121 deletions(-)
|
||||
6 files changed, 29 insertions(+), 115 deletions(-)
|
||||
|
||||
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
|
||||
index c2d3cd30c60..243ee379712 100644
|
||||
index e91666c6d79..e35839db2a3 100644
|
||||
--- a/dlls/msxml3/factory.c
|
||||
+++ b/dlls/msxml3/factory.c
|
||||
@@ -31,6 +31,7 @@
|
||||
@@ -25,6 +25,15 @@ index c2d3cd30c60..243ee379712 100644
|
||||
#include "xmlparser.h"
|
||||
|
||||
/* undef the #define in msxml2 so that we can access the v.2 version
|
||||
@@ -43,8 +44,6 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
|
||||
|
||||
-extern GUID CLSID_XMLSchemaCache60;
|
||||
-
|
||||
typedef HRESULT (*ClassFactoryCreateInstanceFunc)(void**);
|
||||
typedef HRESULT (*DOMFactoryCreateInstanceFunc)(MSXML_VERSION, void**);
|
||||
|
||||
diff --git a/dlls/msxml3/tests/saxreader.c b/dlls/msxml3/tests/saxreader.c
|
||||
index e123d4eba5a..48cfa8f5593 100644
|
||||
--- a/dlls/msxml3/tests/saxreader.c
|
||||
@@ -38,7 +47,7 @@ index e123d4eba5a..48cfa8f5593 100644
|
||||
#include "ocidl.h"
|
||||
#include "dispex.h"
|
||||
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
|
||||
index efc3a8e56e3..a4fe29aca02 100644
|
||||
index 50e5a743b82..c83e72e136a 100644
|
||||
--- a/dlls/msxml3/tests/schema.c
|
||||
+++ b/dlls/msxml3/tests/schema.c
|
||||
@@ -32,6 +32,11 @@
|
||||
@@ -52,12 +61,12 @@ index efc3a8e56e3..a4fe29aca02 100644
|
||||
+
|
||||
#include "wine/test.h"
|
||||
|
||||
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
|
||||
static const WCHAR xdr_schema1_uri[] = L"x-schema:test1.xdr";
|
||||
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
|
||||
index 4abbe5e4763..333d4f3d3c7 100644
|
||||
index 7e50b439146..7214d23c5dc 100644
|
||||
--- a/dlls/msxml3/uuid.c
|
||||
+++ b/dlls/msxml3/uuid.c
|
||||
@@ -41,6 +41,17 @@
|
||||
@@ -41,6 +41,16 @@
|
||||
#include "initguid.h"
|
||||
#include "msxml2.h"
|
||||
|
||||
@@ -69,14 +78,13 @@ index 4abbe5e4763..333d4f3d3c7 100644
|
||||
+DEFINE_GUID(CLSID_SAXXMLReader60, 0x88d96a0c, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
+DEFINE_GUID(CLSID_ServerXMLHTTP60, 0x88d96a0b, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
+DEFINE_GUID(CLSID_XMLHTTP60, 0x88d96a0a, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
+DEFINE_GUID(CLSID_XMLSchemaCache60, 0x88d96a07, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
+DEFINE_GUID(CLSID_XSLTemplate60, 0x88d96a08, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
+
|
||||
/*
|
||||
* Note that because of a #define in msxml2.h, we end up initializing
|
||||
* CLSID_DOMDocument2 to be the v.3 version independent DOMDocument
|
||||
diff --git a/include/msxml2.idl b/include/msxml2.idl
|
||||
index ede4113ecbf..85bb6a5b0cb 100644
|
||||
index 848bc13952a..85bb6a5b0cb 100644
|
||||
--- a/include/msxml2.idl
|
||||
+++ b/include/msxml2.idl
|
||||
@@ -1612,15 +1612,6 @@ coclass FreeThreadedDOMDocument40
|
||||
@@ -125,22 +133,7 @@ index ede4113ecbf..85bb6a5b0cb 100644
|
||||
[
|
||||
helpstring("Server XML HTTP"),
|
||||
progid("Msxml2.ServerXMLHTTP"),
|
||||
@@ -1750,14 +1725,6 @@ coclass XMLSchemaCache40
|
||||
[default] interface IXMLDOMSchemaCollection2;
|
||||
}
|
||||
|
||||
-[
|
||||
- uuid(88d96a07-f192-11d4-a65f-0040963251e5)
|
||||
-]
|
||||
-coclass XMLSchemaCache60
|
||||
-{
|
||||
- [default] interface IXMLDOMSchemaCollection2;
|
||||
-}
|
||||
-
|
||||
[
|
||||
helpstring("XML Schema Cache"),
|
||||
progid("Msxml2.XMLSchemaCache"),
|
||||
@@ -1798,14 +1765,6 @@ coclass XSLTemplate40
|
||||
@@ -1790,14 +1765,6 @@ coclass XSLTemplate40
|
||||
[default] interface IXSLTemplate;
|
||||
}
|
||||
|
||||
@@ -155,7 +148,7 @@ index ede4113ecbf..85bb6a5b0cb 100644
|
||||
[
|
||||
helpstring("XSL Template"),
|
||||
progid("Msxml2.XSLTemplate"),
|
||||
@@ -3297,15 +3256,6 @@ coclass SAXXMLReader40
|
||||
@@ -3289,15 +3256,6 @@ coclass SAXXMLReader40
|
||||
interface ISAXXMLReader;
|
||||
}
|
||||
|
||||
@@ -171,7 +164,7 @@ index ede4113ecbf..85bb6a5b0cb 100644
|
||||
[
|
||||
helpstring("SAX XML Reader"),
|
||||
progid("Msxml2.SAXXMLReader"),
|
||||
@@ -3380,26 +3330,6 @@ coclass MXHTMLWriter40
|
||||
@@ -3372,26 +3330,6 @@ coclass MXHTMLWriter40
|
||||
interface IVBSAXLexicalHandler;
|
||||
}
|
||||
|
||||
@@ -198,7 +191,7 @@ index ede4113ecbf..85bb6a5b0cb 100644
|
||||
[
|
||||
helpstring("MXXMLWriter 3.0"),
|
||||
progid("Msxml2.MXXMLWriter.3.0"),
|
||||
@@ -3444,26 +3374,6 @@ coclass MXXMLWriter40
|
||||
@@ -3436,26 +3374,6 @@ coclass MXXMLWriter40
|
||||
interface IVBSAXLexicalHandler;
|
||||
}
|
||||
|
||||
@@ -225,7 +218,7 @@ index ede4113ecbf..85bb6a5b0cb 100644
|
||||
[
|
||||
helpstring("MXXMLWriter"),
|
||||
progid("Msxml2.MXXMLWriter"),
|
||||
@@ -3506,15 +3416,6 @@ coclass MXNamespaceManager40
|
||||
@@ -3498,15 +3416,6 @@ coclass MXNamespaceManager40
|
||||
interface IMXNamespaceManager;
|
||||
}
|
||||
|
||||
@@ -241,7 +234,7 @@ index ede4113ecbf..85bb6a5b0cb 100644
|
||||
[
|
||||
helpstring("SAXAttributes 3.0"),
|
||||
progid("Msxml2.SAXAttributes.3.0"),
|
||||
@@ -3539,16 +3440,6 @@ coclass SAXAttributes40
|
||||
@@ -3531,16 +3440,6 @@ coclass SAXAttributes40
|
||||
interface ISAXAttributes;
|
||||
}
|
||||
|
||||
@@ -301,5 +294,5 @@ index d4a5c490243..7396826a1f6 100644
|
||||
helpstring("XML HTTP 6.0"),
|
||||
progid("Msxml2.XMLHTTP.6.0"),
|
||||
--
|
||||
2.41.0
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b26ba4d86df312d28bc2422ed1e544b058e4aacd Mon Sep 17 00:00:00 2001
|
||||
From c4694f8dfffa56648976c1a05bb4788262a8677b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
|
||||
Date: Tue, 8 Sep 2020 18:43:52 +0200
|
||||
Subject: [PATCH] msxml3: Implement FreeThreadedXMLHTTP60.
|
||||
@@ -27,10 +27,10 @@ index 7e59a223143..5044c4e2c79 100644
|
||||
|
||||
SOURCES = \
|
||||
diff --git a/dlls/msxml3/factory.c b/dlls/msxml3/factory.c
|
||||
index 243ee379712..323c7b49848 100644
|
||||
index 218ba87c4a8..ed14bd63a87 100644
|
||||
--- a/dlls/msxml3/factory.c
|
||||
+++ b/dlls/msxml3/factory.c
|
||||
@@ -279,6 +279,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
|
||||
@@ -281,6 +281,7 @@ static HRESULT DOMClassFactory_Create(const GUID *clsid, REFIID riid, void **ppv
|
||||
|
||||
static ClassFactory xmldoccf = { { &ClassFactoryVtbl }, XMLDocument_create };
|
||||
static ClassFactory httpreqcf = { { &ClassFactoryVtbl }, XMLHTTPRequest_create };
|
||||
@@ -38,7 +38,7 @@ index 243ee379712..323c7b49848 100644
|
||||
static ClassFactory serverhttp = { { &ClassFactoryVtbl }, ServerXMLHTTP_create };
|
||||
static ClassFactory xsltemplatecf = { { &ClassFactoryVtbl }, XSLTemplate_create };
|
||||
static ClassFactory mxnsmanagercf = { {&ClassFactoryVtbl }, MXNamespaceManager_create };
|
||||
@@ -340,6 +341,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
|
||||
@@ -342,6 +343,10 @@ HRESULT WINAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, void **ppv )
|
||||
{
|
||||
cf = &httpreqcf.IClassFactory_iface;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ index 243ee379712..323c7b49848 100644
|
||||
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP30 ) ||
|
||||
IsEqualCLSID( rclsid, &CLSID_ServerXMLHTTP40 ) ||
|
||||
diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
|
||||
index 459466a1234..d059c20ae81 100644
|
||||
index 6e4ab4c6519..412958a2a40 100644
|
||||
--- a/dlls/msxml3/httprequest.c
|
||||
+++ b/dlls/msxml3/httprequest.c
|
||||
@@ -37,10 +37,12 @@
|
||||
@@ -67,7 +67,7 @@ index 459466a1234..d059c20ae81 100644
|
||||
|
||||
static const WCHAR colspaceW[] = {':',' ',0};
|
||||
static const WCHAR crlfW[] = {'\r','\n',0};
|
||||
@@ -2057,6 +2059,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl =
|
||||
@@ -2054,6 +2056,468 @@ static const struct IServerXMLHTTPRequestVtbl ServerXMLHTTPRequestVtbl =
|
||||
ServerXMLHTTPRequest_setOption
|
||||
};
|
||||
|
||||
@@ -536,7 +536,7 @@ index 459466a1234..d059c20ae81 100644
|
||||
static void init_httprequest(httprequest *req)
|
||||
{
|
||||
req->IXMLHTTPRequest_iface.lpVtbl = &XMLHTTPRequestVtbl;
|
||||
@@ -2106,6 +2570,35 @@ HRESULT XMLHTTPRequest_create(void **obj)
|
||||
@@ -2103,6 +2567,35 @@ HRESULT XMLHTTPRequest_create(void **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -573,10 +573,10 @@ index 459466a1234..d059c20ae81 100644
|
||||
{
|
||||
serverhttp *req;
|
||||
diff --git a/dlls/msxml3/msxml_private.h b/dlls/msxml3/msxml_private.h
|
||||
index 449a86df5e8..3e5181fa6d8 100644
|
||||
index 54f54995c76..6188414c5ce 100644
|
||||
--- a/dlls/msxml3/msxml_private.h
|
||||
+++ b/dlls/msxml3/msxml_private.h
|
||||
@@ -344,6 +344,7 @@ extern HRESULT XMLDocument_create(void**);
|
||||
@@ -343,6 +343,7 @@ extern HRESULT XMLDocument_create(void**);
|
||||
extern HRESULT SAXXMLReader_create(MSXML_VERSION, void**);
|
||||
extern HRESULT SAXAttributes_create(MSXML_VERSION, void**);
|
||||
extern HRESULT XMLHTTPRequest_create(void **);
|
||||
@@ -1017,7 +1017,7 @@ index bccfbaf582a..23d7680d196 100644
|
||||
CoUninitialize();
|
||||
}
|
||||
diff --git a/dlls/msxml3/tests/schema.c b/dlls/msxml3/tests/schema.c
|
||||
index a4fe29aca02..fd244ee2e1c 100644
|
||||
index c83e72e136a..c896f1e6a04 100644
|
||||
--- a/dlls/msxml3/tests/schema.c
|
||||
+++ b/dlls/msxml3/tests/schema.c
|
||||
@@ -32,10 +32,16 @@
|
||||
@@ -1038,7 +1038,7 @@ index a4fe29aca02..fd244ee2e1c 100644
|
||||
#include "wine/test.h"
|
||||
|
||||
diff --git a/dlls/msxml3/uuid.c b/dlls/msxml3/uuid.c
|
||||
index 333d4f3d3c7..1b4f0452c5f 100644
|
||||
index 7214d23c5dc..320a7e04fa3 100644
|
||||
--- a/dlls/msxml3/uuid.c
|
||||
+++ b/dlls/msxml3/uuid.c
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -1049,9 +1049,9 @@ index 333d4f3d3c7..1b4f0452c5f 100644
|
||||
DEFINE_GUID(CLSID_MXNamespaceManager60, 0x88d96a11, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
DEFINE_GUID(CLSID_MXXMLWriter60, 0x88d96a0f, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
DEFINE_GUID(CLSID_SAXAttributes60, 0x88d96a0e, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
@@ -51,6 +52,10 @@ DEFINE_GUID(CLSID_ServerXMLHTTP60, 0x88d96a0b, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0
|
||||
@@ -50,6 +51,10 @@ DEFINE_GUID(CLSID_SAXXMLReader60, 0x88d96a0c, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x
|
||||
DEFINE_GUID(CLSID_ServerXMLHTTP60, 0x88d96a0b, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
DEFINE_GUID(CLSID_XMLHTTP60, 0x88d96a0a, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
DEFINE_GUID(CLSID_XMLSchemaCache60, 0x88d96a07, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
DEFINE_GUID(CLSID_XSLTemplate60, 0x88d96a08, 0xf192, 0x11d4, 0xa6,0x5f, 0x00,0x40,0x96,0x32,0x51,0xe5);
|
||||
+DEFINE_GUID(IID_IXMLHTTPRequest2, 0xe5d37dc0, 0x552a, 0x4d52, 0x9c,0xc0, 0xa1,0x4d,0x54,0x6f,0xbd,0x04);
|
||||
+DEFINE_GUID(IID_IXMLHTTPRequest3, 0xa1c9feee, 0x0617, 0x4f23, 0x9d,0x58, 0x89,0x61,0xea,0x43,0x56,0x7c);
|
||||
@@ -1101,5 +1101,5 @@ index 7396826a1f6..b2d8bd3b337 100644
|
||||
helpstring("XML DOM Document 6.0"),
|
||||
progid("Msxml2.DOMDocument.6.0"),
|
||||
--
|
||||
2.42.0
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,63 +0,0 @@
|
||||
From 8c7d326435794a72c70e05acdff945edf506ec3c Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Wed, 21 Oct 2015 06:23:22 +0800
|
||||
Subject: [PATCH] ntdll: Add fake data implementation for ProcessQuotaLimits
|
||||
class.
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/process.c | 32 +++++++++++++++++++++++++++++++-
|
||||
1 file changed, 31 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
|
||||
index 93d7e7b0140..ae3ab9a8058 100644
|
||||
--- a/dlls/ntdll/unix/process.c
|
||||
+++ b/dlls/ntdll/unix/process.c
|
||||
@@ -1050,7 +1050,6 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
|
||||
|
||||
switch (class)
|
||||
{
|
||||
- UNIMPLEMENTED_INFO_CLASS(ProcessQuotaLimits);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessBasePriority);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessRaisePriority);
|
||||
UNIMPLEMENTED_INFO_CLASS(ProcessExceptionPort);
|
||||
@@ -1109,6 +1108,37 @@ NTSTATUS WINAPI NtQueryInformationProcess( HANDLE handle, PROCESSINFOCLASS class
|
||||
}
|
||||
break;
|
||||
|
||||
+ case ProcessQuotaLimits:
|
||||
+ {
|
||||
+ QUOTA_LIMITS pqli;
|
||||
+
|
||||
+ if (size >= sizeof(QUOTA_LIMITS))
|
||||
+ {
|
||||
+ if (!info)
|
||||
+ ret = STATUS_ACCESS_VIOLATION;
|
||||
+ else if (!handle)
|
||||
+ ret = STATUS_INVALID_HANDLE;
|
||||
+ else
|
||||
+ {
|
||||
+ /* FIXME : real data */
|
||||
+ memset(&pqli, 0, sizeof(QUOTA_LIMITS));
|
||||
+
|
||||
+ memcpy(info, &pqli, sizeof(QUOTA_LIMITS));
|
||||
+
|
||||
+ len = sizeof(QUOTA_LIMITS);
|
||||
+ }
|
||||
+
|
||||
+ if (size > sizeof(QUOTA_LIMITS))
|
||||
+ ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ len = sizeof(QUOTA_LIMITS);
|
||||
+ ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
+ }
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case ProcessIoCounters:
|
||||
{
|
||||
IO_COUNTERS pii;
|
||||
--
|
||||
2.27.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [44812] Multiple applications need NtQueryInformationProcess 'ProcessQuotaLimits' class support (MSYS2, ProcessHacker 2.x)
|
@@ -1,62 +0,0 @@
|
||||
From 9da818bd948256572640e17766a14a72e58ce100 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 25 Feb 2015 22:45:42 +0100
|
||||
Subject: [PATCH] ntdll: Fix race-condition when threads are killed during
|
||||
shutdown.
|
||||
|
||||
When exit_thread is executed, nb_threads is decremented before the thread is
|
||||
fully shutdown. When another thread runs ExitProcess() this will cause a SIGQUIT
|
||||
signal to all threads, effectively decrementing nb_threads twice. The process
|
||||
will terminate with a wrong exitcode then because the refcount reaches zero too
|
||||
early.
|
||||
|
||||
Currently Wine has no locking protection of LdrShutdownProcess(), so it can
|
||||
only be executed safely when all other threads have terminated before. Most
|
||||
likely there are more Wine bugs in this area, but the attached patch should
|
||||
fix the most critical one (messed up refcounting of threads) for now.
|
||||
---
|
||||
dlls/ntdll/thread.c | 2 +-
|
||||
dlls/ntdll/unix/thread.c | 7 +++++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index d5e34cae3b1..83237b3569a 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -295,7 +295,7 @@ void WINAPI RtlExitUserThread( ULONG status )
|
||||
SERVER_END_REQ;
|
||||
}
|
||||
|
||||
- if (InterlockedDecrement( &nb_threads ) <= 0)
|
||||
+ if (InterlockedCompareExchange( &nb_threads, 0, 0 ) <= 0)
|
||||
{
|
||||
LdrShutdownProcess();
|
||||
unix_funcs->exit_process( status );
|
||||
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c
|
||||
index 205a1312e92..563712bd59e 100644
|
||||
--- a/dlls/ntdll/unix/thread.c
|
||||
+++ b/dlls/ntdll/unix/thread.c
|
||||
@@ -219,6 +219,7 @@ void CDECL abort_thread( int status )
|
||||
void CDECL exit_thread( int status )
|
||||
{
|
||||
static void *prev_teb;
|
||||
+ sigset_t sigset;
|
||||
TEB *teb;
|
||||
|
||||
pthread_sigmask( SIG_BLOCK, &server_block_set, NULL );
|
||||
@@ -233,6 +234,12 @@ void CDECL exit_thread( int status )
|
||||
virtual_free_teb( teb );
|
||||
}
|
||||
}
|
||||
+
|
||||
+ sigemptyset( &sigset );
|
||||
+ sigaddset( &sigset, SIGQUIT );
|
||||
+ pthread_sigmask( SIG_BLOCK, &sigset, NULL );
|
||||
+ if (!InterlockedDecrement( nb_threads )) _exit( status );
|
||||
+
|
||||
signal_exit_thread( status, pthread_exit_wrapper );
|
||||
}
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@@ -1,3 +0,0 @@
|
||||
Fixes: Fix race-condition when threads are killed during shutdown
|
||||
# Needs careful review to determine if this is still needed. Deferring.
|
||||
Disabled: true
|
@@ -0,0 +1,28 @@
|
||||
From 321e3228c6c28256bfb209efdc372b61f9c8535f Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Thu, 21 Dec 2023 20:09:23 +0100
|
||||
Subject: [PATCH] kernelbase: Correct return value in VirtualProtect for
|
||||
PAGE_WRITECOPY
|
||||
|
||||
---
|
||||
dlls/kernelbase/memory.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/memory.c b/dlls/kernelbase/memory.c
|
||||
index 4f4bba9a13b..de42395b33b 100644
|
||||
--- a/dlls/kernelbase/memory.c
|
||||
+++ b/dlls/kernelbase/memory.c
|
||||
@@ -481,7 +481,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH VirtualLock( void *addr, SIZE_T size )
|
||||
*/
|
||||
BOOL WINAPI DECLSPEC_HOTPATCH VirtualProtect( void *addr, SIZE_T size, DWORD new_prot, DWORD *old_prot )
|
||||
{
|
||||
- return VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
|
||||
+ BOOL ret = VirtualProtectEx( GetCurrentProcess(), addr, size, new_prot, old_prot );
|
||||
+ if (*old_prot == PAGE_WRITECOPY) *old_prot = PAGE_READWRITE;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 36b85f294e94ff58ba190d7b6606e34d64af1a31 Mon Sep 17 00:00:00 2001
|
||||
From e1f8622b3b787ca19ca1cfc149492c517e5833c4 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 20 Jun 2023 11:54:06 -0600
|
||||
Subject: [PATCH 2/3] ntdll: Implement NtFlushKey().
|
||||
Subject: [PATCH] ntdll: Implement NtFlushKey().
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/registry.c | 155 +++++++++++++++++++++++++++++++++++--
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH 2/3] ntdll: Implement NtFlushKey().
|
||||
3 files changed, 247 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c
|
||||
index b63c7a66925..14b3ade3e6d 100644
|
||||
index 88ad7e569a1..492dd00d67a 100644
|
||||
--- a/dlls/ntdll/unix/registry.c
|
||||
+++ b/dlls/ntdll/unix/registry.c
|
||||
@@ -29,6 +29,8 @@
|
||||
@@ -42,7 +42,7 @@ index b63c7a66925..14b3ade3e6d 100644
|
||||
}
|
||||
|
||||
|
||||
@@ -901,22 +904,162 @@ NTSTATUS WINAPI NtNotifyChangeKey( HANDLE key, HANDLE event, PIO_APC_ROUTINE apc
|
||||
@@ -916,22 +919,162 @@ NTSTATUS WINAPI NtNotifyChangeKey( HANDLE key, HANDLE event, PIO_APC_ROUTINE apc
|
||||
io, filter, subtree, buffer, length, async );
|
||||
}
|
||||
|
||||
@@ -210,10 +210,10 @@ index b63c7a66925..14b3ade3e6d 100644
|
||||
}
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 12aa43a43e7..0e62f609459 100644
|
||||
index 1117e3b797a..910960285a0 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1818,6 +1818,18 @@ struct process_info
|
||||
@@ -1834,6 +1834,18 @@ struct process_info
|
||||
/* Flush a registry key */
|
||||
@REQ(flush_key)
|
||||
obj_handle_t hkey; /* handle to the key */
|
||||
@@ -233,7 +233,7 @@ index 12aa43a43e7..0e62f609459 100644
|
||||
|
||||
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index 3365d4e9a4b..f6d57c579f4 100644
|
||||
index ec1ca27be80..6ec1202cf7a 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -90,6 +90,7 @@ struct key
|
||||
@@ -290,7 +290,7 @@ index 3365d4e9a4b..f6d57c579f4 100644
|
||||
}
|
||||
|
||||
/* go through all the notifications and send them if necessary */
|
||||
@@ -2004,6 +2010,7 @@ void init_registry(void)
|
||||
@@ -1995,6 +2001,7 @@ void init_registry(void)
|
||||
/* save a registry branch to a file */
|
||||
static void save_all_subkeys( struct key *key, FILE *f )
|
||||
{
|
||||
@@ -298,16 +298,16 @@ index 3365d4e9a4b..f6d57c579f4 100644
|
||||
fprintf( f, "WINE REGISTRY Version 2\n" );
|
||||
fprintf( f, ";; All keys relative to " );
|
||||
dump_path( key, NULL, f );
|
||||
@@ -2192,7 +2199,7 @@ static int save_branch( struct key *key, const char *path )
|
||||
@@ -2179,7 +2186,7 @@ static int save_branch( struct key *key, const char *filename )
|
||||
}
|
||||
|
||||
done:
|
||||
free( tmp );
|
||||
- if (ret) make_clean( key );
|
||||
+ if (ret) make_clean( key, key->timestamp_counter );
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2240,6 +2247,36 @@ static int is_wow64_thread( struct thread *thread )
|
||||
@@ -2227,6 +2234,36 @@ static int is_wow64_thread( struct thread *thread )
|
||||
return (is_machine_64bit( native_machine ) && !is_machine_64bit( thread->process->machine ));
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ index 3365d4e9a4b..f6d57c579f4 100644
|
||||
|
||||
/* create a registry key */
|
||||
DECL_HANDLER(create_key)
|
||||
@@ -2304,15 +2341,56 @@ DECL_HANDLER(delete_key)
|
||||
@@ -2291,15 +2328,56 @@ DECL_HANDLER(delete_key)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ index 3365d4e9a4b..f6d57c579f4 100644
|
||||
- release_object( key );
|
||||
+ if (!(save_branch_info[branches[i]].key->flags & KEY_DIRTY)) continue;
|
||||
+ ++reply->branch_count;
|
||||
+ path_len = strlen( save_branch_info[branches[i]].path ) + 1;
|
||||
+ path_len = strlen( save_branch_info[branches[i]].filename ) + 1;
|
||||
+ reply->total += sizeof(int) + sizeof(int) + path_len + save_registry( save_branch_info[branches[i]].key, NULL );
|
||||
+ }
|
||||
+ if (reply->total > get_reply_max_size())
|
||||
@@ -388,10 +388,10 @@ index 3365d4e9a4b..f6d57c579f4 100644
|
||||
+ if (!(save_branch_info[branches[i]].key->flags & KEY_DIRTY)) continue;
|
||||
+ *(int *)data = branches[i];
|
||||
+ data += sizeof(int);
|
||||
+ path_len = strlen( save_branch_info[branches[i]].path ) + 1;
|
||||
+ path_len = strlen( save_branch_info[branches[i]].filename ) + 1;
|
||||
+ *(int *)data = path_len;
|
||||
+ data += sizeof(int);
|
||||
+ memcpy( data, save_branch_info[branches[i]].path, path_len );
|
||||
+ memcpy( data, save_branch_info[branches[i]].filename, path_len );
|
||||
+ data += path_len;
|
||||
+ data += save_registry( save_branch_info[branches[i]].key, data );
|
||||
+ }
|
||||
@@ -406,5 +406,5 @@ index 3365d4e9a4b..f6d57c579f4 100644
|
||||
|
||||
/* enumerate registry subkeys */
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 093f14e3ce1753ef399681ec2ccdeecb4443c7a1 Mon Sep 17 00:00:00 2001
|
||||
From 71559b3e6e2ba78682c3968a9837bf2fa6719830 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <pgofman@codeweavers.com>
|
||||
Date: Tue, 20 Jun 2023 12:17:36 -0600
|
||||
Subject: [PATCH 3/3] mountmgr.sys: Perform periodic registry flush instead of
|
||||
Subject: [PATCH] mountmgr.sys: Perform periodic registry flush instead of
|
||||
server.
|
||||
|
||||
---
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH 3/3] mountmgr.sys: Perform periodic registry flush instead of
|
||||
2 files changed, 22 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c
|
||||
index 1850051a258..ee8d282594f 100644
|
||||
index 52bc6536693..fecac943b41 100644
|
||||
--- a/dlls/mountmgr.sys/mountmgr.c
|
||||
+++ b/dlls/mountmgr.sys/mountmgr.c
|
||||
@@ -618,6 +618,27 @@ static DWORD WINAPI run_loop_thread( void *arg )
|
||||
@@ -616,6 +616,27 @@ static DWORD WINAPI run_loop_thread( void *arg )
|
||||
return MOUNTMGR_CALL( run_loop, ¶ms );
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ index 1850051a258..ee8d282594f 100644
|
||||
|
||||
/* main entry point for the mount point manager driver */
|
||||
NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
|
||||
@@ -661,6 +682,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
|
||||
@@ -659,6 +680,7 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
|
||||
|
||||
thread = CreateThread( NULL, 0, device_op_thread, NULL, 0, NULL );
|
||||
CloseHandle( CreateThread( NULL, 0, run_loop_thread, thread, 0, NULL ));
|
||||
@@ -50,7 +50,7 @@ index 1850051a258..ee8d282594f 100644
|
||||
#ifdef _WIN64
|
||||
/* create a symlink so that the Wine port overrides key can be edited with 32-bit reg or regedit */
|
||||
diff --git a/server/registry.c b/server/registry.c
|
||||
index f6d57c579f4..21566057fa1 100644
|
||||
index 6ec1202cf7a..09badf44bcd 100644
|
||||
--- a/server/registry.c
|
||||
+++ b/server/registry.c
|
||||
@@ -125,15 +125,12 @@ static abstime_t change_timestamp_counter;
|
||||
@@ -69,7 +69,7 @@ index f6d57c579f4..21566057fa1 100644
|
||||
static struct key_value *find_value( const struct key *key, const struct unicode_str *name, int *index );
|
||||
|
||||
/* information about where to save a registry branch */
|
||||
@@ -1983,9 +1980,6 @@ void init_registry(void)
|
||||
@@ -1976,9 +1973,6 @@ void init_registry(void)
|
||||
release_object( hklm );
|
||||
release_object( hkcu );
|
||||
|
||||
@@ -79,7 +79,7 @@ index f6d57c579f4..21566057fa1 100644
|
||||
/* create windows directories */
|
||||
|
||||
if (!mkdir( "drive_c/windows", 0777 ))
|
||||
@@ -2203,26 +2197,6 @@ done:
|
||||
@@ -2190,26 +2184,6 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ index f6d57c579f4..21566057fa1 100644
|
||||
- if (fchdir( config_dir_fd ) == -1) return;
|
||||
- save_timeout_user = NULL;
|
||||
- for (i = 0; i < save_branch_count; i++)
|
||||
- save_branch( save_branch_info[i].key, save_branch_info[i].path );
|
||||
- save_branch( save_branch_info[i].key, save_branch_info[i].filename );
|
||||
- if (fchdir( server_dir_fd ) == -1) fatal_error( "chdir to server dir: %s\n", strerror( errno ));
|
||||
- set_periodic_save_timer();
|
||||
-}
|
||||
@@ -107,5 +107,5 @@ index f6d57c579f4..21566057fa1 100644
|
||||
void flush_registry(void)
|
||||
{
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user