Compare commits

...

17 Commits

Author SHA1 Message Date
Alistair Leslie-Hughes
2827fd6727 Release v8.17.1 2023-10-02 13:02:27 +11:00
Alistair Leslie-Hughes
c55fa81f35 Updated sapi-ISpObjectToken-CreateInstance patchset 2023-10-01 09:43:09 +11:00
Alistair Leslie-Hughes
46ac00b4a4 Updated ntdll-Junction_Points patchset 2023-10-01 09:36:47 +11:00
Alistair Leslie-Hughes
3aed8374fa Updated d3d12core-D3D12GetInterface patchset 2023-10-01 09:33:09 +11:00
Alistair Leslie-Hughes
8b016d206e Updated eventfd_synchronization patchset 2023-10-01 08:49:40 +11:00
Alistair Leslie-Hughes
2e55aa06c2 Release v8.17 2023-09-30 12:24:25 +10:00
Alistair Leslie-Hughes
1f62a67dcc Added d3dx9_36_controller patchset 2023-09-30 10:32:04 +10:00
Alistair Leslie-Hughes
82924e9a17 Rebase against 3db7506221e44e8091887d7eb42fe1666d422166. 2023-09-30 09:55:54 +10:00
Alistair Leslie-Hughes
b7b4fbcd32 Updated vkd3d-latest patchset 2023-09-29 18:11:42 +10:00
Alistair Leslie-Hughes
83504ec21a Rebase against 9e0487c4cc36cdbf915d35222c875d23f54958ae. 2023-09-29 18:11:07 +10:00
Alistair Leslie-Hughes
0860bc1c5e Rebase against 416a273241e6eb7a8d15380387fef00e159b7277. 2023-09-28 08:40:53 +10:00
Alistair Leslie-Hughes
8bfcd6ad7d Rebase against 81c8c73de299c0d61d1fff8ad9b88a9deb5b9479. 2023-09-26 09:26:16 +10:00
Alistair Leslie-Hughes
d2cf83298d Rebase against 56e58cbed19bb5307598d4f433d5b3f01af91a1b. 2023-09-24 08:30:07 +10:00
Alistair Leslie-Hughes
6e8855e1a0 Updated user32-recursive-activation patchset
Fix warning.
2023-09-22 09:25:26 +10:00
Alistair Leslie-Hughes
a7511fa5da Updated vkd3d-latest to 1.9 2023-09-22 09:15:39 +10:00
Alistair Leslie-Hughes
b3e9ea1058 Rebase against ee17400c05d88fa29d0b895fa01902adfc91ba7f. 2023-09-21 08:08:08 +10:00
Alistair Leslie-Hughes
c4da0a8993 Rebase against 6558611fa2d24447297cb62d168b924c33839c43. 2023-09-20 08:16:07 +10:00
32 changed files with 8064 additions and 51704 deletions

View File

