winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
851 discussions
Start a n
N
ew thread
Francois Gouget : dssenh/tests: Fix the spelling of a skip() message.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: ce03715db3bcabeb597e2a9a92cccb921d0a91f9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce03715db3bcabeb597e2a9a…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Nov 25 19:43:13 2020 +0100 dssenh/tests: Fix the spelling of a skip() message. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/tests/dssenh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index e9c62cb99de..4d33fc86cd8 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -702,7 +702,7 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen) result = CryptDeriveKey(hProv, CALG_RC2, hHash, 40 << 16, &pKey); if (!result) { - skip("skipping ciper modes tests\n"); + skip("skipping cipher mode tests\n"); return; } ok(result, "Expected a derived key.\n");
1
0
0
0
Francois Gouget : user32/tests: Fix the spelling of a win_skip() message.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 9468e7617c91c86e352ec2b16abfa04b94ca2e8f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9468e7617c91c86e352ec2b1…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Nov 25 19:43:08 2020 +0100 user32/tests: Fix the spelling of a win_skip() message. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index ce272ed73f4..1249f8cf5a1 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -1771,7 +1771,7 @@ static void test_GetMouseMovePointsEx_process(void) if (winstation1 == NULL && GetLastError() == ERROR_ACCESS_DENIED) { - win_skip("not enough priviledges for CreateWindowStation\n"); + win_skip("not enough privileges for CreateWindowStation\n"); CloseDesktop( desk0 ); CloseWindowStation( winstation0 ); return;
1
0
0
0
Francois Gouget : xactengine3_7/tests: Fix the spelling of a couple of comments.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: f2f5e2da6d760206f1a13e97d2302fd95bed36f5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f2f5e2da6d760206f1a13e97…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Nov 25 19:43:03 2020 +0100 xactengine3_7/tests: Fix the spelling of a couple of comments. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xactengine3_7/tests/xact3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c index 9b0d3defb09..6b04c36a9f0 100644 --- a/dlls/xactengine3_7/tests/xact3.c +++ b/dlls/xactengine3_7/tests/xact3.c @@ -51,13 +51,13 @@ struct xact_interfaces {&CLSID_XACTEngine30, &IID_IXACT3Engine31, E_NOINTERFACE}, {&CLSID_XACTEngine30, &IID_IXACT3Engine, E_NOINTERFACE }, - /* Version 3.1 to 3.4 use the same inteface */ + /* Version 3.1 to 3.4 use the same interface */ {&CLSID_XACTEngine31, &IID_IXACT3Engine31, S_OK }, {&CLSID_XACTEngine32, &IID_IXACT3Engine31, S_OK }, {&CLSID_XACTEngine33, &IID_IXACT3Engine31, S_OK }, {&CLSID_XACTEngine34, &IID_IXACT3Engine31, S_OK }, - /* Version 3.5 to 3.7 use the same inteface */ + /* Version 3.5 to 3.7 use the same interface */ {&CLSID_XACTEngine35, &IID_IXACT3Engine31, E_NOINTERFACE }, {&CLSID_XACTEngine35, &IID_IXACT3Engine, S_OK },
1
0
0
0
Alexandre Julliard : include: Only define _strnicmp() prototype when needed.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 70102669a8e3cd0311f87e4cbf4f87d45cda37a9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=70102669a8e3cd0311f87e4c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 25 21:40:30 2020 +0100 include: Only define _strnicmp() prototype when needed. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/winternl.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/winternl.h b/include/winternl.h index a5c4837837f..a7b0e04aade 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -3674,7 +3674,9 @@ NTSYSAPI ULONG64 WINAPI RtlGetExtendedFeaturesMask(CONTEXT_EX*); NTSYSAPI void WINAPI RtlSetExtendedFeaturesMask(CONTEXT_EX*,ULONG64); #endif +#ifndef __WINE_USE_MSVCRT NTSYSAPI int __cdecl _strnicmp(LPCSTR,LPCSTR,size_t); +#endif /* 32-bit only functions */
1
0
0
0
Alexandre Julliard : ntdll: Make x86_64 syscall thunks position independent.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 043489456c1f633f86f8dd1fde6b32c48c90c6f4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=043489456c1f633f86f8dd1f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Nov 25 20:19:43 2020 +0100 ntdll: Make x86_64 syscall thunks position independent. Based on a patch by Paul Gofman. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/virtual.c | 111 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/unix/virtual.c | 6 +++ tools/winebuild/import.c | 4 +- 3 files changed, 119 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/virtual.c b/dlls/ntdll/tests/virtual.c index 9c2cf824018..546a7d83bbd 100644 --- a/dlls/ntdll/tests/virtual.c +++ b/dlls/ntdll/tests/virtual.c @@ -643,6 +643,116 @@ static void test_user_shared_data(void) } } +static void perform_relocations( void *module, INT_PTR delta ) +{ + IMAGE_NT_HEADERS *nt; + IMAGE_BASE_RELOCATION *rel, *end; + const IMAGE_DATA_DIRECTORY *relocs; + const IMAGE_SECTION_HEADER *sec; + ULONG protect_old[96], i; + + nt = RtlImageNtHeader( module ); + relocs = &nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC]; + if (!relocs->VirtualAddress || !relocs->Size) return; + sec = (const IMAGE_SECTION_HEADER *)((const char *)&nt->OptionalHeader + + nt->FileHeader.SizeOfOptionalHeader); + for (i = 0; i < nt->FileHeader.NumberOfSections; i++) + { + void *addr = (char *)module + sec[i].VirtualAddress; + SIZE_T size = sec[i].SizeOfRawData; + NtProtectVirtualMemory( NtCurrentProcess(), &addr, + &size, PAGE_READWRITE, &protect_old[i] ); + } + rel = (IMAGE_BASE_RELOCATION *)((char *)module + relocs->VirtualAddress); + end = (IMAGE_BASE_RELOCATION *)((char *)rel + relocs->Size); + while (rel && rel < end - 1 && rel->SizeOfBlock) + rel = LdrProcessRelocationBlock( (char *)module + rel->VirtualAddress, + (rel->SizeOfBlock - sizeof(*rel)) / sizeof(USHORT), + (USHORT *)(rel + 1), delta ); + for (i = 0; i < nt->FileHeader.NumberOfSections; i++) + { + void *addr = (char *)module + sec[i].VirtualAddress; + SIZE_T size = sec[i].SizeOfRawData; + NtProtectVirtualMemory( NtCurrentProcess(), &addr, + &size, protect_old[i], &protect_old[i] ); + } +} + + +static void test_syscalls(void) +{ + HMODULE module = GetModuleHandleW( L"ntdll.dll" ); + HANDLE handle; + NTSTATUS status; + NTSTATUS (WINAPI *pNtClose)(HANDLE); + WCHAR path[MAX_PATH]; + HANDLE file, mapping; + INT_PTR delta; + void *ptr; + + /* initial image */ + pNtClose = (void *)GetProcAddress( module, "NtClose" ); + handle = CreateEventW( NULL, FALSE, FALSE, NULL ); + ok( handle != 0, "CreateEventWfailed %u\n", GetLastError() ); + status = pNtClose( handle ); + ok( !status, "NtClose failed %x\n", status ); + status = pNtClose( handle ); + ok( status == STATUS_INVALID_HANDLE, "NtClose failed %x\n", status ); + + /* syscall thunk copy */ + ptr = VirtualAlloc( NULL, 0x1000, MEM_COMMIT, PAGE_EXECUTE_READWRITE ); + ok( ptr != NULL, "VirtualAlloc failed\n" ); + memcpy( ptr, pNtClose, 32 ); + pNtClose = ptr; + handle = CreateEventW( NULL, FALSE, FALSE, NULL ); + ok( handle != 0, "CreateEventWfailed %u\n", GetLastError() ); + status = pNtClose( handle ); + ok( !status, "NtClose failed %x\n", status ); + status = pNtClose( handle ); + ok( status == STATUS_INVALID_HANDLE, "NtClose failed %x\n", status ); + VirtualFree( ptr, 0, MEM_FREE ); + + /* new mapping */ + GetModuleFileNameW( module, path, MAX_PATH ); + file = CreateFileW( path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 ); + ok( file != INVALID_HANDLE_VALUE, "can't open %s: %u\n", wine_dbgstr_w(path), GetLastError() ); + mapping = CreateFileMappingW( file, NULL, SEC_IMAGE | PAGE_READONLY, 0, 0, NULL ); + ok( mapping != NULL, "CreateFileMappingW failed err %u\n", GetLastError() ); + ptr = MapViewOfFile( mapping, FILE_MAP_READ, 0, 0, 0 ); + ok( ptr != NULL, "MapViewOfFile failed err %u\n", GetLastError() ); + CloseHandle( mapping ); + CloseHandle( file ); + delta = (char *)ptr - (char *)module; + + if (memcmp( ptr, module, 0x1000 )) + { + skip( "modules are not identical (non-PE build?)\n" ); + UnmapViewOfFile( ptr ); + return; + } + perform_relocations( ptr, delta ); + pNtClose = (void *)GetProcAddress( module, "NtClose" ); + if (!memcmp( pNtClose, (char *)pNtClose + delta, 32 )) + { + pNtClose = (void *)((char *)pNtClose + delta); + handle = CreateEventW( NULL, FALSE, FALSE, NULL ); + ok( handle != 0, "CreateEventWfailed %u\n", GetLastError() ); + status = pNtClose( handle ); + ok( !status, "NtClose failed %x\n", status ); + status = pNtClose( handle ); + ok( status == STATUS_INVALID_HANDLE, "NtClose failed %x\n", status ); + } + else + { +#ifdef __x86_64__ + ok( 0, "syscall thunk relocated\n" ); +#else + skip( "syscall thunk relocated\n" ); +#endif + } + UnmapViewOfFile( ptr ); +} + START_TEST(virtual) { HMODULE mod; @@ -678,4 +788,5 @@ START_TEST(virtual) test_RtlCreateUserStack(); test_NtMapViewOfSection(); test_user_shared_data(); + test_syscalls(); } diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index 853eb0469b9..eaaf7242883 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2582,6 +2582,12 @@ TEB *virtual_alloc_first_teb(void) exit(1); } +#ifdef __x86_64__ /* sneak in a syscall dispatcher pointer at a fixed address (7ffe1000) */ + ptr = (char *)user_shared_data + page_size; + anon_mmap_fixed( ptr, page_size, PROT_READ | PROT_WRITE, 0 ); + *(void **)ptr = __wine_syscall_dispatcher; +#endif + NtAllocateVirtualMemory( NtCurrentProcess(), &teb_block, 0, &total, MEM_RESERVE | MEM_TOP_DOWN, PAGE_READWRITE ); teb_block_pos = 30; diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index 62d9844e367..53d4fb2869b 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1727,8 +1727,8 @@ void output_syscalls( DLLSPEC *spec ) output( "\t.byte 0xc3\n" ); /* ret */ if (target_platform == PLATFORM_WINDOWS) { - output( "1:\t.byte 0xff,0x14,0x25\n" ); /* 1: callq *(__wine_syscall_dispatcher) */ - output( "\t.long __wine_syscall_dispatcher\n" ); + output( "1:\t.byte 0xff,0x14,0x25\n" ); /* 1: callq *(0x7ffe1000) */ + output( "\t.long 0x7ffe1000\n" ); } else {
1
0
0
0
Gerald Pfeifer : advapi32/tests: Initialize luid in test_CreateRestrictedToken.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 42c03ef03f2b2e3b63eee2aa923773ceb04e5d24 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42c03ef03f2b2e3b63eee2aa…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Tue Nov 24 23:38:49 2020 +0100 advapi32/tests: Initialize luid in test_CreateRestrictedToken. Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c index eaaa29866bb..020e69277e0 100644 --- a/dlls/advapi32/tests/security.c +++ b/dlls/advapi32/tests/security.c @@ -5195,7 +5195,7 @@ static void test_CreateRestrictedToken(void) TOKEN_TYPE type; BOOL is_member; DWORD size; - LUID luid; + LUID luid = { 0, 0 }; BOOL ret; DWORD i;
1
0
0
0
Michael Stefaniuc : mshtml: Use wide-char string literals.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 4618a0a38acfa20e0582831e9d74a8f22fcb18d1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4618a0a38acfa20e0582831e…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 24 23:29:19 2020 +0100 mshtml: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/dispex.c | 7 ++--- dlls/mshtml/editor.c | 53 +++++++++++++------------------------ dlls/mshtml/main.c | 21 +++------------ dlls/mshtml/mutation.c | 4 +-- dlls/mshtml/navigate.c | 28 ++++++-------------- dlls/mshtml/nsembed.c | 62 +++++++++++++------------------------------- dlls/mshtml/nsio.c | 3 +-- dlls/mshtml/oleobj.c | 11 ++------ dlls/mshtml/omnavigator.c | 40 +++++++++------------------- dlls/mshtml/persist.c | 9 +++---- dlls/mshtml/protocol.c | 15 ++++------- dlls/mshtml/range.c | 48 +++++++++++----------------------- dlls/mshtml/script.c | 40 +++++++++------------------- dlls/mshtml/secmgr.c | 6 ++--- dlls/mshtml/selection.c | 9 ++----- dlls/mshtml/svg.c | 10 +++---- dlls/mshtml/task.c | 6 ++--- dlls/mshtml/view.c | 22 +++++----------- dlls/mshtml/xmlhttprequest.c | 19 ++++---------- 19 files changed, 122 insertions(+), 291 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4618a0a38acfa20e0582…
1
0
0
0
Michael Stefaniuc : msacm32: Use wide-char string literals.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: d37c304ef79dd359f0d98f538ccea2e3a965f99a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d37c304ef79dd359f0d98f53…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 24 23:29:18 2020 +0100 msacm32: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msacm32/driver.c | 6 ++---- dlls/msacm32/format.c | 15 +++++---------- dlls/msacm32/internal.c | 36 ++++++++++++++---------------------- 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/dlls/msacm32/driver.c b/dlls/msacm32/driver.c index f0d003f648b..a8d6f3cf6d7 100644 --- a/dlls/msacm32/driver.c +++ b/dlls/msacm32/driver.c @@ -434,12 +434,10 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA if (!pConfigInfo) { ERR("OOM while supplying DRVCONFIGINFO for DRV_CONFIGURE, using NULL\n"); } else { - static const WCHAR drivers32[] = {'D','r','i','v','e','r','s','3','2','\0'}; - pConfigInfo->dwDCISize = iStructSize; - section_name = HeapAlloc(MSACM_hHeap, 0, (lstrlenW(drivers32) + 1) * sizeof(WCHAR)); - if (section_name) lstrcpyW(section_name, drivers32); + section_name = HeapAlloc(MSACM_hHeap, 0, sizeof(L"Drivers32")); + if (section_name) lstrcpyW(section_name, L"Drivers32"); pConfigInfo->lpszDCISectionName = section_name; alias_name = HeapAlloc(MSACM_hHeap, 0, (lstrlenW(pAlias) + 1) * sizeof(WCHAR)); if (alias_name) lstrcpyW(alias_name, pAlias); diff --git a/dlls/msacm32/format.c b/dlls/msacm32/format.c index 284633ccefe..536fa42e767 100644 --- a/dlls/msacm32/format.c +++ b/dlls/msacm32/format.c @@ -93,7 +93,6 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, afd.cbwfx = paftd->cbFormatSize; for (i = 0; i < paftd->cStandardFormats; i++) { - static const WCHAR fmtW[] = {'%','d',' ','K','o','/','s','\0'}; int j, index; afd.dwFormatIndex = i; @@ -105,7 +104,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid, for (j = len; j < ACMFORMATTAGDETAILS_FORMATTAG_CHARS; j++) buffer[j] = ' '; wsprintfW(buffer + ACMFORMATTAGDETAILS_FORMATTAG_CHARS, - fmtW, (afd.pwfx->nAvgBytesPerSec + 512) / 1024); + L"%d Ko/s", (afd.pwfx->nAvgBytesPerSec + 512) / 1024); index = SendDlgItemMessageW(affd->hWnd, IDD_ACMFORMATCHOOSE_CMB_FORMAT, CB_ADDSTRING, 0, (LPARAM)buffer); @@ -213,19 +212,17 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEW afc) return affd.ret; } -static const WCHAR fmt_prop[] = {'a','c','m','p','r','o','p','\0'}; - static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { - PACMFORMATCHOOSEW afc = (PACMFORMATCHOOSEW)GetPropW(hWnd, fmt_prop); + ACMFORMATCHOOSEW *afc = (ACMFORMATCHOOSEW *)GetPropW(hWnd, L"acmprop"); TRACE("hwnd=%p msg=%i 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam); switch (msg) { case WM_INITDIALOG: afc = (PACMFORMATCHOOSEW)lParam; - SetPropW(hWnd, fmt_prop, (HANDLE)afc); + SetPropW(hWnd, L"acmprop", (HANDLE)afc); MSACM_FillFormatTags(hWnd, afc); MSACM_FillFormat(hWnd, afc); if ((afc->fdwStyle & ~(ACMFORMATCHOOSE_STYLEF_CONTEXTHELP| @@ -431,8 +428,6 @@ MMRESULT WINAPI acmFormatDetailsA(HACMDRIVER had, PACMFORMATDETAILSA pafd, MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD fdwDetails) { MMRESULT mmr; - static const WCHAR fmt1[] = {'%','d',' ','H','z',0}; - static const WCHAR fmt2[] = {';',' ','%','d',' ','b','i','t','s',0}; ACMFORMATTAGDETAILSW aftd = {0}; TRACE("(%p, %p, %d)\n", had, pafd, fdwDetails); @@ -497,9 +492,9 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD } if (mmr == MMSYSERR_NOERROR && pafd->szFormat[0] == 0) { - wsprintfW(pafd->szFormat, fmt1, pafd->pwfx->nSamplesPerSec); + wsprintfW(pafd->szFormat, L"%d Hz", pafd->pwfx->nSamplesPerSec); if (pafd->pwfx->wBitsPerSample) { - wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), fmt2, + wsprintfW(pafd->szFormat + lstrlenW(pafd->szFormat), L"; %d bits", pafd->pwfx->wBitsPerSample); } MultiByteToWideChar(CP_ACP, 0, (pafd->pwfx->nChannels == 1) ? "; Mono" : "; Stereo", -1, diff --git a/dlls/msacm32/internal.c b/dlls/msacm32/internal.c index cccf5014fcf..e83f1f5c215 100644 --- a/dlls/msacm32/internal.c +++ b/dlls/msacm32/internal.c @@ -347,10 +347,7 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileNa */ void MSACM_RegisterAllDrivers(void) { - static const WCHAR msacm32[] = {'m','s','a','c','m','3','2','.','d','l','l','\0'}; static const WCHAR msacmW[] = {'M','S','A','C','M','.'}; - static const WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'}; - static const WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'}; DWORD i, cnt, bufLen, lRet, type; WCHAR buf[2048], valname[64], *name, *s; FILETIME lastWrite; @@ -384,7 +381,7 @@ void MSACM_RegisterAllDrivers(void) RegCloseKey( hKey ); } - if (GetPrivateProfileSectionW(drv32, buf, ARRAY_SIZE(buf), sys)) + if (GetPrivateProfileSectionW(L"drivers32", buf, ARRAY_SIZE(buf), L"system.ini")) { for(s = buf; *s; s += lstrlenW(s) + 1) { @@ -396,7 +393,7 @@ void MSACM_RegisterAllDrivers(void) } } MSACM_ReorderDriversByPriority(); - MSACM_RegisterDriver(msacm32, msacm32, 0); + MSACM_RegisterDriver(L"msacm32.dll", L"msacm32.dll", 0); } /*********************************************************************** @@ -590,15 +587,13 @@ static void MSACM_ReorderDriversByPriority(void) */ for (i = 0; i < iNumDrivers; i++) { - static const WCHAR priorityTmpl[] = {'P','r','i','o','r','i','t','y','%','l','d','\0'}; WCHAR szSubKey[17]; unsigned int iTargetPosition; unsigned int iCurrentPosition; WCHAR * pAlias; - static const WCHAR sPrefix[] = {'m','s','a','c','m','.','\0'}; - + /* Build expected entry name */ - swprintf(szSubKey, 17, priorityTmpl, i + 1); + swprintf(szSubKey, 17, L"Priority%ld", i + 1); lBufferLength = sizeof(szBuffer); lError = RegQueryValueExW(hPriorityKey, szSubKey, NULL, NULL, (LPBYTE)szBuffer, (LPDWORD)&lBufferLength); if (lError != ERROR_SUCCESS) continue; @@ -607,7 +602,7 @@ static void MSACM_ReorderDriversByPriority(void) iTargetPosition = i; /* Locate driver alias in driver list */ - pAlias = wcsstr(szBuffer, sPrefix); + pAlias = wcsstr(szBuffer, L"msacm."); if (pAlias == NULL) continue; for (iCurrentPosition = 0; iCurrentPosition < iNumDrivers; iCurrentPosition++) { @@ -653,9 +648,6 @@ void MSACM_WriteCurrentPriorities(void) HKEY hPriorityKey; PWINE_ACMDRIVERID padid; DWORD dwPriorityCounter; - static const WCHAR priorityTmpl[] = {'P','r','i','o','r','i','t','y','%','l','d','\0'}; - static const WCHAR valueTmpl[] = {'%','c',',',' ','%','s','\0'}; - static const WCHAR converterAlias[] = {'I','n','t','e','r','n','a','l',' ','P','C','M',' ','C','o','n','v','e','r','t','e','r','\0'}; WCHAR szSubKey[17]; WCHAR szBuffer[256]; @@ -680,10 +672,10 @@ void MSACM_WriteCurrentPriorities(void) /* Build required value name */ dwPriorityCounter++; - swprintf(szSubKey, 17, priorityTmpl, dwPriorityCounter); - + swprintf(szSubKey, 17, L"Priority%ld", dwPriorityCounter); + /* Value has a 1 in front for enabled drivers and 0 for disabled drivers */ - swprintf(szBuffer, 256, valueTmpl, (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ? '0' : '1', padid->pszDriverAlias); + swprintf(szBuffer, 256, L"%c, %s", (padid->fdwSupport & ACMDRIVERDETAILS_SUPPORTF_DISABLED) ? '0' : '1', padid->pszDriverAlias); wcslwr(szBuffer); lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (lstrlenW(szBuffer) + 1) * sizeof(WCHAR)); @@ -695,15 +687,15 @@ void MSACM_WriteCurrentPriorities(void) /* Build required value name */ dwPriorityCounter++; - swprintf(szSubKey, 17, priorityTmpl, dwPriorityCounter); - + swprintf(szSubKey, 17, L"Priority%ld", dwPriorityCounter); + /* Value has a 1 in front for enabled drivers and 0 for disabled drivers */ - swprintf(szBuffer, 256, valueTmpl, '1', converterAlias); - + swprintf(szBuffer, 256, L"%c, %s", '1', L"Internal PCM Converter"); + lError = RegSetValueExW(hPriorityKey, szSubKey, 0, REG_SZ, (BYTE *)szBuffer, (lstrlenW(szBuffer) + 1) * sizeof(WCHAR)); if (lError != ERROR_SUCCESS) { - ERR("unable to write value for %s under key %s (0x%08x)\n", - debugstr_w(converterAlias), debugstr_w(basePriorityKey), lError); + ERR("unable to write value for Internal PCM Converter under key %s (0x%08x)\n", + debugstr_w(basePriorityKey), lError); } RegCloseKey(hPriorityKey); }
1
0
0
0
Michael Stefaniuc : msacm32: Make the registry key variables global.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 31f6332f48d5826d25317a051ac230d875d0639a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=31f6332f48d5826d25317a05…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 24 23:29:17 2020 +0100 msacm32: Make the registry key variables global. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msacm32/internal.c | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/dlls/msacm32/internal.c b/dlls/msacm32/internal.c index 9c4d1a75f3b..cccf5014fcf 100644 --- a/dlls/msacm32/internal.c +++ b/dlls/msacm32/internal.c @@ -52,17 +52,17 @@ static PWINE_ACMNOTIFYWND MSACM_pLastACMNotifyWnd = NULL; static void MSACM_ReorderDriversByPriority(void); +static const WCHAR drvkey[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32"; +static const WCHAR baseKey[] = L"Software\\Microsoft\\AudioCompressionManager\\DriverCache\\"; +static const WCHAR basePriorityKey[] = + L"Software\\Microsoft\\Multimedia\\Audio Compression Manager\\Priority v4.00"; + /*********************************************************************** * MSACM_RegisterDriverFromRegistry() */ PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry) { static const WCHAR msacmW[] = {'M','S','A','C','M','.'}; - static const WCHAR drvkey[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s',' ','N','T','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'D','r','i','v','e','r','s','3','2','\0'}; WCHAR buf[2048]; DWORD bufLen, lRet; HKEY hKey; @@ -181,9 +181,6 @@ errCleanUp: */ static LPWSTR MSACM_GetRegistryKey(const WINE_ACMDRIVERID* padid) { - static const WCHAR baseKey[] = {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\', - 'A','u','d','i','o','C','o','m','p','r','e','s','s','i','o','n','M','a','n','a','g','e','r','\\', - 'D','r','i','v','e','r','C','a','c','h','e','\\','\0'}; LPWSTR ret; int len; @@ -354,11 +351,6 @@ void MSACM_RegisterAllDrivers(void) static const WCHAR msacmW[] = {'M','S','A','C','M','.'}; static const WCHAR drv32[] = {'d','r','i','v','e','r','s','3','2','\0'}; static const WCHAR sys[] = {'s','y','s','t','e','m','.','i','n','i','\0'}; - static const WCHAR drvkey[] = {'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'W','i','n','d','o','w','s',' ','N','T','\\', - 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', - 'D','r','i','v','e','r','s','3','2','\0'}; DWORD i, cnt, bufLen, lRet, type; WCHAR buf[2048], valname[64], *name, *s; FILETIME lastWrite; @@ -565,13 +557,6 @@ static void MSACM_ReorderDriversByPriority(void) if (iNumDrivers > 1) { LONG lError; - static const WCHAR basePriorityKey[] = { - 'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'M','u','l','t','i','m','e','d','i','a','\\', - 'A','u','d','i','o',' ','C','o','m','p','r','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\', - 'P','r','i','o','r','i','t','y',' ','v','4','.','0','0','\0' - }; unsigned int i; LONG lBufferLength; WCHAR szBuffer[256]; @@ -666,13 +651,6 @@ void MSACM_WriteCurrentPriorities(void) { LONG lError; HKEY hPriorityKey; - static const WCHAR basePriorityKey[] = { - 'S','o','f','t','w','a','r','e','\\', - 'M','i','c','r','o','s','o','f','t','\\', - 'M','u','l','t','i','m','e','d','i','a','\\', - 'A','u','d','i','o',' ','C','o','m','p','r','e','s','s','i','o','n',' ','M','a','n','a','g','e','r','\\', - 'P','r','i','o','r','i','t','y',' ','v','4','.','0','0','\0' - }; PWINE_ACMDRIVERID padid; DWORD dwPriorityCounter; static const WCHAR priorityTmpl[] = {'P','r','i','o','r','i','t','y','%','l','d','\0'};
1
0
0
0
Michael Stefaniuc : mmdevapi: Use wide-char string literals.
by Alexandre Julliard
25 Nov '20
25 Nov '20
Module: wine Branch: master Commit: 591f06d85e155b6a6876d46cf828637084a01183 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=591f06d85e155b6a6876d46c…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Tue Nov 24 23:29:16 2020 +0100 mmdevapi: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mmdevapi/devenum.c | 95 +++++++++++++---------------------------- dlls/mmdevapi/main.c | 18 +++----- dlls/mmdevapi/tests/mmdevenum.c | 6 +-- dlls/mmdevapi/tests/propstore.c | 13 ++---- 4 files changed, 40 insertions(+), 92 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=591f06d85e155b6a6876…
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200