@@ -60,7 +60,7 @@ index 00000000000..75a083ad276
+
+HRESULT WINAPI D3D12GetInterface(REFCLSID rclsid, REFIID riid, void **out)
+{
+ FIXME("%d, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
+ FIXME("%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), out);
+
+ return E_NOINTERFACE;
+}

View File

@@ -210,7 +210,7 @@ index 984b2f6..a206e06 100644
+HRESULT WINAPI D3DXComputeTangent(ID3DXMesh *mesh, DWORD stage_idx, DWORD tangent_idx,
+ DWORD binorm_idx, DWORD wrap, const DWORD *adjacency)
+{
+ TRACE("mesh %p, stage_idx %d, tangent_idx %d, binorm_idx %d, wrap %d, adjacency %p.\n",
+ TRACE("mesh %p, stage_idx %ld, tangent_idx %ld, binorm_idx %ld, wrap %ld, adjacency %p.\n",
+ mesh, stage_idx, tangent_idx, binorm_idx, wrap, adjacency);
+
+ return D3DXComputeTangentFrameEx( mesh, D3DDECLUSAGE_TEXCOORD, stage_idx,

View File

@@ -174,18 +174,18 @@ index 1daec158a5f..64b02276843 100644
+ }
+
+ hr = D3DXCreateSkinInfoFVF(4, D3DFVF_XYZ | D3DFVF_NORMAL, 2, &skin_info);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+
+ skin_info->lpVtbl->SetBoneInfluence(skin_info, 0, 2, bone0_vertices, bone0_weights);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->SetBoneOffsetMatrix(skin_info, 0, &matrix);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->SetBoneInfluence(skin_info, 1, 2, bone1_vertices, bone1_weights);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->SetBoneOffsetMatrix(skin_info, 1, &matrix);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ skin_info->lpVtbl->UpdateSkinnedMesh(skin_info, bones_matrix, NULL, vertices_src, vertices_dest);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ for (i = 0; i < 4; i++)
+ {
+ ok(compare(vertices_dest[i*2].x, vertices_ref[i*2].x), "Vertex[%d].position.x: got %g, expected %g\n",

View File

@@ -0,0 +1,27 @@
From 1772b5826cbd3adef3f5c09e6c0138a8d367fc8b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 28 Sep 2023 09:14:00 +1000
Subject: [PATCH 1/3] d3dx9: D3DXLoadMeshHierarchyFromXInMemory return default
Animation Controller
---
dlls/d3dx9_36/mesh.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 8aa4ece69fb..442b56a7e19 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -4019,7 +4019,8 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memo
if (anim_controller)
{
*anim_controller = NULL;
- FIXME("Animation controller creation not implemented.\n");
+ /*FIXME("Animation controller creation not implemented.\n");*/
+ D3DXCreateAnimationController(1, 1, 1, 1, anim_controller);
}
cleanup:
--
2.40.1

View File

@@ -0,0 +1,169 @@
From c79c2913f06f0fe703f00ca324270e0551ca7027 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 28 Sep 2023 12:35:29 +1000
Subject: [PATCH] d3dx9: D3DXLoadMeshHierarchyFromXInMemory support empty mesh.
---
dlls/d3dx9_36/mesh.c | 36 ++++++++++++++++++++++++-----
dlls/d3dx9_36/tests/mesh.c | 46 ++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 5 deletions(-)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 442b56a7e19..c85a9774fdd 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -3506,6 +3506,16 @@ HRESULT WINAPI D3DXLoadSkinMeshFromXof(struct ID3DXFileData *filedata, DWORD opt
hr = parse_mesh(filedata, &mesh_data, provide_flags);
if (FAILED(hr)) goto cleanup;
+ if (mesh_data.num_vertices == 0)
+ {
+ if (adjacency_out) *adjacency_out = NULL;
+ if (materials_out) *materials_out = NULL;
+ if (effects_out) *effects_out = NULL;
+ *mesh_out = NULL;
+ hr = D3D_OK;
+ goto cleanup;
+ }
+
total_vertices = mesh_data.num_vertices;
if (mesh_data.fvf & D3DFVF_NORMAL) {
/* duplicate vertices with multiple normals */
@@ -3815,7 +3825,8 @@ static HRESULT load_mesh_container(struct ID3DXFileData *filedata, DWORD options
hr = filedata_get_name(filedata, &name);
if (FAILED(hr)) goto cleanup;
- hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data,
+ if (mesh_data.pMesh)
+ hr = alloc_hier->lpVtbl->CreateMeshContainer(alloc_hier, name, &mesh_data,
materials ? ID3DXBuffer_GetBufferPointer(materials) : NULL,
effects ? ID3DXBuffer_GetBufferPointer(effects) : NULL,
num_materials,
@@ -4201,13 +4212,21 @@ static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct
hr = E_OUTOFMEMORY;
goto err;
}
- list_add_tail(container_list, &container->entry);
- container->transform = transform;
hr = D3DXLoadSkinMeshFromXof(child, options, device,
(provide_flags & PROVIDE_ADJACENCY) ? &container->adjacency : NULL,
(provide_flags & PROVIDE_MATERIALS) ? &container->materials : NULL,
NULL, &container->num_materials, NULL, &container->mesh);
+
+ if (container->mesh)
+ {
+ list_add_tail(container_list, &container->entry);
+ container->transform = transform;
+ }
+ else
+ {
+ HeapFree(GetProcessHeap(), HEAP_ZERO_MEMORY, container);
+ }
} else if (IsEqualGUID(&type, &TID_D3DRMFrameTransformMatrix)) {
D3DXMATRIX new_transform;
hr = parse_transform_matrix(child, &new_transform);
@@ -4295,13 +4314,20 @@ HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size,
hr = E_OUTOFMEMORY;
goto cleanup;
}
- list_add_tail(&container_list, &container_ptr->entry);
- D3DXMatrixIdentity(&container_ptr->transform);
hr = D3DXLoadSkinMeshFromXof(filedata, options, device,
(provide_flags & PROVIDE_ADJACENCY) ? &container_ptr->adjacency : NULL,
(provide_flags & PROVIDE_MATERIALS) ? &container_ptr->materials : NULL,
NULL, &container_ptr->num_materials, NULL, &container_ptr->mesh);
+ if (container_ptr->mesh)
+ {
+ list_add_tail(&container_list, &container_ptr->entry);
+ D3DXMatrixIdentity(&container_ptr->transform);
+ }
+ else
+ {
+ HeapFree(GetProcessHeap(), 0, container_ptr);
+ }
} else if (IsEqualGUID(&guid, &TID_D3DRMFrame)) {
hr = parse_frame(filedata, options, device, &identity, &container_list, provide_flags);
}
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index ce0f238412d..21428f12e26 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -2068,6 +2068,14 @@ static void D3DXLoadMeshTest(void)
"}"
"Mesh { 3; 0.0; 0.0; 0.0;, 0.0; 1.0; 0.0;, 3.0; 1.0; 0.0;; 1; 3; 0, 1, 2;; }"
"}";
+ static const char framed_xfile2[] =
+ "xof 0303txt 0032"
+ "Frame Box01 {"
+ "Mesh { 0;; 0;;"
+ "MeshNormals { 0;; 0;; }"
+ "}"
+ "}";
+
static const WORD framed_index_buffer[] = { 0, 1, 2 };
static const D3DXVECTOR3 framed_vertex_buffers[3][3] = {
{{0.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {1.0, 1.0, 0.0}},
@@ -2513,6 +2521,19 @@ static void D3DXLoadMeshTest(void)
frame_hier = NULL;
}
+ hr = D3DXLoadMeshHierarchyFromXInMemory(framed_xfile2, sizeof(framed_xfile2) - 1,
+ D3DXMESH_MANAGED, device, &alloc_hier, NULL, &frame_hier, NULL);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ if (SUCCEEDED(hr)) {
+ D3DXMESHCONTAINER *container = frame_hier->pMeshContainer;
+
+ ok(!strcmp(frame_hier->Name, "Box01"), "Expected '', got '%s'\n", frame_hier->Name);
+ ok(container == NULL, "Expected NULL, got %p\n", container);
+
+ hr = D3DXFrameDestroy(frame_hier, &alloc_hier);
+ ok(hr == D3D_OK, "Expected D3D_OK, got %#lx\n", hr);
+ frame_hier = NULL;
+ }
hr = D3DXLoadMeshFromXInMemory(NULL, 0, D3DXMESH_MANAGED,
device, NULL, NULL, NULL, NULL, &mesh);
@@ -11426,6 +11447,9 @@ static void test_load_skin_mesh_from_xof(void)
"1;"
"3; 0, 1, 2;;"
"}";
+ static const char simple_xfile_empty[] =
+ "xof 0303txt 0032"
+ "Mesh { 0;; 0;; }";
static const D3DVERTEXELEMENT9 expected_declaration[] =
{
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
@@ -11537,6 +11561,28 @@ static void test_load_skin_mesh_from_xof(void)
mesh->lpVtbl->Release(mesh);
adjacency->lpVtbl->Release(adjacency);
file_data->lpVtbl->Release(file_data);
+
+ /* Empty Mesh Test */
+ file_data = get_mesh_data(simple_xfile_empty, sizeof(simple_xfile_empty) - 1);
+ ok(!!file_data, "Failed to load mesh data.\n");
+
+ adjacency = materials = effects = (void *)0xdeadbeef;
+ count = ~0u;
+ skin_info = (void *)0xdeadbeef;
+ mesh = (void *)0xdeadbeef;
+
+ hr = D3DXLoadSkinMeshFromXof(file_data, 0, device, &adjacency, &materials, &effects, &count,
+ &skin_info, &mesh);
+ todo_wine ok(hr == D3DXERR_LOADEDMESHASNODATA, "Got unexpected hr %#lx.\n", hr);
+ ok(!adjacency, "Got unexpected value %p.\n", adjacency);
+ ok(!materials, "Got unexpected value %p.\n", materials);
+ ok(!effects, "Got unexpected value %p.\n", effects);
+ ok(count == ~0u, "Got unexpected value %lu.\n", count);
+ ok(skin_info == (void *)0xdeadbeef, "Got unexpected value %p.\n", skin_info);
+ ok(!mesh, "Got unexpected value %p.\n", mesh);
+
+ file_data->lpVtbl->Release(file_data);
+
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount);
DestroyWindow(hwnd);
--
2.42.0

View File

@@ -0,0 +1,28 @@
From 164c33e29bfe06d99c58c1ee73dfd6f31dc4c663 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 30 Sep 2023 10:18:54 +1000
Subject: [PATCH] d3dx9: [HACK] D3DXIntersect - Assign hit to FALSE
This functions needs to be implement to make "Humanity Asset" to work correctly.
Added to stop the Infinite loop - Doesn't make the game playable.
---
dlls/d3dx9_36/mesh.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index 822b2d7d410..fdc642c4e0c 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -7645,6 +7645,8 @@ HRESULT WINAPI D3DXIntersect(ID3DXBaseMesh *mesh, const D3DXVECTOR3 *ray_pos, co
FIXME("mesh %p, ray_pos %p, ray_dir %p, hit %p, face_index %p, u %p, v %p, distance %p, all_hits %p, "
"count_of_hits %p stub!\n", mesh, ray_pos, ray_dir, hit, face_index, u, v, distance, all_hits, count_of_hits);
+ *hit = FALSE;
+
return E_NOTIMPL;
}
--
2.42.0

View File

@@ -0,0 +1,4 @@
Fixes: [39876] d3dx9: D3DXLoadMeshHierarchyFromXInMemory return a dummy ID3DXAnimationController.
# This allow Humanity Asset to get in game - Doesn't make the game playable though.
# Requires D3DXIntersect to be implemented.

View File

@@ -1,19 +1,19 @@
From 87bf08071997f446498bdea2d18d1bb539a1990e Mon Sep 17 00:00:00 2001
From aa953a66080d49a697101fb55a1bd950de4a59db Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 2 Dec 2022 14:41:30 +1100
Subject: [PATCH] dmime: Implement IDirectMusicSegment8 Download
---
dlls/dmime/dmime_private.h | 2 +
dlls/dmime/performance.c | 7 +++
dlls/dmime/segment.c | 87 ++++++++++++++++++++++++++++++++++++--
3 files changed, 93 insertions(+), 3 deletions(-)
dlls/dmime/performance.c | 7 ++++
dlls/dmime/segment.c | 84 +++++++++++++++++++++++++++++++++++++-
3 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h
index 6102fd5ec2f..da40b58ad9b 100644
index eacde4b46be..cd34378b66e 100644
--- a/dlls/dmime/dmime_private.h
+++ b/dlls/dmime/dmime_private.h
@@ -71,6 +71,8 @@ extern void set_audiopath_perf_pointer(IDirectMusicAudioPath*,IDirectMusicPerfor
@@ -70,6 +70,8 @@ extern void set_audiopath_perf_pointer(IDirectMusicAudioPath*,IDirectMusicPerfor
extern void set_audiopath_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffer*);
extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffer*);
@@ -23,10 +23,10 @@ index 6102fd5ec2f..da40b58ad9b 100644
* Auxiliary definitions
*/
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 1f8de0837d5..622939f3553 100644
index 111d7c60568..8a418b8df13 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -253,6 +253,13 @@ static inline struct performance *impl_from_IDirectMusicPerformance8(IDirectMusi
@@ -251,6 +251,13 @@ static inline struct performance *impl_from_IDirectMusicPerformance8(IDirectMusi
return CONTAINING_RECORD(iface, struct performance, IDirectMusicPerformance8_iface);
}
@@ -41,34 +41,30 @@ index 1f8de0837d5..622939f3553 100644
static HRESULT WINAPI performance_QueryInterface(IDirectMusicPerformance8 *iface, REFIID riid, void **ret_iface)
{
diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
index 39a5333fbbb..ce49ddc9940 100644
index af7729f34b9..284564749df 100644
--- a/dlls/dmime/segment.c
+++ b/dlls/dmime/segment.c
@@ -37,6 +37,7 @@ typedef struct IDirectMusicSegment8Impl {
@@ -54,6 +54,7 @@ struct segment
PCMWAVEFORMAT wave_format;
void *wave_data;
int data_size;
+ IDirectSoundBuffer *buffer;
} IDirectMusicSegment8Impl;
};
IDirectMusicSegment8Impl *create_segment(void);
@@ -90,6 +91,8 @@ static ULONG WINAPI IDirectMusicSegment8Impl_Release(IDirectMusicSegment8 *iface
TRACE("(%p) ref=%ld\n", This, ref);
static struct segment *segment_create(void);
@@ -114,6 +115,8 @@ static ULONG WINAPI segment_Release(IDirectMusicSegment8 *iface)
track_entry_destroy(entry);
}
if (!ref) {
+ if (This->buffer)
+ IDirectSoundBuffer_Release(This->buffer);
if (This->wave_data)
free(This->wave_data);
@@ -559,9 +562,87 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_Compose(IDirectMusicSegment8 *ifa
static HRESULT WINAPI IDirectMusicSegment8Impl_Download(IDirectMusicSegment8 *iface,
IUnknown *pAudioPath)
@@ -533,8 +536,87 @@ static HRESULT WINAPI segment_Compose(IDirectMusicSegment8 *iface, MUSIC_TIME mt
static HRESULT WINAPI segment_Download(IDirectMusicSegment8 *iface, IUnknown *audio_path)
{
- IDirectMusicSegment8Impl *This = impl_from_IDirectMusicSegment8(iface);
- FIXME("(%p, %p): stub\n", This, pAudioPath);
- return S_OK;
+ IDirectMusicSegment8Impl *This = impl_from_IDirectMusicSegment8(iface);
struct segment *This = impl_from_IDirectMusicSegment8(iface);
+ IDirectMusicPerformance8 *perf;
+ IDirectMusicAudioPath *audio;
+ IDirectSound *dsound;
@@ -78,11 +74,16 @@ index 39a5333fbbb..ce49ddc9940 100644
+ DWORD size;
+ DWORD buffer = 0;
+
+ TRACE("(%p, %p)\n", This, pAudioPath);
TRACE("(%p, %p)\n", This, audio_path);
- return IDirectMusicSegment8_SetParam(iface, &GUID_DownloadToAudioPath, -1, DMUS_SEG_ALLTRACKS, 0, audio_path);
+
+ if (!pAudioPath)
+ if (!audio_path)
+ return E_INVALIDARG;
+
+ hr = IDirectMusicSegment8_SetParam(iface, &GUID_DownloadToAudioPath, -1, DMUS_SEG_ALLTRACKS, 0, audio_path);
+ if (FAILED(hr))
+ return hr;
+
+ if (This->buffer)
+ {
+ TRACE("Using Cached buffer\n");
@@ -90,11 +91,11 @@ index 39a5333fbbb..ce49ddc9940 100644
+ }
+
+ /* pAudioPath can either be IDirectMusicAudioPath or IDirectMusicPerformance */
+ hr = IUnknown_QueryInterface(pAudioPath, &IID_IDirectMusicPerformance8, (void**)&perf);
+ hr = IUnknown_QueryInterface(audio_path, &IID_IDirectMusicPerformance8, (void**)&perf);
+ if (FAILED(hr))
+ {
+ TRACE("Checking for IDirectMusicAudioPath interface\n");
+ hr = IUnknown_QueryInterface(pAudioPath, &IID_IDirectMusicAudioPath, (void**)&audio);
+ hr = IUnknown_QueryInterface(audio_path, &IID_IDirectMusicAudioPath, (void**)&audio);
+ if (FAILED(hr))
+ {
+ WARN("Cannot query for IDirectMusicAudioPath\n");
@@ -145,13 +146,10 @@ index 39a5333fbbb..ce49ddc9940 100644
+ hr = IDirectSoundBuffer_Unlock(This->buffer, data, This->data_size, NULL, 0);
+ TRACE("IDirectSoundBuffer_Unlock hr 0x%08lx\n", hr);
+
+ /*hr = IDirectSoundBuffer_Play(This->buffer, 0, 0, 0);
+ TRACE("IDirectSoundBuffer_Play hr 0x%08lx\n", hr);*/
+
+ return S_OK;
+ return S_OK;
}
static HRESULT WINAPI IDirectMusicSegment8Impl_Unload(IDirectMusicSegment8 *iface,
static HRESULT WINAPI segment_Unload(IDirectMusicSegment8 *iface, IUnknown *audio_path)
--
2.40.1
2.42.0

View File

@@ -1,4 +1,4 @@
From 43007318a6303312b6226c9ede009e4299826af3 Mon Sep 17 00:00:00 2001
From 5c84cc44881073aa756e4797a776acbde4d063ae Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 12 Dec 2022 15:20:10 +1100
Subject: [PATCH] dmime: Play a sound in IDirectMusicPerformance8 PlaySegmentEx
@@ -10,10 +10,10 @@ Subject: [PATCH] dmime: Play a sound in IDirectMusicPerformance8 PlaySegmentEx
3 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h
index da40b58ad9b..4532528f535 100644
index cd34378b66e..c83f6675333 100644
--- a/dlls/dmime/dmime_private.h
+++ b/dlls/dmime/dmime_private.h
@@ -72,6 +72,7 @@ extern void set_audiopath_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffe
@@ -71,6 +71,7 @@ extern void set_audiopath_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffe
extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffer*);
extern IDirectSound *get_dsound_interface(IDirectMusicPerformance8*);
@@ -22,10 +22,10 @@ index da40b58ad9b..4532528f535 100644
/*****************************************************************************
* Auxiliary definitions
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 622939f3553..c7b149f0686 100644
index 8a418b8df13..a0dbdbd5aad 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -1028,13 +1028,26 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
@@ -1075,13 +1075,26 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface,
WCHAR *pwzSegmentName, IUnknown *pTransition, DWORD dwFlags, __int64 i64StartTime,
IDirectMusicSegmentState **ppSegmentState, IUnknown *pFrom, IUnknown *pAudioPath)
{
@@ -59,22 +59,22 @@ index 622939f3553..c7b149f0686 100644
static HRESULT WINAPI performance_StopEx(IDirectMusicPerformance8 *iface, IUnknown *pObjectToStop,
diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c
index ce49ddc9940..ad121736acd 100644
index 284564749df..af76258c979 100644
--- a/dlls/dmime/segment.c
+++ b/dlls/dmime/segment.c
@@ -47,6 +47,12 @@ static inline IDirectMusicSegment8Impl *impl_from_IDirectMusicSegment8(IDirectMu
return CONTAINING_RECORD(iface, IDirectMusicSegment8Impl, IDirectMusicSegment8_iface);
@@ -64,6 +64,12 @@ static inline struct segment *impl_from_IDirectMusicSegment8(IDirectMusicSegment
return CONTAINING_RECORD(iface, struct segment, IDirectMusicSegment8_iface);
}
+IDirectSoundBuffer *get_segment_buffer(IDirectMusicSegment8 *iface)
+{
+ IDirectMusicSegment8Impl *This = impl_from_IDirectMusicSegment8(iface);
+ struct segment *This = impl_from_IDirectMusicSegment8(iface);
+ return This->buffer;
+}
+
static HRESULT WINAPI IDirectMusicSegment8Impl_QueryInterface(IDirectMusicSegment8 *iface,
REFIID riid, void **ret_iface)
static HRESULT WINAPI segment_QueryInterface(IDirectMusicSegment8 *iface, REFIID riid, void **ret_iface)
{
struct segment *This = impl_from_IDirectMusicSegment8(iface);
--
2.40.1
2.42.0

View File

@@ -1,4 +1,4 @@
From 9ab2897d8c05a9950ce14200d1d7f374a31ee886 Mon Sep 17 00:00:00 2001
From e222dd363cf419eecb0d5c97390b60de15f37951 Mon Sep 17 00:00:00 2001
From: Zebediah Figura <z.figura12@gmail.com>
Date: Fri, 8 Jun 2018 18:51:40 -0500
Subject: [PATCH] server: Add an object operation to grab the esync file
@@ -43,7 +43,7 @@ Split off to decrease patch size.
34 files changed, 68 insertions(+)
diff --git a/server/async.c b/server/async.c
index 7aef28355f0..7ac675f75c4 100644
index 9cb251df5ce..337bba8631b 100644
--- a/server/async.c
+++ b/server/async.c
@@ -77,6 +77,7 @@ static const struct object_ops async_ops =
@@ -54,7 +54,7 @@ index 7aef28355f0..7ac675f75c4 100644
async_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -586,6 +587,7 @@ static const struct object_ops iosb_ops =
@@ -676,6 +677,7 @@ static const struct object_ops iosb_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -75,7 +75,7 @@ index ff0799f5880..d9824de8eac 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/change.c b/server/change.c
index 325782d8197..90d5bfa3019 100644
index 7a806abc017..e080511bb23 100644
--- a/server/change.c
+++ b/server/change.c
@@ -112,6 +112,7 @@ static const struct object_ops dir_ops =
@@ -111,7 +111,7 @@ index 6933195e72d..3d4be86a212 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/console.c b/server/console.c
index 5407fba1411..ef6bcb12f5a 100644
index b64283baf4a..1cc9eea6a50 100644
--- a/server/console.c
+++ b/server/console.c
@@ -81,6 +81,7 @@ static const struct object_ops console_ops =
@@ -191,7 +191,7 @@ index 48adb244b09..d85a2000684 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/device.c b/server/device.c
index d6288920bf4..80904d33d0d 100644
index 436dac6bfe9..f730fa81afa 100644
--- a/server/device.c
+++ b/server/device.c
@@ -66,6 +66,7 @@ static const struct object_ops irp_call_ops =
@@ -227,7 +227,7 @@ index d6288920bf4..80904d33d0d 100644
no_signal, /* signal */
device_file_get_fd, /* get_fd */
diff --git a/server/directory.c b/server/directory.c
index 2cd61be0838..ed3ab1ebb8f 100644
index 23d7eb0a2b7..bc161b9ab7e 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -69,6 +69,7 @@ static const struct object_ops object_type_ops =
@@ -247,7 +247,7 @@ index 2cd61be0838..ed3ab1ebb8f 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/esync.c b/server/esync.c
index 8faea3c790b..1fa81b96176 100644
index 6a63c0dd5e9..f95dc5a391f 100644
--- a/server/esync.c
+++ b/server/esync.c
@@ -122,6 +122,7 @@ static const struct object_ops esync_ops =
@@ -279,10 +279,10 @@ index f1b79b1b35e..c727bfdd1ba 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/fd.c b/server/fd.c
index cd8f7171e6e..a61c09559fe 100644
index 74ad95fd4d1..4ce498ec0ef 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -212,6 +212,7 @@ static const struct object_ops fd_ops =
@@ -172,6 +172,7 @@ static const struct object_ops fd_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -290,7 +290,7 @@ index cd8f7171e6e..a61c09559fe 100644
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -253,6 +254,7 @@ static const struct object_ops device_ops =
@@ -213,6 +214,7 @@ static const struct object_ops device_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -298,7 +298,7 @@ index cd8f7171e6e..a61c09559fe 100644
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -293,6 +295,7 @@ static const struct object_ops inode_ops =
@@ -253,6 +255,7 @@ static const struct object_ops inode_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -306,7 +306,7 @@ index cd8f7171e6e..a61c09559fe 100644
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -335,6 +338,7 @@ static const struct object_ops file_lock_ops =
@@ -295,6 +298,7 @@ static const struct object_ops file_lock_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
file_lock_signaled, /* signaled */
@@ -315,10 +315,10 @@ index cd8f7171e6e..a61c09559fe 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/file.c b/server/file.c
index 090d6c244f7..7edf612de73 100644
index b4f99ddc93b..1b4efb04bc5 100644
--- a/server/file.c
+++ b/server/file.c
@@ -123,6 +123,7 @@ static const struct object_ops file_ops =
@@ -94,6 +94,7 @@ static const struct object_ops file_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
default_fd_signaled, /* signaled */
@@ -327,7 +327,7 @@ index 090d6c244f7..7edf612de73 100644
no_signal, /* signal */
file_get_fd, /* get_fd */
diff --git a/server/handle.c b/server/handle.c
index 38ad80da267..53cc1e4eb43 100644
index 0595fdb403b..d41c7e86454 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -126,6 +126,7 @@ static const struct object_ops handle_table_ops =
@@ -387,7 +387,7 @@ index 2d8697ec9bd..4cf9b73f784 100644
no_signal, /* signal */
mailslot_device_file_get_fd, /* get_fd */
diff --git a/server/mapping.c b/server/mapping.c
index 8d4332d240f..1a8d480cfa9 100644
index 2d0a0b783e2..1acfb032bfd 100644
--- a/server/mapping.c
+++ b/server/mapping.c
@@ -67,6 +67,7 @@ static const struct object_ops ranges_ops =
@@ -427,7 +427,7 @@ index af0efe72132..4785a830e92 100644
mutex_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/named_pipe.c b/server/named_pipe.c
index 3e6cf09d4f2..b8ec17a787a 100644
index f3404a33c3b..f28cb14cb45 100644
--- a/server/named_pipe.c
+++ b/server/named_pipe.c
@@ -119,6 +119,7 @@ static const struct object_ops named_pipe_ops =
@@ -471,7 +471,7 @@ index 3e6cf09d4f2..b8ec17a787a 100644
no_signal, /* signal */
named_pipe_device_file_get_fd, /* get_fd */
diff --git a/server/object.h b/server/object.h
index f6ad9e8ccdd..f4261d0d585 100644
index dfdd691601f..711af54b579 100644
--- a/server/object.h
+++ b/server/object.h
@@ -78,6 +78,8 @@ struct object_ops
@@ -484,7 +484,7 @@ index f6ad9e8ccdd..f4261d0d585 100644
void (*satisfied)(struct object *,struct wait_queue_entry *);
/* signal an object */
diff --git a/server/process.c b/server/process.c
index 60cc03032b2..c79a574d137 100644
index a0d5ea64d97..777bf7c2fe2 100644
--- a/server/process.c
+++ b/server/process.c
@@ -105,6 +105,7 @@ static const struct object_ops process_ops =
@@ -512,10 +512,10 @@ index 60cc03032b2..c79a574d137 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/queue.c b/server/queue.c
index 051aafc6c3d..375b3e33a6e 100644
index 348fdac3214..2cd8949a252 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -173,6 +173,7 @@ static const struct object_ops msg_queue_ops =
@@ -174,6 +174,7 @@ static const struct object_ops msg_queue_ops =
msg_queue_add_queue, /* add_queue */
msg_queue_remove_queue, /* remove_queue */
msg_queue_signaled, /* signaled */
@@ -523,7 +523,7 @@ index 051aafc6c3d..375b3e33a6e 100644
msg_queue_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -210,6 +211,7 @@ static const struct object_ops thread_input_ops =
@@ -211,6 +212,7 @@ static const struct object_ops thread_input_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -532,10 +532,10 @@ index 051aafc6c3d..375b3e33a6e 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/registry.c b/server/registry.c
index 93e8a309593..32a424cd842 100644
index 629d67c832f..d6b39b99b22 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -178,6 +178,7 @@ static const struct object_ops key_ops =
@@ -180,6 +180,7 @@ static const struct object_ops key_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -592,10 +592,10 @@ index 19b76d44c16..55cd6aa037e 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/sock.c b/server/sock.c
index 512b7c0f78e..7a8be919494 100644
index 52175b08987..77b41716cd1 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -249,6 +249,7 @@ static const struct object_ops sock_ops =
@@ -451,6 +451,7 @@ static const struct object_ops sock_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
default_fd_signaled, /* signaled */
@@ -603,7 +603,7 @@ index 512b7c0f78e..7a8be919494 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
sock_get_fd, /* get_fd */
@@ -3124,6 +3125,7 @@ static const struct object_ops ifchange_ops =
@@ -3481,6 +3482,7 @@ static const struct object_ops ifchange_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -611,7 +611,7 @@ index 512b7c0f78e..7a8be919494 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
ifchange_get_fd, /* get_fd */
@@ -3345,6 +3347,7 @@ static const struct object_ops socket_device_ops =
@@ -3702,6 +3704,7 @@ static const struct object_ops socket_device_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -632,7 +632,7 @@ index 27d48e2f994..8cb24b4ff6e 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/thread.c b/server/thread.c
index a8fa9a19585..b49b3f159d2 100644
index 0d5bdcf21d9..9dc38d4cce9 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -96,6 +96,7 @@ static const struct object_ops thread_apc_ops =
@@ -643,7 +643,7 @@ index a8fa9a19585..b49b3f159d2 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -141,6 +142,7 @@ static const struct object_ops context_ops =
@@ -138,6 +139,7 @@ static const struct object_ops context_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
context_signaled, /* signaled */
@@ -651,7 +651,7 @@ index a8fa9a19585..b49b3f159d2 100644
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -190,6 +192,7 @@ static const struct object_ops thread_ops =
@@ -187,6 +189,7 @@ static const struct object_ops thread_ops =
add_queue, /* add_queue */
remove_queue, /* remove_queue */
thread_signaled, /* signaled */
@@ -672,10 +672,10 @@ index 96dc9d00ca1..f59902d5607 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/token.c b/server/token.c
index dcb2a879ba6..76a6bc279a5 100644
index 4df8d2e0c6e..8b4d2f0c1b1 100644
--- a/server/token.c
+++ b/server/token.c
@@ -150,6 +150,7 @@ static const struct object_ops token_ops =
@@ -143,6 +143,7 @@ static const struct object_ops token_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -684,10 +684,10 @@ index dcb2a879ba6..76a6bc279a5 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/window.c b/server/window.c
index 24059aac0fe..a79fda5ad80 100644
index 242e93f303a..3aa7ad4ad79 100644
--- a/server/window.c
+++ b/server/window.c
@@ -108,6 +108,7 @@ static const struct object_ops window_ops =
@@ -107,6 +107,7 @@ static const struct object_ops window_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -696,10 +696,10 @@ index 24059aac0fe..a79fda5ad80 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
diff --git a/server/winstation.c b/server/winstation.c
index 1408e1a9e65..a99c60a28ff 100644
index 5903497d61e..7692fbe3ed2 100644
--- a/server/winstation.c
+++ b/server/winstation.c
@@ -75,6 +75,7 @@ static const struct object_ops winstation_ops =
@@ -76,6 +76,7 @@ static const struct object_ops winstation_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -707,7 +707,7 @@ index 1408e1a9e65..a99c60a28ff 100644
NULL, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
@@ -115,6 +116,7 @@ static const struct object_ops desktop_ops =
@@ -116,6 +117,7 @@ static const struct object_ops desktop_ops =
no_add_queue, /* add_queue */
NULL, /* remove_queue */
NULL, /* signaled */
@@ -716,5 +716,5 @@ index 1408e1a9e65..a99c60a28ff 100644
no_signal, /* signal */
no_get_fd, /* get_fd */
--
2.34.1
2.42.0

View File

@@ -107,17 +107,17 @@ index 7e122780602..2ce175e1749 100644
+
+ /* Establish permissions for symlink creation */
+ bret = OpenProcessToken( GetCurrentProcess(), TOKEN_ALL_ACCESS, &token );
+ ok(bret, "OpenProcessToken failed: %u\n", GetLastError());
+ ok(bret, "OpenProcessToken failed: %ld\n", GetLastError());
+ bret = LookupPrivilegeValueA( NULL, "SeCreateSymbolicLinkPrivilege", &luid );
+ todo_wine ok(bret || broken(!bret && GetLastError() == ERROR_NO_SUCH_PRIVILEGE) /* winxp */,
+ "LookupPrivilegeValue failed: %u\n", GetLastError());
+ "LookupPrivilegeValue failed: %lu\n", GetLastError());
+ if (bret)
+ {
+ tp.PrivilegeCount = 1;
+ tp.Privileges[0].Luid = luid;
+ tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+ bret = AdjustTokenPrivileges( token, FALSE, &tp, 0, NULL, NULL );
+ ok(bret, "AdjustTokenPrivileges failed: %u\n", GetLastError());
+ ok(bret, "AdjustTokenPrivileges failed: %ld\n", GetLastError());
+ }
+ if ((!bret && GetLastError() != ERROR_NO_SUCH_PRIVILEGE) || GetLastError() == ERROR_NOT_ALL_ASSIGNED)
+ {
@@ -134,15 +134,15 @@ index 7e122780602..2ce175e1749 100644
+
+ /* Create a directory symbolic link */
+ bret = CreateSymbolicLinkW( linkW, target_dirW, SYMBOLIC_LINK_FLAG_DIRECTORY );
+ ok(bret, "Failed to create directory symbolic link! (0x%x)\n", GetLastError());
+ ok(bret, "Failed to create directory symbolic link! (0x%lx)\n", GetLastError());
+ bret = RemoveDirectoryW( linkW );
+ ok(bret, "Failed to remove directory symbolic link! (0x%x)\n", GetLastError());
+ ok(bret, "Failed to remove directory symbolic link! (0x%lx)\n", GetLastError());
+
+ /* Create a file symbolic link */
+ bret = CreateSymbolicLinkW( linkW, target_fileW, 0x0 );
+ ok(bret, "Failed to create file symbolic link! (0x%x)\n", GetLastError());
+ ok(bret, "Failed to create file symbolic link! (0x%lx)\n", GetLastError());
+ bret = DeleteFileW( linkW );
+ ok(bret, "Failed to remove file symbolic link! (0x%x)\n", GetLastError());
+ ok(bret, "Failed to remove file symbolic link! (0x%lx)\n", GetLastError());
+
+cleanup:
+ DeleteFileW( target_fileW );

View File

@@ -1,4 +1,4 @@
From a9cd52667f49a57900a08591cd66b40747a12db0 Mon Sep 17 00:00:00 2001
From 1e6c40cf8a92d7873f1689d64936cd4dfd32f246 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 21 Apr 2016 14:40:58 +0800
Subject: [PATCH] oleaut32: OleLoadPicture should create a DIB section for a
@@ -12,7 +12,7 @@ NULL, otherwise it crashes).
2 files changed, 27 insertions(+), 40 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 45baa74a439..22a34d6e380 100644
index 8df0c22b6cf..b41668a4aeb 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -983,23 +983,16 @@ static HRESULT OLEPictureImpl_LoadDIB(OLEPictureImpl *This, BYTE *xbuf, ULONG xr
@@ -62,9 +62,9 @@ index 45baa74a439..22a34d6e380 100644
stride = 4 * width;
buffersize = stride * height;
- bits = HeapAlloc(GetProcessHeap(), 0, buffersize);
- bits = malloc(buffersize);
- if (!bits)
+ mask = HeapAlloc(GetProcessHeap(), 0, buffersize);
+ mask = malloc(buffersize);
+ if (!mask)
{
hr = E_OUTOFMEMORY;
@@ -143,13 +143,13 @@ index 45baa74a439..22a34d6e380 100644
- ReleaseDC(0, hdcref);
-
end:
- HeapFree(GetProcessHeap(), 0, bits);
+ HeapFree(GetProcessHeap(), 0, mask);
- free(bits);
+ free(mask);
IWICBitmapSource_Release(real_source);
return hr;
}
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 7b45b690935..fa7e8009cbd 100644
index 02d53404e32..98d081b745e 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -239,7 +239,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)

View File

@@ -1,275 +0,0 @@
From 3d93f5c74201ecde76a8bc7d53a3b80ae51344bb Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Wed, 5 Aug 2020 09:09:45 +0200
Subject: [PATCH] systeminfo: add basic functionality
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
---
programs/systeminfo/Makefile.in | 1 +
programs/systeminfo/main.c | 226 +++++++++++++++++++++++++++++++-
2 files changed, 223 insertions(+), 4 deletions(-)
diff --git a/programs/systeminfo/Makefile.in b/programs/systeminfo/Makefile.in
index 6ddd309b2ef..a3c65f0a6c6 100644
--- a/programs/systeminfo/Makefile.in
+++ b/programs/systeminfo/Makefile.in
@@ -1,4 +1,5 @@
MODULE = systeminfo.exe
+IMPORTS = ole32 oleaut32
EXTRADLLFLAGS = -mconsole -municode
diff --git a/programs/systeminfo/main.c b/programs/systeminfo/main.c
index b633134a393..d5ff7f4def4 100644
--- a/programs/systeminfo/main.c
+++ b/programs/systeminfo/main.c
@@ -1,5 +1,7 @@
/*
* Copyright 2014 Austin English
+ * Copyright 2012 Hans Leidekker for CodeWeavers
+ * Copyright 2020 Louis Lenders
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -16,18 +18,234 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define COBJMACROS
+
+#include <stdio.h>
+#include "windows.h"
+#include "ocidl.h"
+#include "initguid.h"
+#include "objidl.h"
+#include "wbemcli.h"
+
#include "wine/debug.h"
+#include "wine/heap.h"
+
+#define new_line (i == (ARRAY_SIZE(pq) - 1) || wcslen( pq[i+1].row_name ) )
WINE_DEFAULT_DEBUG_CHANNEL(systeminfo);
+typedef struct {
+ const WCHAR *row_name;
+ const WCHAR *prepend;
+ const WCHAR *class;
+ const WCHAR *prop;
+ const WCHAR *append;
+} print_query_prop;
+
+static const print_query_prop pq[] = {
+ /*row_name prepend prop append prop */
+ /*(if any) with string (if any) with string (if any) */
+ { L"OS Name", L"", L"Win32_OperatingSystem", L"Caption", L"" },
+ { L"OS Version", L"", L"Win32_OperatingSystem", L"Version", L"" },
+ { L"", L"", L"Win32_OperatingSystem", L"CSDVersion", L"" },
+ { L"", L"Build ", L"Win32_OperatingSystem", L"BuildNumber", L"" },
+ { L"Total Physical Memory", L"", L"Win32_ComputerSystem", L"TotalPhysicalMemory", L"" },
+ { L"BIOS Version", L"", L"Win32_BIOS", L"Manufacturer", L"" },
+ { L"", L", ", L"Win32_BIOS", L"ReleaseDate", L"" },
+ { L"Processor(s)", L"", L"Win32_Processor", L"Caption", L"" },
+ { L"", L"", L"Win32_Processor", L"Manufacturer", L"" },
+ { L"", L"~", L"Win32_Processor", L"MaxClockSpeed", L"Mhz"}
+};
+
+static int sysinfo_vprintfW(const WCHAR *msg, va_list va_args)
+{
+ int wlen;
+ DWORD count, ret;
+ WCHAR msg_buffer[8192];
+
+ wlen = vswprintf(msg_buffer, ARRAY_SIZE(msg_buffer), msg, va_args);
+
+ ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL);
+ if (!ret)
+ {
+ DWORD len;
+ char *msgA;
+
+ /* On Windows WriteConsoleW() fails if the output is redirected. So fall
+ * back to WriteFile(), assuming the console encoding is still the right
+ * one in that case.
+ */
+ len = WideCharToMultiByte(GetConsoleOutputCP(), 0, msg_buffer, wlen,
+ NULL, 0, NULL, NULL);
+ msgA = heap_alloc(len);
+ if (!msgA)
+ return 0;
+
+ WideCharToMultiByte(GetConsoleOutputCP(), 0, msg_buffer, wlen, msgA, len,
+ NULL, NULL);
+ WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
+ heap_free(msgA);
+ }
+
+ return count;
+}
+
+static int WINAPIV sysinfo_printfW(const WCHAR *msg, ...)
+{
+ va_list va_args;
+ int len;
+
+ va_start(va_args, msg);
+ len = sysinfo_vprintfW(msg, va_args);
+ va_end(va_args);
+
+ return len;
+}
+
+static WCHAR *find_prop( IWbemClassObject *class, const WCHAR *prop )
+{
+ SAFEARRAY *sa;
+ WCHAR *ret = NULL;
+ LONG i, last_index = 0;
+ BSTR str;
+
+ if (IWbemClassObject_GetNames( class, NULL, WBEM_FLAG_ALWAYS, NULL, &sa ) != S_OK) return NULL;
+
+ SafeArrayGetUBound( sa, 1, &last_index );
+ for (i = 0; i <= last_index; i++)
+ {
+ SafeArrayGetElement( sa, &i, &str );
+ if (!wcsicmp( str, prop ))
+ {
+ ret = _wcsdup( str );
+ break;
+ }
+ }
+ SafeArrayDestroy( sa );
+ return ret;
+}
+
+static int query_prop( const WCHAR *class, const WCHAR *propname )
+{
+ static const WCHAR select_allW[] = {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',0};
+ static const WCHAR cimv2W[] = {'R','O','O','T','\\','C','I','M','V','2',0};
+ static const WCHAR wqlW[] = {'W','Q','L',0};
+ HRESULT hr;
+ IWbemLocator *locator = NULL;
+ IWbemServices *services = NULL;
+ IEnumWbemClassObject *result = NULL;
+ LONG flags = WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY;
+ BSTR path = NULL, wql = NULL, query = NULL;
+ WCHAR *prop = NULL;
+ int len, ret = -1;
+ IWbemClassObject *obj;
+ ULONG count = 0;
+ VARIANT v;
+
+ WINE_TRACE("%s, %s\n", debugstr_w(class), debugstr_w(propname));
+
+ CoInitialize( NULL );
+ CoInitializeSecurity( NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT,
+ RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL );
+
+ hr = CoCreateInstance( &CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_IWbemLocator,
+ (void **)&locator );
+ if (hr != S_OK) goto done;
+
+ if (!(path = SysAllocString( cimv2W ))) goto done;
+ hr = IWbemLocator_ConnectServer( locator, path, NULL, NULL, NULL, 0, NULL, NULL, &services );
+ if (hr != S_OK) goto done;
+
+ len = lstrlenW( class ) + ARRAY_SIZE(select_allW);
+ if (!(query = SysAllocStringLen( NULL, len ))) goto done;
+ lstrcpyW( query, select_allW );
+ lstrcatW( query, class );
+
+ if (!(wql = SysAllocString( wqlW ))) goto done;
+ hr = IWbemServices_ExecQuery( services, wql, query, flags, NULL, &result );
+ if (hr != S_OK) goto done;
+
+ for (;;)
+ {
+ IEnumWbemClassObject_Next( result, WBEM_INFINITE, 1, &obj, &count );
+ if (!count) break;
+
+ if (!prop && !(prop = find_prop( obj, propname )))
+ {
+ ERR("Error: Invalid query\n");
+ goto done;
+ }
+
+ if (IWbemClassObject_Get( obj, prop, 0, &v, NULL, NULL ) == WBEM_S_NO_ERROR)
+ {
+ VariantChangeType( &v, &v, 0, VT_BSTR );
+ sysinfo_printfW( V_BSTR( &v ) );
+ VariantClear( &v );
+ }
+ IWbemClassObject_Release( obj );
+ }
+ ret = 0;
+
+done:
+ if (result) IEnumWbemClassObject_Release( result );
+ if (services) IWbemServices_Release( services );
+ if (locator) IWbemLocator_Release( locator );
+ SysFreeString( path );
+ SysFreeString( query );
+ SysFreeString( wql );
+ HeapFree( GetProcessHeap(), 0, prop );
+ CoUninitialize();
+ return ret;
+}
+
int __cdecl wmain(int argc, WCHAR *argv[])
{
int i;
+ BOOL csv = FALSE;
- WINE_FIXME("stub:");
- for (i = 0; i < argc; i++)
- WINE_FIXME(" %s", wine_dbgstr_w(argv[i]));
- WINE_FIXME("\n");
+ for (i = 1; i < argc; i++)
+ {
+ if ( !wcsicmp( argv[i], L"/fo" ) && !wcsicmp( argv[i+1], L"csv" ) )
+ csv = TRUE;
+ else
+ WINE_FIXME( "command line switch %s not supported\n", debugstr_w(argv[i]) );
+ }
+ if( !csv )
+ {
+ for ( i = 0; i < ARRAYSIZE(pq); i++ )
+ {
+ if( wcslen(pq[i].row_name) )
+ sysinfo_printfW( L"%-*s", 44, pq[i].row_name );
+ if ( wcslen(pq[i].prepend) )
+ sysinfo_printfW( L"%s", pq[i].prepend );
+ query_prop( pq[i].class, pq[i].prop );
+ if ( wcslen(pq[i].append) )
+ sysinfo_printfW( L"%s", pq[i].append );
+ sysinfo_printfW( new_line ? L"\r\n" : L" " );
+ }
+ }
+ else /* only option "systeminfo /fo csv" supported for now */
+ {
+ for (i = 0; i < ARRAYSIZE(pq); i++)
+ {
+ if( wcslen(pq[i].row_name) )
+ sysinfo_printfW( i ? L",\"%s\"" : L"\"%s\"", pq[i].row_name );
+ }
+ sysinfo_printfW( L"\r\n" );
+
+ for (i = 0; i < ARRAYSIZE(pq); i++)
+ {
+ if ( wcslen(pq[i].row_name) )
+ sysinfo_printfW( i ? L",\"" : L"\"" );
+ if ( wcslen(pq[i].prepend) )
+ sysinfo_printfW( L"%s",pq[i].prepend );
+ query_prop( pq[i].class, pq[i].prop );
+ if ( wcslen(pq[i].append) )
+ sysinfo_printfW( L"%s", pq[i].append );
+ sysinfo_printfW( new_line ? L"\"" : L" " );
+ }
+ sysinfo_printfW( L"\r\n" );
+ }
return 0;
}
--
2.33.0

View File

@@ -1 +0,0 @@
Fixes: [42027] systeminfo: Add basic functionality.

View File

@@ -54,7 +54,7 @@ index 6cc7ccd6d73..79594301c35 100644
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ ULONG ref = InterlockedIncrement(&audio->ref);
+
+ TRACE("(%p): ref=%u.\n", audio, ref);
+ TRACE("(%p): ref=%lu.\n", audio, ref);
+
+ return ref;
+}
@@ -64,7 +64,7 @@ index 6cc7ccd6d73..79594301c35 100644
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ ULONG ref = InterlockedDecrement(&audio->ref);
+
+ TRACE("(%p): ref=%u.\n", audio, ref);
+ TRACE("(%p): ref=%lu.\n", audio, ref);
+
+ if (!ref)
+ {
@@ -78,7 +78,7 @@ index 6cc7ccd6d73..79594301c35 100644
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+
+ FIXME("%p, %p, %d %p\n", audio, pv, cb, pcbRead);
+ FIXME("%p, %p, %ld %p\n", audio, pv, cb, pcbRead);
+
+ return E_NOTIMPL;
+}
@@ -87,7 +87,7 @@ index 6cc7ccd6d73..79594301c35 100644
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+
+ FIXME("%p, %p, %d %p\n", audio, pv, cb, pcbWritten);
+ FIXME("%p, %p, %ld %p\n", audio, pv, cb, pcbWritten);
+
+ return E_NOTIMPL;
+}
@@ -95,7 +95,7 @@ index 6cc7ccd6d73..79594301c35 100644
+static HRESULT WINAPI spaudio_Seek(ISpAudio *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("%p, %s, %d, %p\n", audio, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ FIXME("%p, %s, %ld, %p\n", audio, wine_dbgstr_longlong(dlibMove.QuadPart), dwOrigin, plibNewPosition);
+ return E_NOTIMPL;
+}
+
@@ -106,7 +106,7 @@ index 6cc7ccd6d73..79594301c35 100644
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI spaudio_CopyTo(ISpAudio *iface,IStream *pstm, ULARGE_INTEGER cb,
+static HRESULT WINAPI spaudio_CopyTo(ISpAudio *iface, IStream *pstm, ULARGE_INTEGER cb,
+ ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
@@ -114,10 +114,10 @@ index 6cc7ccd6d73..79594301c35 100644
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI spaudio_Commit(ISpAudio *iface,DWORD grfCommitFlags)
+static HRESULT WINAPI spaudio_Commit(ISpAudio *iface, DWORD grfCommitFlags)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("(%p, %#x)\n", audio, grfCommitFlags);
+ FIXME("(%p, %#lx)\n", audio, grfCommitFlags);
+ return E_NOTIMPL;
+}
+
@@ -131,7 +131,7 @@ index 6cc7ccd6d73..79594301c35 100644
+static HRESULT WINAPI spaudio_LockRegion(ISpAudio *iface, ULARGE_INTEGER offset, ULARGE_INTEGER cb, DWORD dwLockType)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("(%p, %s, %s, %d)\n", audio, wine_dbgstr_longlong(offset.QuadPart),
+ FIXME("(%p, %s, %s, %ld)\n", audio, wine_dbgstr_longlong(offset.QuadPart),
+ wine_dbgstr_longlong(cb.QuadPart), dwLockType);
+ return E_NOTIMPL;
+}
@@ -139,7 +139,7 @@ index 6cc7ccd6d73..79594301c35 100644
+static HRESULT WINAPI spaudio_UnlockRegion(ISpAudio *iface,ULARGE_INTEGER offset, ULARGE_INTEGER cb, DWORD dwLockType)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("(%p, %s, %s, %d)\n", audio, wine_dbgstr_longlong(offset.QuadPart),
+ FIXME("(%p, %s, %s, %ld)\n", audio, wine_dbgstr_longlong(offset.QuadPart),
+ wine_dbgstr_longlong(cb.QuadPart), dwLockType);
+ return E_NOTIMPL;
+}
@@ -147,7 +147,7 @@ index 6cc7ccd6d73..79594301c35 100644
+static HRESULT WINAPI spaudio_Stat(ISpAudio *iface, STATSTG *stg, DWORD flag)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("%p, %p, %d\n", audio, stg, flag);
+ FIXME("%p, %p, %lx\n", audio, stg, flag);
+ return E_NOTIMPL;
+}
+
@@ -224,7 +224,7 @@ index 6cc7ccd6d73..79594301c35 100644
+static HRESULT WINAPI spaudio_SetVolumeLevel(ISpAudio *iface, ULONG level)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("%p, %d\n", audio, level);
+ FIXME("%p, %lu\n", audio, level);
+ return E_NOTIMPL;
+}
+
@@ -238,7 +238,7 @@ index 6cc7ccd6d73..79594301c35 100644
+static HRESULT WINAPI spaudio_SetBufferNotifySize(ISpAudio *iface, ULONG size)
+{
+ struct speech_audio *audio = impl_from_ISpAudio(iface);
+ FIXME("%p, %d\n", audio, size);
+ FIXME("%p, %lu\n", audio, size);
+ return E_NOTIMPL;
+}
+

View File

@@ -1,4 +1,4 @@
From 8207b28257d14ec36812ce1a846a7ac62f453b0e Mon Sep 17 00:00:00 2001
From 64bdd8316ca10dd8bd474abb1fe7377dfd678762 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 Mar 2015 01:05:48 +0100
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
@@ -10,60 +10,63 @@ Changes in v2:
Changes in v3:
* Fix remaining todo_wine.
---
dlls/user32/tests/msg.c | 29 ++++++++++++++++--------
dlls/user32/tests/msg.c | 32 ++++++++++++++++++--------
server/queue.c | 50 ++++++++++++++++++++++++++++++++++-------
2 files changed, 62 insertions(+), 17 deletions(-)
2 files changed, 65 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 03ab672f910..0943ee8e99b 100644
index 8b89d92cbf1..e7f133899ed 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -13808,13 +13808,10 @@ static void test_PeekMessage3(void)
@@ -14012,13 +14012,10 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_NOREMOVE);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_NOREMOVE);
- todo_wine
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
- todo_wine
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
- todo_wine
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -13824,10 +13821,8 @@ static void test_PeekMessage3(void)
@@ -14028,10 +14025,8 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE);
- todo_wine
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, PM_REMOVE);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE);
- todo_wine
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -13839,10 +13834,8 @@ static void test_PeekMessage3(void)
@@ -14043,10 +14038,11 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = GetMessageA(&msg, NULL, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
- todo_wine
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
- todo_wine
+ ret = GetMessageA(&msg, NULL, 0, 0);
+ ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
+ ret = GetMessageA(&msg, NULL, 0, 0);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -13870,14 +13863,32 @@ static void test_PeekMessage3(void)
ret = GetMessageA(&msg, NULL, 0, 0);
@@ -14074,14 +14070,32 @@ static void test_PeekMessage3(void)
ret = GetMessageA(&msg, hwnd, 0, 0);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
- todo_wine
ok(ret && msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
ret = GetMessageA(&msg, NULL, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
- todo_wine
ok(ret && msg.message == WM_USER + 1, "msg.message = %u instead of WM_USER + 1\n", msg.message);
ret = PeekMessageA(&msg, NULL, 0, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
+ /* Newer messages are still returned when specifying a message range. */
@@ -90,7 +93,7 @@ index 03ab672f910..0943ee8e99b 100644
* because both messages are in the same queue. */
diff --git a/server/queue.c b/server/queue.c
index 1e2647aac27..b3390f17ba5 100644
index fcc946ff0cb..348fdac3214 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -142,6 +142,7 @@ struct msg_queue
@@ -109,7 +112,7 @@ index 1e2647aac27..b3390f17ba5 100644
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -592,13 +594,21 @@ static inline struct msg_queue *get_current_queue(void)
@@ -634,13 +636,21 @@ static inline struct msg_queue *get_current_queue(void)
}
/* get a (pseudo-)unique id to tag hardware messages */
@@ -132,7 +135,7 @@ index 1e2647aac27..b3390f17ba5 100644
/* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */
static int merge_mousemove( struct thread_input *input, const struct message *msg )
{
@@ -908,7 +918,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
@@ -951,7 +961,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
}
/* retrieve a posted message */
@@ -141,7 +144,7 @@ index 1e2647aac27..b3390f17ba5 100644
unsigned int first, unsigned int last, unsigned int flags,
struct get_message_reply *reply )
{
@@ -919,6 +929,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
@@ -962,6 +972,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
{
if (!match_window( win, msg->win )) continue;
if (!check_msg_filter( msg->msg, first, last )) continue;
@@ -149,7 +152,7 @@ index 1e2647aac27..b3390f17ba5 100644
goto found; /* found one */
}
return 0;
@@ -1536,6 +1547,7 @@ found:
@@ -1576,6 +1587,7 @@ found:
msg->msg = WM_HOTKEY;
msg->wparam = hotkey->id;
msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers;
@@ -157,7 +160,7 @@ index 1e2647aac27..b3390f17ba5 100644
free( msg->data );
msg->data = NULL;
@@ -2226,7 +2238,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
@@ -2267,7 +2279,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user
}
/* now we can return it */
@@ -166,7 +169,7 @@ index 1e2647aac27..b3390f17ba5 100644
reply->type = MSG_HARDWARE;
reply->win = win;
reply->msg = msg_code;
@@ -2364,6 +2376,7 @@ void send_notify_message( user_handle_t win, unsigned int message, lparam_t wpar
@@ -2373,6 +2385,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa
msg->result = NULL;
msg->data = NULL;
msg->data_size = 0;
@@ -174,7 +177,7 @@ index 1e2647aac27..b3390f17ba5 100644
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
@@ -2576,6 +2589,7 @@ DECL_HANDLER(send_message)
@@ -2617,6 +2630,7 @@ DECL_HANDLER(send_message)
set_queue_bits( recv_queue, QS_SENDMESSAGE );
break;
case MSG_POSTED:
@@ -182,7 +185,7 @@ index 1e2647aac27..b3390f17ba5 100644
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
if (msg->msg == WM_HOTKEY)
@@ -2694,12 +2708,12 @@ DECL_HANDLER(get_message)
@@ -2735,12 +2749,12 @@ DECL_HANDLER(get_message)
/* then check for posted messages */
if ((filter & QS_POSTMESSAGE) &&
@@ -197,7 +200,7 @@ index 1e2647aac27..b3390f17ba5 100644
return;
/* only check for quit messages if not posted messages pending */
@@ -2710,7 +2724,7 @@ DECL_HANDLER(get_message)
@@ -2751,7 +2765,7 @@ DECL_HANDLER(get_message)
if ((filter & QS_INPUT) &&
filter_contains_hw_range( req->get_first, req->get_last ) &&
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
@@ -206,7 +209,7 @@ index 1e2647aac27..b3390f17ba5 100644
/* now check for WM_PAINT */
if ((filter & QS_PAINT) &&
@@ -2723,7 +2737,7 @@ DECL_HANDLER(get_message)
@@ -2764,7 +2778,7 @@ DECL_HANDLER(get_message)
reply->wparam = 0;
reply->lparam = 0;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
@@ -215,7 +218,7 @@ index 1e2647aac27..b3390f17ba5 100644
}
/* now check for timer */
@@ -2739,13 +2753,30 @@ DECL_HANDLER(get_message)
@@ -2780,13 +2794,30 @@ DECL_HANDLER(get_message)
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
set_event( current->process->idle_event );
@@ -247,7 +250,7 @@ index 1e2647aac27..b3390f17ba5 100644
}
@@ -2763,7 +2794,10 @@ DECL_HANDLER(reply_message)
@@ -2804,7 +2835,10 @@ DECL_HANDLER(reply_message)
DECL_HANDLER(accept_hardware_message)
{
if (current->queue)

View File

@@ -1,4 +1,4 @@
From 70e0b924b2c89bae3f5723c6397fb00df6283586 Mon Sep 17 00:00:00 2001
From 79fbd3342a3e5c7cb2198bf2f0412db1df4b1fce Mon Sep 17 00:00:00 2001
From: Louis Lenders <xerox.xerox2000x@gmail.com>
Date: Thu, 4 Nov 2021 21:01:24 +1100
Subject: [PATCH] shell32: Append .exe when registry lookup fails first time
@@ -8,12 +8,12 @@ Subject: [PATCH] shell32: Append .exe when registry lookup fails first time
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c
index d24b597181f..674e1e3b0c4 100644
index 069b96a51a1..5033330b60c 100644
--- a/dlls/shell32/shlexec.c
+++ b/dlls/shell32/shlexec.c
@@ -457,7 +457,10 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
lstrcpyW(buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
lstrcatW(buffer, szName);
@@ -459,7 +459,10 @@ static BOOL SHELL_TryAppPathW( LPCWSTR szName, LPWSTR lpResult, WCHAR **env)
wcscat(buffer, szName);
res = RegOpenKeyExW(HKEY_LOCAL_MACHINE, buffer, 0, KEY_READ, &hkApp);
- if (res) goto end;
+ if (res)
@@ -24,5 +24,5 @@ index d24b597181f..674e1e3b0c4 100644
len = MAX_PATH*sizeof(WCHAR);
res = RegQueryValueW(hkApp, NULL, lpResult, &len);
--
2.33.0
2.42.0

View File

@@ -1,4 +1,4 @@
From 80a3f0f4b75754f76e6644e43c637ea385889e5c Mon Sep 17 00:00:00 2001
From f05f0efcd0cec49f3ad4faa2cc3bd21c7da75c44 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 7 Apr 2016 16:04:36 +1000
Subject: [PATCH] user32/msgbox: Support WM_COPY Message
@@ -7,12 +7,12 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=17205
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/user32/msgbox.c | 86 ++++++++++++++++-
dlls/user32/tests/dialog.c | 183 +++++++++++++++++++++++++++++++++++++
2 files changed, 264 insertions(+), 5 deletions(-)
dlls/user32/msgbox.c | 86 +++++++++++++++++-
dlls/user32/tests/dialog.c | 182 +++++++++++++++++++++++++++++++++++++
2 files changed, 263 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/msgbox.c b/dlls/user32/msgbox.c
index 3da1c0a3445..b29af2161b6 100644
index 4d345777a10..1136374deb1 100644
--- a/dlls/user32/msgbox.c
+++ b/dlls/user32/msgbox.c
@@ -41,6 +41,11 @@ struct ThreadWindows
@@ -39,7 +39,7 @@ index 3da1c0a3445..b29af2161b6 100644
nclm.cbSize = sizeof(nclm);
SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0);
@@ -316,6 +316,77 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
@@ -320,6 +320,77 @@ static void MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSW lpmb)
HeapFree( GetProcessHeap(), 0, buffer );
}
@@ -117,7 +117,7 @@ index 3da1c0a3445..b29af2161b6 100644
/**************************************************************************
* MSGBOX_DlgProc
@@ -334,6 +405,11 @@ static INT_PTR CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message,
@@ -338,6 +409,11 @@ static INT_PTR CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message,
SetPropA(hwnd, "WINE_MSGBOX_HELPCALLBACK", mbp->lpfnMsgBoxCallback);
break;
}
@@ -130,18 +130,10 @@ index 3da1c0a3445..b29af2161b6 100644
case WM_COMMAND:
switch (LOWORD(wParam))
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c
index 46a12443a93..4fd5d211bea 100644
index 7ea0d13c0f3..448b69ca2a3 100644
--- a/dlls/user32/tests/dialog.c
+++ b/dlls/user32/tests/dialog.c
@@ -38,6 +38,7 @@
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
+#include "winnls.h"
#define MAXHWNDS 1024
static HWND hwnd [MAXHWNDS];
@@ -1990,6 +1991,187 @@ static void test_MessageBoxFontTest(void)
@@ -2068,6 +2068,187 @@ static void test_MessageBoxFontTest(void)
DestroyWindow(hDlg);
}
@@ -329,12 +321,12 @@ index 46a12443a93..4fd5d211bea 100644
static void test_SaveRestoreFocus(void)
{
HWND hDlg;
@@ -2383,4 +2565,5 @@ START_TEST(dialog)
@@ -2455,4 +2636,5 @@ START_TEST(dialog)
test_timer_message();
test_MessageBox();
test_capture_release();
+ test_MessageBox_WM_COPY_Test();
}
--
2.29.2
2.40.1

View File

@@ -113,7 +113,7 @@ index cca211cc22a..2a819797491 100644
+ cls.lpfnWndProc = recursive_activation_wndprocA;
+ cls.lpszClassName = "RecursiveActivationClass";
+ if(!RegisterClassA(&cls)) return FALSE;
+ register_class(&cls);
+
cls.lpfnWndProc = PopupMsgCheckProcA;
cls.lpszClassName = "TestPopupClass";

Some files were not shown because too many files have changed in this diff Show More