ReactOS.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
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
List overview
Download
Ros-diffs
October 2022
----- 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
ros-diffs@reactos.org
23 participants
162 discussions
Start a n
N
ew thread
[reactos] 02/02: [IMM32][LPK] Remove msvcrt dependency; fix entrypoint. (#4759)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2c244eafe031bf1696d7a…
commit 2c244eafe031bf1696d7a292cca6bf325abc7d82 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Oct 5 23:19:48 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Oct 6 15:52:20 2022 +0200 [IMM32][LPK] Remove msvcrt dependency; fix entrypoint. (#4759) --- dll/win32/imm32/CMakeLists.txt | 4 ++-- dll/win32/imm32/imm.c | 14 +++++++++----- dll/win32/lpk/CMakeLists.txt | 7 +++---- dll/win32/lpk/lpk.c | 21 ++++++--------------- dll/win32/lpk/lpk.spec | 1 - dll/win32/lpk/ros_lpk.h | 1 - 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/dll/win32/imm32/CMakeLists.txt b/dll/win32/imm32/CMakeLists.txt index a0c518040aa..ba1f56641c4 100644 --- a/dll/win32/imm32/CMakeLists.txt +++ b/dll/win32/imm32/CMakeLists.txt @@ -22,7 +22,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/imm32.def) add_library(imm32 MODULE ${SOURCE} version.rc) -set_module_type(imm32 win32dll) +set_module_type(imm32 win32dll UNICODE ENTRYPOINT ImmDllInitialize 12) target_link_libraries(imm32 wine win32ksys) -add_importlibs(imm32 advapi32 user32 gdi32 msvcrt kernel32 ntdll) +add_importlibs(imm32 advapi32 user32 gdi32 kernel32 ntdll) add_cd_file(TARGET imm32 DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c index 2a87fc945ee..8f7f14764d9 100644 --- a/dll/win32/imm32/imm.c +++ b/dll/win32/imm32/imm.c @@ -1241,18 +1241,22 @@ BOOL WINAPI ImmSetActiveContextConsoleIME(HWND hwnd, BOOL fFlag) BOOL WINAPI User32InitializeImmEntryTable(DWORD); -// Win: ImmDllInitialize -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved) +BOOL +WINAPI +ImmDllInitialize( + _In_ HANDLE hDll, + _In_ ULONG dwReason, + _In_opt_ PVOID pReserved) { HKL hKL; HIMC hIMC; - TRACE("(%p, 0x%X, %p)\n", hinstDLL, fdwReason, lpReserved); + TRACE("(%p, 0x%X, %p)\n", hDll, dwReason, pReserved); - switch (fdwReason) + switch (dwReason) { case DLL_PROCESS_ATTACH: - if (!ImmInitializeGlobals(hinstDLL)) + if (!ImmInitializeGlobals(hDll)) { ERR("ImmInitializeGlobals failed\n"); return FALSE; diff --git a/dll/win32/lpk/CMakeLists.txt b/dll/win32/lpk/CMakeLists.txt index 25fd9339ea7..4ab0fdaf4a4 100644 --- a/dll/win32/lpk/CMakeLists.txt +++ b/dll/win32/lpk/CMakeLists.txt @@ -13,12 +13,11 @@ list(APPEND SOURCE add_library(lpk MODULE ${SOURCE} lpk.rc + ${CMAKE_CURRENT_BINARY_DIR}/lpk_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/lpk.def) -set_module_type(lpk win32dll UNICODE) - +set_module_type(lpk win32dll UNICODE ENTRYPOINT LpkDllInitialize 12) target_link_libraries(lpk wine) - -add_importlibs(lpk usp10 version user32 gdi32 msvcrt kernel32 ntdll) +add_importlibs(lpk usp10 version user32 gdi32 kernel32 ntdll) add_pch(lpk ros_lpk.h SOURCE) add_cd_file(TARGET lpk DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/lpk/lpk.c b/dll/win32/lpk/lpk.c index b4291448bfe..09f2282a95f 100644 --- a/dll/win32/lpk/lpk.c +++ b/dll/win32/lpk/lpk.c @@ -159,25 +159,16 @@ done: SetProcessDefaultLayout(version_layout); } -BOOL -WINAPI -DllMain( - HANDLE hDll, - DWORD dwReason, - LPVOID lpReserved) -{ - - return LpkDllInitialize(hDll,dwReason,lpReserved); -} - BOOL WINAPI LpkDllInitialize( - HANDLE hDll, - DWORD dwReason, - LPVOID lpReserved) + _In_ HANDLE hDll, + _In_ ULONG dwReason, + _In_opt_ PVOID pReserved) { - switch(dwReason) + UNREFERENCED_PARAMETER(pReserved); + + switch (dwReason) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hDll); diff --git a/dll/win32/lpk/lpk.spec b/dll/win32/lpk/lpk.spec index 15a913f6435..c089ef0a5ab 100644 --- a/dll/win32/lpk/lpk.spec +++ b/dll/win32/lpk/lpk.spec @@ -1,6 +1,5 @@ @ stdcall LpkInitialize(long) @ stdcall LpkTabbedTextOut(long long long long long long long long long long long long) -@ stdcall LpkDllInitialize(ptr long ptr) @ stdcall LpkDrawTextEx(long long long long long long long long long long) @ extern LpkEditControl @ stdcall LpkExtTextOut(long long long long ptr wstr long ptr long) diff --git a/dll/win32/lpk/ros_lpk.h b/dll/win32/lpk/ros_lpk.h index 1ed69f77274..44fc8669730 100644 --- a/dll/win32/lpk/ros_lpk.h +++ b/dll/win32/lpk/ros_lpk.h @@ -66,7 +66,6 @@ DWORD WINAPI EditAdjustCaret(DWORD x1, DWORD x2, DWORD x3, DWORD x5); DWORD WINAPI LpkInitialize(DWORD x1); DWORD WINAPI LpkTabbedTextOut(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,DWORD x9,DWORD x10,DWORD x11,DWORD x12); -BOOL WINAPI LpkDllInitialize (HANDLE hDll, DWORD dwReason, LPVOID lpReserved); DWORD WINAPI LpkDrawTextEx(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6,DWORD x7,DWORD x8,DWORD x9, DWORD x10); DWORD WINAPI LpkUseGDIWidthCache(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5); DWORD WINAPI ftsWordBreak(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5);
2 years, 2 months
1
0
0
0
[reactos] 01/02: [GDI32][USER32] Order the set_module_type arguments the usual way ("UNICODE" before the entrypoint).
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58740bfbc18e31591c980…
commit 58740bfbc18e31591c9803f314a4f2de77bdfb82 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Wed Oct 5 23:15:29 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Oct 6 15:37:23 2022 +0200 [GDI32][USER32] Order the set_module_type arguments the usual way ("UNICODE" before the entrypoint). + Harmonize the entrypoints as well. --- win32ss/gdi/gdi32/CMakeLists.txt | 5 +---- win32ss/gdi/gdi32/main/dllmain.c | 21 +++++++++++++-------- win32ss/gdi/gdi32_vista/CMakeLists.txt | 5 +---- win32ss/user/user32/CMakeLists.txt | 2 +- win32ss/user/user32/include/user32p.h | 2 +- win32ss/user/user32/misc/dllmain.c | 16 +++++++++------- win32ss/user/user32/user32.spec | 2 +- 7 files changed, 27 insertions(+), 26 deletions(-) diff --git a/win32ss/gdi/gdi32/CMakeLists.txt b/win32ss/gdi/gdi32/CMakeLists.txt index 4b9cc341e6f..37f66f8a7ea 100644 --- a/win32ss/gdi/gdi32/CMakeLists.txt +++ b/win32ss/gdi/gdi32/CMakeLists.txt @@ -50,10 +50,7 @@ add_library(gdi32 MODULE gdi32.rc ${CMAKE_CURRENT_BINARY_DIR}/gdi32.def) -set_module_type(gdi32 - win32dll - ENTRYPOINT DllMain 12 - UNICODE) +set_module_type(gdi32 win32dll UNICODE ENTRYPOINT DllMain 12) target_link_libraries(gdi32 winegdi diff --git a/win32ss/gdi/gdi32/main/dllmain.c b/win32ss/gdi/gdi32/main/dllmain.c index 322fc156435..522248226fe 100644 --- a/win32ss/gdi/gdi32/main/dllmain.c +++ b/win32ss/gdi/gdi32/main/dllmain.c @@ -14,16 +14,19 @@ RTL_CRITICAL_SECTION semLocal; extern CRITICAL_SECTION gcsClientObjLinks; /* - * GDI32.DLL does have an entry point for disable threadlibrarycall,. The initialization is done by a call - * to GdiDllInitialize(). This call is done from the entry point of USER32.DLL. + * GDI32.DLL does have an entry point for DisableThreadLibraryCalls(). + * The initialization is done by a call to GdiDllInitialize(). This + * call is done from the entry point of USER32.DLL. */ BOOL WINAPI DllMain( - HANDLE hDll, - DWORD dwReason, - LPVOID lpReserved) + _In_ HANDLE hDll, + _In_ ULONG dwReason, + _In_opt_ PVOID pReserved) { + UNREFERENCED_PARAMETER(pReserved); + switch (dwReason) { case DLL_PROCESS_ATTACH : @@ -74,10 +77,12 @@ GdiProcessShutdown(VOID) BOOL WINAPI GdiDllInitialize( - HANDLE hDll, - DWORD dwReason, - LPVOID lpReserved) + _In_ HANDLE hDll, + _In_ ULONG dwReason, + _In_opt_ PVOID pReserved) { + UNREFERENCED_PARAMETER(pReserved); + switch (dwReason) { case DLL_PROCESS_ATTACH: diff --git a/win32ss/gdi/gdi32_vista/CMakeLists.txt b/win32ss/gdi/gdi32_vista/CMakeLists.txt index 411e5b403ac..3ae8d6d0b4a 100644 --- a/win32ss/gdi/gdi32_vista/CMakeLists.txt +++ b/win32ss/gdi/gdi32_vista/CMakeLists.txt @@ -13,10 +13,7 @@ add_library(gdi32_vista MODULE gdi32_vista.rc ${CMAKE_CURRENT_BINARY_DIR}/gdi32_vista.def) -set_module_type(gdi32_vista - win32dll - ENTRYPOINT 0 - UNICODE) +set_module_type(gdi32_vista win32dll UNICODE ENTRYPOINT 0) target_link_libraries(gdi32_vista win32ksys) diff --git a/win32ss/user/user32/CMakeLists.txt b/win32ss/user/user32/CMakeLists.txt index c181932f8ee..8c938015115 100644 --- a/win32ss/user/user32/CMakeLists.txt +++ b/win32ss/user/user32/CMakeLists.txt @@ -79,7 +79,7 @@ add_library(user32 MODULE user32.rc ${CMAKE_CURRENT_BINARY_DIR}/user32.def) -set_module_type(user32 win32dll ENTRYPOINT DllMain 12 UNICODE) +set_module_type(user32 win32dll UNICODE ENTRYPOINT DllMain 12) target_link_libraries(user32 user32_wsprintf wine win32ksys ${PSEH_LIB}) add_dependencies(user32 asm) diff --git a/win32ss/user/user32/include/user32p.h b/win32ss/user/user32/include/user32p.h index e531ad847af..06e02f8c158 100644 --- a/win32ss/user/user32/include/user32p.h +++ b/win32ss/user/user32/include/user32p.h @@ -60,7 +60,7 @@ extern Imm32ApiTable gImmApiEntries; /* FIXME: move to a correct header */ /* undocumented gdi32 definitions */ -BOOL WINAPI GdiDllInitialize(HANDLE, DWORD, LPVOID); +BOOL WINAPI GdiDllInitialize(HANDLE, ULONG, PVOID); LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *); /* definitions for spy.c */ diff --git a/win32ss/user/user32/misc/dllmain.c b/win32ss/user/user32/misc/dllmain.c index 18dd9ec0710..3cc2b426a2e 100644 --- a/win32ss/user/user32/misc/dllmain.c +++ b/win32ss/user/user32/misc/dllmain.c @@ -466,11 +466,13 @@ Cleanup(VOID) DeleteFrameBrushes(); } -INT WINAPI +// UserClientDllInitialize +BOOL +WINAPI DllMain( - IN PVOID hInstanceDll, - IN ULONG dwReason, - IN PVOID reserved) + _In_ HANDLE hDll, + _In_ ULONG dwReason, + _In_opt_ PVOID pReserved) { switch (dwReason) { @@ -495,7 +497,7 @@ DllMain( TRACE("user32::DllMain\n"); /* Don't bother us for each thread */ - DisableThreadLibraryCalls(hInstanceDll); + DisableThreadLibraryCalls(hDll); RtlZeroMemory(&ConnectInfo, sizeof(ConnectInfo)); @@ -536,7 +538,7 @@ DllMain( #endif - User32Instance = hInstanceDll; + User32Instance = hDll; /* Finish initialization */ TRACE("Checkpoint (call Init)\n"); @@ -572,7 +574,7 @@ DllMain( } /* Finally, initialize GDI */ - return GdiDllInitialize(hInstanceDll, dwReason, reserved); + return GdiDllInitialize(hDll, dwReason, pReserved); } NTSTATUS diff --git a/win32ss/user/user32/user32.spec b/win32ss/user/user32/user32.spec index 6af9bbc06b0..a77cfeaf29e 100644 --- a/win32ss/user/user32/user32.spec +++ b/win32ss/user/user32/user32.spec @@ -717,7 +717,7 @@ 708 stdcall UpdatePerUserSystemParameters(long long) 709 stdcall UpdateWindow(long) 710 stdcall User32InitializeImmEntryTable(ptr) -711 stdcall UserClientDllInitialize(long long ptr) DllMain +711 stdcall UserClientDllInitialize(ptr long ptr) DllMain 712 stdcall UserHandleGrantAccess(ptr ptr long) NtUserUserHandleGrantAccess 713 stdcall UserLpkPSMTextOut(long long long wstr long long) 714 stdcall UserLpkTabbedTextOut(long long long long long long long long long long long long)
2 years, 2 months
1
0
0
0
[reactos] 01/01: [EVENTVWR] Fix settings loading. Remove usage of Rtl functions. Use Win32 CRT assert. (#4752)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=069b08da0bd1cb9996241…
commit 069b08da0bd1cb999624194780370b9df122b59b Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Tue Oct 4 02:15:22 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Oct 6 01:59:33 2022 +0200 [EVENTVWR] Fix settings loading. Remove usage of Rtl functions. Use Win32 CRT assert. (#4752) - Don't create the settings registry key when trying to load them. Defer its creation when saving the settings. - Use more restricted access rights when opening/creating the key. - Ensure read and written string settings are NULL-terminated. - Use the Win32 CRT assert so that if an assertion fails we get a message on the screen, not via the kernel debugger. --- base/applications/mscutils/eventvwr/eventvwr.c | 180 +++++++++++++------------ base/applications/mscutils/eventvwr/eventvwr.h | 10 +- 2 files changed, 99 insertions(+), 91 deletions(-) diff --git a/base/applications/mscutils/eventvwr/eventvwr.c b/base/applications/mscutils/eventvwr/eventvwr.c index 1dba37bf776..7712565e118 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.c +++ b/base/applications/mscutils/eventvwr/eventvwr.c @@ -346,116 +346,135 @@ Quit: BOOL LoadSettings(int nDefCmdShow) { - HKEY hKeyEventVwr; LONG Result; - DWORD dwSize; - DWORD dwType; - DWORD Value; - UNICODE_STRING ValueU; + HKEY hKeyEventVwr; + DWORD dwType, cbData; WCHAR buffer[100]; /* Load the default values */ + Settings.bSaveSettings = TRUE; Settings.bShowDetailsPane = TRUE; Settings.bShowGrid = FALSE; - Settings.bSaveSettings = TRUE; Settings.bNewestEventsFirst = TRUE; Settings.nVSplitPos = 250; /* Splitter default positions */ Settings.nHSplitPos = 250; ZeroMemory(&Settings.wpPos, sizeof(Settings.wpPos)); Settings.wpPos.length = sizeof(Settings.wpPos); - Settings.wpPos.rcNormalPosition.left = CW_USEDEFAULT; - Settings.wpPos.rcNormalPosition.top = CW_USEDEFAULT; - Settings.wpPos.rcNormalPosition.right = CW_USEDEFAULT; - Settings.wpPos.rcNormalPosition.bottom = CW_USEDEFAULT; - - /* Try to create/open the Event Viewer user key */ - if (RegCreateKeyExW(HKEY_CURRENT_USER, - EVNTVWR_PARAM_KEY, - 0, - NULL, - REG_OPTION_NON_VOLATILE, - KEY_READ | KEY_WRITE, - NULL, - &hKeyEventVwr, - NULL) != ERROR_SUCCESS) + SetRect(&Settings.wpPos.rcNormalPosition, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT); + Settings.wpPos.showCmd = nDefCmdShow; // SW_SHOWNORMAL; + + /* Try to open the Event Viewer user key */ + if (RegOpenKeyExW(HKEY_CURRENT_USER, + EVNTVWR_PARAM_KEY, + 0, + KEY_QUERY_VALUE, + &hKeyEventVwr) != ERROR_SUCCESS) { return FALSE; } - // Result = RegQueryValueExW(hKeyEventVwr, L"Filter", NULL, &dwType, (LPBYTE)&szFilter, &dwSize); // REG_SZ - // Result = RegQueryValueExW(hKeyEventVwr, L"Find", NULL, &dwType, (LPBYTE)&szFind, &dwSize); // REG_SZ - // Result = RegQueryValueExW(hKeyEventVwr, L"Module", NULL, &dwType, (LPBYTE)&szModule, &dwSize); // REG_SZ + // Result = RegQueryValueExW(hKeyEventVwr, L"Filter", NULL, &dwType, (LPBYTE)&szFilter, &cbData); // REG_SZ + // Result = RegQueryValueExW(hKeyEventVwr, L"Find", NULL, &dwType, (LPBYTE)&szFind, &cbData); // REG_SZ + // Result = RegQueryValueExW(hKeyEventVwr, L"Module", NULL, &dwType, (LPBYTE)&szModule, &cbData); // REG_SZ + + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"SaveSettings", NULL, &dwType, (LPBYTE)buffer, &cbData); + if (Result == ERROR_SUCCESS) + { + if (dwType == REG_SZ) + { + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + Settings.bSaveSettings = !!(DWORD)_wtoi(buffer); + } + else if (dwType == REG_DWORD && cbData == sizeof(DWORD)) + { + Settings.bSaveSettings = !!*(PDWORD)buffer; + } + } - dwSize = sizeof(Value); - Result = RegQueryValueExW(hKeyEventVwr, L"DetailsPane", NULL, &dwType, (LPBYTE)&Value, &dwSize); - if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ || dwType == REG_DWORD)) + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"DetailsPane", NULL, &dwType, (LPBYTE)buffer, &cbData); + if (Result == ERROR_SUCCESS) { if (dwType == REG_SZ) { - ValueU.Buffer = (PWSTR)&Value; - ValueU.Length = ValueU.MaximumLength = dwSize; - RtlUnicodeStringToInteger(&ValueU, 10, &Value); + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + Settings.bShowDetailsPane = !!(DWORD)_wtoi(buffer); + } + else if (dwType == REG_DWORD && cbData == sizeof(DWORD)) + { + Settings.bShowDetailsPane = !!*(PDWORD)buffer; } - Settings.bShowDetailsPane = !!Value; } - dwSize = sizeof(Value); - Result = RegQueryValueExW(hKeyEventVwr, L"ShowGrid", NULL, &dwType, (LPBYTE)&Value, &dwSize); - if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ || dwType == REG_DWORD)) + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"ShowGrid", NULL, &dwType, (LPBYTE)buffer, &cbData); + if (Result == ERROR_SUCCESS) { if (dwType == REG_SZ) { - ValueU.Buffer = (PWSTR)&Value; - ValueU.Length = ValueU.MaximumLength = dwSize; - RtlUnicodeStringToInteger(&ValueU, 10, &Value); + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + Settings.bShowGrid = !!(DWORD)_wtoi(buffer); + } + else if (dwType == REG_DWORD && cbData == sizeof(DWORD)) + { + Settings.bShowGrid = !!*(PDWORD)buffer; } - Settings.bShowGrid = !!Value; } - dwSize = sizeof(Value); - Result = RegQueryValueExW(hKeyEventVwr, L"SortOrder", NULL, &dwType, (LPBYTE)&Value, &dwSize); - if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ || dwType == REG_DWORD)) + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"SortOrder", NULL, &dwType, (LPBYTE)buffer, &cbData); + if (Result == ERROR_SUCCESS) { if (dwType == REG_SZ) { - ValueU.Buffer = (PWSTR)&Value; - ValueU.Length = ValueU.MaximumLength = dwSize; - RtlUnicodeStringToInteger(&ValueU, 10, &Value); + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + Settings.bNewestEventsFirst = !!(DWORD)_wtoi(buffer); + } + else if (dwType == REG_DWORD && cbData == sizeof(DWORD)) + { + Settings.bNewestEventsFirst = !!*(PDWORD)buffer; } - Settings.bNewestEventsFirst = !!Value; } /* Retrieve the splitter positions */ - dwSize = sizeof(Value); - Result = RegQueryValueExW(hKeyEventVwr, L"VSplitPos", NULL, &dwType, (LPBYTE)&Value, &dwSize); - if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ || dwType == REG_DWORD)) + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"VSplitPos", NULL, &dwType, (LPBYTE)buffer, &cbData); + if (Result == ERROR_SUCCESS) { if (dwType == REG_SZ) { - ValueU.Buffer = (PWSTR)&Value; - ValueU.Length = ValueU.MaximumLength = dwSize; - RtlUnicodeStringToInteger(&ValueU, 10, &Value); + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + Settings.nVSplitPos = (DWORD)_wtoi(buffer); + } + else if (dwType == REG_DWORD && cbData == sizeof(DWORD)) + { + Settings.nVSplitPos = *(PDWORD)buffer; } - Settings.nVSplitPos = Value; } - dwSize = sizeof(Value); - Result = RegQueryValueExW(hKeyEventVwr, L"HSplitPos", NULL, &dwType, (LPBYTE)&Value, &dwSize); - if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ || dwType == REG_DWORD)) + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"HSplitPos", NULL, &dwType, (LPBYTE)buffer, &cbData); + if (Result == ERROR_SUCCESS) { if (dwType == REG_SZ) { - ValueU.Buffer = (PWSTR)&Value; - ValueU.Length = ValueU.MaximumLength = dwSize; - RtlUnicodeStringToInteger(&ValueU, 10, &Value); + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + Settings.nHSplitPos = (DWORD)_wtoi(buffer); + } + else if (dwType == REG_DWORD && cbData == sizeof(DWORD)) + { + Settings.nHSplitPos = *(PDWORD)buffer; } - Settings.nHSplitPos = Value; } /* Retrieve the geometry of the main window */ - dwSize = sizeof(buffer); - Result = RegQueryValueExW(hKeyEventVwr, L"Window", NULL, &dwType, (LPBYTE)buffer, &dwSize); - if ((Result != ERROR_SUCCESS) || (dwType != REG_SZ)) + cbData = sizeof(buffer); + Result = RegQueryValueExW(hKeyEventVwr, L"Window", NULL, &dwType, (LPBYTE)buffer, &cbData); + if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ)) + buffer[cbData / sizeof(WCHAR) - 1] = UNICODE_NULL; + else buffer[0] = UNICODE_NULL; if (swscanf(buffer, L"%d %d %d %d %d", @@ -466,26 +485,11 @@ LoadSettings(int nDefCmdShow) &Settings.wpPos.showCmd) != 5) { /* Parsing failed, use defaults */ - Settings.wpPos.rcNormalPosition.left = CW_USEDEFAULT; - Settings.wpPos.rcNormalPosition.top = CW_USEDEFAULT; - Settings.wpPos.rcNormalPosition.right = CW_USEDEFAULT; - Settings.wpPos.rcNormalPosition.bottom = CW_USEDEFAULT; + SetRect(&Settings.wpPos.rcNormalPosition, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT); Settings.wpPos.showCmd = nDefCmdShow; // SW_SHOWNORMAL; } - dwSize = sizeof(Value); - Result = RegQueryValueExW(hKeyEventVwr, L"SaveSettings", NULL, &dwType, (LPBYTE)&Value, &dwSize); - if ((Result == ERROR_SUCCESS) && (dwType == REG_SZ || dwType == REG_DWORD)) - { - if (dwType == REG_SZ) - { - ValueU.Buffer = (PWSTR)&Value; - ValueU.Length = ValueU.MaximumLength = dwSize; - RtlUnicodeStringToInteger(&ValueU, 10, &Value); - } - Settings.bSaveSettings = !!Value; - } - RegCloseKey(hKeyEventVwr); return TRUE; } @@ -503,7 +507,7 @@ SaveSettings(VOID) 0, NULL, REG_OPTION_NON_VOLATILE, - KEY_READ | KEY_WRITE, + KEY_SET_VALUE, NULL, &hKeyEventVwr, NULL) != ERROR_SUCCESS) @@ -543,7 +547,7 @@ SaveSettings(VOID) Settings.wpPos.rcNormalPosition.bottom, Settings.wpPos.showCmd); - dwSize = (DWORD)(wcslen(buffer) * sizeof(WCHAR)); + dwSize = (DWORD)((wcslen(buffer) + 1) * sizeof(WCHAR)); RegSetValueExW(hKeyEventVwr, L"Window", 0, REG_SZ, (LPBYTE)buffer, dwSize); Quit: @@ -855,7 +859,7 @@ GetMessageStringFromDllList( szMessageDllList = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cbLength); if (!szMessageDllList) return NULL; - RtlCopyMemory(szMessageDllList, lpMessageDllList, cbLength); + CopyMemory(szMessageDllList, lpMessageDllList, cbLength); /* Loop through the list of message DLLs */ szDll = wcstok(szMessageDllList, EVENT_DLL_SEPARATOR); @@ -1346,7 +1350,7 @@ AllocAndCopyMultiStr(IN PCWSTR MultiStr OPTIONAL) pStr = HeapAlloc(GetProcessHeap(), 0, Length * sizeof(WCHAR)); // NOTE: If we failed allocating the string, then fall back into no filter! if (pStr) - RtlCopyMemory(pStr, MultiStr, Length * sizeof(WCHAR)); + CopyMemory(pStr, MultiStr, Length * sizeof(WCHAR)); return pStr; } @@ -1386,7 +1390,7 @@ AllocEventLogFilter(// IN PCWSTR FilterName, /* Copy the list of event logs */ EventLogFilter->NumOfEventLogs = NumOfEventLogs; - RtlCopyMemory(EventLogFilter->EventLogs, EventLogs, NumOfEventLogs * sizeof(PEVENTLOG)); + CopyMemory(EventLogFilter->EventLogs, EventLogs, NumOfEventLogs * sizeof(PEVENTLOG)); /* Initialize the filter reference count */ EventLogFilter->ReferenceCount = 1; @@ -1508,8 +1512,8 @@ GetExpandedFilePathName( lpFullFileName[1] = L'$'; /* Prepend the computer name */ - RtlMoveMemory(lpFullFileName + 2 + wcslen(ComputerName) + 1, - lpFullFileName, dwLength * sizeof(WCHAR) - (2 + wcslen(ComputerName) + 1) * sizeof(WCHAR)); + MoveMemory(lpFullFileName + 2 + wcslen(ComputerName) + 1, + lpFullFileName, dwLength * sizeof(WCHAR) - (2 + wcslen(ComputerName) + 1) * sizeof(WCHAR)); lpFullFileName[0] = L'\\'; lpFullFileName[1] = L'\\'; wcsncpy(lpFullFileName + 2, ComputerName, wcslen(ComputerName)); @@ -1699,7 +1703,7 @@ GetEventMessage(IN LPCWSTR KeyName, { if (iswdigit(lpMsgBuf[2])) { - RtlMoveMemory(lpMsgBuf, lpMsgBuf+1, ((szStringArray + cch) - lpMsgBuf - 1) * sizeof(WCHAR)); + MoveMemory(lpMsgBuf, lpMsgBuf+1, ((szStringArray + cch) - lpMsgBuf - 1) * sizeof(WCHAR)); } } @@ -2198,7 +2202,7 @@ EnumEventsThread(IN LPVOID lpParameter) StringCbPrintfW(szCategoryID, sizeof(szCategoryID), L"%u", pEvlrTmp->EventCategory); g_RecordPtrs[dwCurrentRecord] = HeapAlloc(hProcessHeap, 0, pEvlrTmp->Length); - RtlCopyMemory(g_RecordPtrs[dwCurrentRecord], pEvlrTmp, pEvlrTmp->Length); + CopyMemory(g_RecordPtrs[dwCurrentRecord], pEvlrTmp, pEvlrTmp->Length); lviEventItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM; lviEventItem.iItem = 0; diff --git a/base/applications/mscutils/eventvwr/eventvwr.h b/base/applications/mscutils/eventvwr/eventvwr.h index 86d6d611674..f344ab1f411 100644 --- a/base/applications/mscutils/eventvwr/eventvwr.h +++ b/base/applications/mscutils/eventvwr/eventvwr.h @@ -10,13 +10,17 @@ #ifndef _EVENTVWR_PCH_ #define _EVENTVWR_PCH_ -// #pragma once +#pragma once +/* C Headers */ #include <stdio.h> #include <stdlib.h> -#define WIN32_NO_STATUS +#include <assert.h> +#define ASSERT(x) assert(x) +/* PSDK Headers */ +#define WIN32_NO_STATUS #include <windef.h> #include <winbase.h> #include <wingdi.h> @@ -24,7 +28,7 @@ #include <winnls.h> #include <winreg.h> -#include <ndk/rtlfuncs.h> +#include <ndk/rtlfuncs.h> // For linked-lists. #define ROUND_DOWN(n, align) (((ULONG)n) & ~((align) - 1l)) #define ROUND_UP(n, align) ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
2 years, 2 months
1
0
0
0
[reactos] 01/01: [KEYBOARD] Fix problems in our keyboard layouts
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cdf907074d607a2025d4e…
commit cdf907074d607a2025d4e099bc823286e24c8be4 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Oct 5 20:08:07 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Wed Oct 5 21:28:15 2022 +0300 [KEYBOARD] Fix problems in our keyboard layouts - Fix failing API tests added in 6aacfa93 and c1c12793: 'KbdLayout' test: All failures fixed now 'VirtualKey' test: One of two failures fixed - This also should fix related problems with "F17" shortcut key in the menu items of some programs. CORE-17906 CORE-3903 --- dll/keyboard/kbda1/kbda1.c | 8 +++----- dll/keyboard/kbda2/kbda2.c | 8 +++----- dll/keyboard/kbda3/kbda3.c | 8 +++----- dll/keyboard/kbdal/kbdal.c | 8 +++----- dll/keyboard/kbdarme/kbdarme.c | 8 +++----- dll/keyboard/kbdarmw/kbdarmw.c | 8 +++----- dll/keyboard/kbdaze/kbdaze.c | 8 +++----- dll/keyboard/kbdazel/kbdazel.c | 8 +++----- dll/keyboard/kbdbe/kbdbe.c | 5 +---- dll/keyboard/kbdbga/kbdbga.c | 8 +++----- dll/keyboard/kbdbgt/kbdbgt.c | 8 +++----- dll/keyboard/kbdblr/kbdblr.c | 8 +++----- dll/keyboard/kbdbr/kbdbr.c | 8 +++----- dll/keyboard/kbdbu/kbdbu.c | 8 +++----- dll/keyboard/kbdbur/kbdbur.c | 8 +++----- dll/keyboard/kbdcan/kbdcan.c | 8 +++----- dll/keyboard/kbdcr/kbdcr.c | 8 +++----- dll/keyboard/kbdcz/kbdcz.c | 5 +---- dll/keyboard/kbdcz1/kbdcz1.c | 5 +---- dll/keyboard/kbdda/kbdda.c | 5 +---- dll/keyboard/kbddv/kbddv.c | 5 +---- dll/keyboard/kbdeo/kbdeo.c | 5 +---- dll/keyboard/kbdest/kbdest.c | 5 +---- dll/keyboard/kbdfc/kbdfc.c | 8 +++----- dll/keyboard/kbdfi/kbdfi.c | 5 +---- dll/keyboard/kbdfr/kbdfr.c | 5 +---- dll/keyboard/kbdgeo/kbdgeo.c | 8 +++----- dll/keyboard/kbdgerg/kbdgerg.c | 5 +---- dll/keyboard/kbdgneo/kbdgneo.c | 5 +---- dll/keyboard/kbdgr/kbdgr.c | 5 +---- dll/keyboard/kbdgr1/kbdgr1.c | 5 +---- dll/keyboard/kbdhe/kbdhe.c | 5 +---- dll/keyboard/kbdheb/kbdheb.c | 5 +---- dll/keyboard/kbdhu/kbdhu.c | 5 +---- dll/keyboard/kbdic/kbdic.c | 8 +++----- dll/keyboard/kbdinasa/kbdinasa.c | 8 +++----- dll/keyboard/kbdinben/kbdinben.c | 8 +++----- dll/keyboard/kbdindev/kbdindev.c | 8 +++----- dll/keyboard/kbdinguj/kbdinguj.c | 8 +++----- dll/keyboard/kbdinmal/kbdinmal.c | 8 +++----- dll/keyboard/kbdir/kbdir.c | 8 +++----- dll/keyboard/kbdit/kbdit.c | 5 +---- dll/keyboard/kbdjpn/kbdjpn.c | 5 +---- dll/keyboard/kbdkaz/kbdkaz.c | 8 +++----- dll/keyboard/kbdkor/kbdkor.c | 5 +---- dll/keyboard/kbdla/kbdla.c | 8 +++----- dll/keyboard/kbdlt1/kbdlt1.c | 5 +---- dll/keyboard/kbdlv/kbdlv.c | 5 +---- dll/keyboard/kbdmac/kbdmac.c | 8 +++----- dll/keyboard/kbdne/kbdne.c | 8 +++----- dll/keyboard/kbdno/kbdno.c | 5 +---- dll/keyboard/kbdpl/kbdpl.c | 5 +---- dll/keyboard/kbdpl1/kbdpl1.c | 5 +---- dll/keyboard/kbdpo/kbdpo.c | 5 +---- dll/keyboard/kbdro/kbdro.c | 8 +++----- dll/keyboard/kbdrost/kbdrost.c | 6 +----- dll/keyboard/kbdru/kbdru.c | 8 +++----- dll/keyboard/kbdru1/kbdru1.c | 8 +++----- dll/keyboard/kbdsf/kbdsf.c | 5 +---- dll/keyboard/kbdsg/kbdsg.c | 5 +---- dll/keyboard/kbdsl/kbdsl.c | 5 +---- dll/keyboard/kbdsl1/kbdsl1.c | 5 +---- dll/keyboard/kbdsp/kbdsp.c | 5 +---- dll/keyboard/kbdsw/kbdsw.c | 5 +---- dll/keyboard/kbdtat/kbdtat.c | 8 +++----- dll/keyboard/kbdth0/kbdth0.c | 8 +++----- dll/keyboard/kbdth1/kbdth1.c | 8 +++----- dll/keyboard/kbdth2/kbdth2.c | 8 +++----- dll/keyboard/kbdth3/kbdth3.c | 8 +++----- dll/keyboard/kbdtuf/kbdtuf.c | 8 +++----- dll/keyboard/kbdtuq/kbdtuq.c | 8 +++----- dll/keyboard/kbduk/kbduk.c | 5 +---- dll/keyboard/kbdur/kbdur.c | 8 +++----- dll/keyboard/kbdurs/kbdurs.c | 8 +++----- dll/keyboard/kbdus/kbdus.c | 5 +---- dll/keyboard/kbdusa/kbdusa.c | 8 +++----- dll/keyboard/kbdusl/kbdusl.c | 8 +++----- dll/keyboard/kbdusr/kbdusr.c | 8 +++----- dll/keyboard/kbdusx/kbdusx.c | 8 +++----- dll/keyboard/kbduzb/kbduzb.c | 8 +++----- dll/keyboard/kbdvntc/kbdvntc.c | 8 +++----- dll/keyboard/kbdycc/kbdycc.c | 8 +++----- dll/keyboard/kbdycl/kbdycl.c | 8 +++----- 83 files changed, 181 insertions(+), 382 deletions(-) diff --git a/dll/keyboard/kbda1/kbda1.c b/dll/keyboard/kbda1/kbda1.c index e85d0eaf3d3..bdb99f86767 100644 --- a/dll/keyboard/kbda1/kbda1.c +++ b/dll/keyboard/kbda1/kbda1.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -366,7 +364,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbda2/kbda2.c b/dll/keyboard/kbda2/kbda2.c index 3ad64ea40cf..946a8bb2d34 100644 --- a/dll/keyboard/kbda2/kbda2.c +++ b/dll/keyboard/kbda2/kbda2.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -383,7 +381,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbda3/kbda3.c b/dll/keyboard/kbda3/kbda3.c index 888330a2944..1677325420d 100644 --- a/dll/keyboard/kbda3/kbda3.c +++ b/dll/keyboard/kbda3/kbda3.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -383,7 +381,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdal/kbdal.c b/dll/keyboard/kbdal/kbdal.c index 6c8af804acb..b11b47cb291 100644 --- a/dll/keyboard/kbdal/kbdal.c +++ b/dll/keyboard/kbdal/kbdal.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -380,7 +378,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdarme/kbdarme.c b/dll/keyboard/kbdarme/kbdarme.c index e2b9bb8aded..cf24dc820ff 100644 --- a/dll/keyboard/kbdarme/kbdarme.c +++ b/dll/keyboard/kbdarme/kbdarme.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -353,7 +351,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdarmw/kbdarmw.c b/dll/keyboard/kbdarmw/kbdarmw.c index 2be08a89688..82674455a81 100644 --- a/dll/keyboard/kbdarmw/kbdarmw.c +++ b/dll/keyboard/kbdarmw/kbdarmw.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -341,7 +339,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdaze/kbdaze.c b/dll/keyboard/kbdaze/kbdaze.c index 5124ba87dcd..1cde6284754 100644 --- a/dll/keyboard/kbdaze/kbdaze.c +++ b/dll/keyboard/kbdaze/kbdaze.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdazel/kbdazel.c b/dll/keyboard/kbdazel/kbdazel.c index f337d165a2c..143acc9daf0 100644 --- a/dll/keyboard/kbdazel/kbdazel.c +++ b/dll/keyboard/kbdazel/kbdazel.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -353,7 +351,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdbe/kbdbe.c b/dll/keyboard/kbdbe/kbdbe.c index 7e5d6657a60..f9a25ae1a17 100644 --- a/dll/keyboard/kbdbe/kbdbe.c +++ b/dll/keyboard/kbdbe/kbdbe.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -460,7 +457,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdbga/kbdbga.c b/dll/keyboard/kbdbga/kbdbga.c index 0d1c27ed56c..db7cdfaccb9 100644 --- a/dll/keyboard/kbdbga/kbdbga.c +++ b/dll/keyboard/kbdbga/kbdbga.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -381,7 +379,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdbgt/kbdbgt.c b/dll/keyboard/kbdbgt/kbdbgt.c index 80b4b011d42..46b63f81746 100644 --- a/dll/keyboard/kbdbgt/kbdbgt.c +++ b/dll/keyboard/kbdbgt/kbdbgt.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -398,7 +396,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdblr/kbdblr.c b/dll/keyboard/kbdblr/kbdblr.c index 0c049085f6f..6257b3d5926 100644 --- a/dll/keyboard/kbdblr/kbdblr.c +++ b/dll/keyboard/kbdblr/kbdblr.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdbr/kbdbr.c b/dll/keyboard/kbdbr/kbdbr.c index 7719c044721..cc546ff580d 100644 --- a/dll/keyboard/kbdbr/kbdbr.c +++ b/dll/keyboard/kbdbr/kbdbr.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -441,7 +439,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdbu/kbdbu.c b/dll/keyboard/kbdbu/kbdbu.c index 902061c04a5..364ee56592a 100644 --- a/dll/keyboard/kbdbu/kbdbu.c +++ b/dll/keyboard/kbdbu/kbdbu.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -382,7 +380,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdbur/kbdbur.c b/dll/keyboard/kbdbur/kbdbur.c index 078ffe7dfe2..201ad1afe25 100644 --- a/dll/keyboard/kbdbur/kbdbur.c +++ b/dll/keyboard/kbdbur/kbdbur.c @@ -95,10 +95,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -360,7 +358,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdcan/kbdcan.c b/dll/keyboard/kbdcan/kbdcan.c index c2099e5f121..dcc6040f68e 100644 --- a/dll/keyboard/kbdcan/kbdcan.c +++ b/dll/keyboard/kbdcan/kbdcan.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -574,7 +572,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdcr/kbdcr.c b/dll/keyboard/kbdcr/kbdcr.c index 64f26976dc7..3a5d112ccb1 100644 --- a/dll/keyboard/kbdcr/kbdcr.c +++ b/dll/keyboard/kbdcr/kbdcr.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -488,7 +486,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdcz/kbdcz.c b/dll/keyboard/kbdcz/kbdcz.c index 41dfd088be1..157f24cc8a4 100644 --- a/dll/keyboard/kbdcz/kbdcz.c +++ b/dll/keyboard/kbdcz/kbdcz.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -458,7 +455,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdcz1/kbdcz1.c b/dll/keyboard/kbdcz1/kbdcz1.c index e71f2f9fcad..be5b932e154 100644 --- a/dll/keyboard/kbdcz1/kbdcz1.c +++ b/dll/keyboard/kbdcz1/kbdcz1.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -451,7 +448,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdda/kbdda.c b/dll/keyboard/kbdda/kbdda.c index 1d68d3c2d00..971917b033e 100644 --- a/dll/keyboard/kbdda/kbdda.c +++ b/dll/keyboard/kbdda/kbdda.c @@ -93,9 +93,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -460,7 +457,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbddv/kbddv.c b/dll/keyboard/kbddv/kbddv.c index b3100b7116b..9243ad2cbc0 100644 --- a/dll/keyboard/kbddv/kbddv.c +++ b/dll/keyboard/kbddv/kbddv.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -371,7 +368,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdeo/kbdeo.c b/dll/keyboard/kbdeo/kbdeo.c index 7346f5808d2..19a4e538133 100644 --- a/dll/keyboard/kbdeo/kbdeo.c +++ b/dll/keyboard/kbdeo/kbdeo.c @@ -100,9 +100,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -393,7 +390,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdest/kbdest.c b/dll/keyboard/kbdest/kbdest.c index 43b344ee3a0..c83498edc9e 100644 --- a/dll/keyboard/kbdest/kbdest.c +++ b/dll/keyboard/kbdest/kbdest.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -372,7 +369,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdfc/kbdfc.c b/dll/keyboard/kbdfc/kbdfc.c index 016869cd110..cfa1f101ab7 100644 --- a/dll/keyboard/kbdfc/kbdfc.c +++ b/dll/keyboard/kbdfc/kbdfc.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -452,7 +450,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdfi/kbdfi.c b/dll/keyboard/kbdfi/kbdfi.c index a321dda808b..1ab690dba94 100644 --- a/dll/keyboard/kbdfi/kbdfi.c +++ b/dll/keyboard/kbdfi/kbdfi.c @@ -96,9 +96,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -451,7 +448,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdfr/kbdfr.c b/dll/keyboard/kbdfr/kbdfr.c index e2d315e160b..661a2ee1171 100644 --- a/dll/keyboard/kbdfr/kbdfr.c +++ b/dll/keyboard/kbdfr/kbdfr.c @@ -103,9 +103,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -451,7 +448,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdgeo/kbdgeo.c b/dll/keyboard/kbdgeo/kbdgeo.c index 44eee7e5bdb..e566b9ce41a 100644 --- a/dll/keyboard/kbdgeo/kbdgeo.c +++ b/dll/keyboard/kbdgeo/kbdgeo.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdgerg/kbdgerg.c b/dll/keyboard/kbdgerg/kbdgerg.c index 249d579a940..8386aa4e42c 100644 --- a/dll/keyboard/kbdgerg/kbdgerg.c +++ b/dll/keyboard/kbdgerg/kbdgerg.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -430,7 +427,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdgneo/kbdgneo.c b/dll/keyboard/kbdgneo/kbdgneo.c index 34300170c60..44cbcce942e 100644 --- a/dll/keyboard/kbdgneo/kbdgneo.c +++ b/dll/keyboard/kbdgneo/kbdgneo.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -430,7 +427,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdgr/kbdgr.c b/dll/keyboard/kbdgr/kbdgr.c index ff83647b878..b0c09714e11 100644 --- a/dll/keyboard/kbdgr/kbdgr.c +++ b/dll/keyboard/kbdgr/kbdgr.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -430,7 +427,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdgr1/kbdgr1.c b/dll/keyboard/kbdgr1/kbdgr1.c index a9dbbff43db..da42ac88bdb 100644 --- a/dll/keyboard/kbdgr1/kbdgr1.c +++ b/dll/keyboard/kbdgr1/kbdgr1.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -430,7 +427,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdhe/kbdhe.c b/dll/keyboard/kbdhe/kbdhe.c index e01af950fc7..70d3f2bb6a2 100644 --- a/dll/keyboard/kbdhe/kbdhe.c +++ b/dll/keyboard/kbdhe/kbdhe.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -402,7 +399,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdheb/kbdheb.c b/dll/keyboard/kbdheb/kbdheb.c index daf1d0c130b..c0e530cccff 100644 --- a/dll/keyboard/kbdheb/kbdheb.c +++ b/dll/keyboard/kbdheb/kbdheb.c @@ -214,9 +214,6 @@ ROSDATA USHORT scancode_to_vk[] = /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -494,7 +491,7 @@ ROSDATA KBDTABLES keyboard_layout_table = /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdhu/kbdhu.c b/dll/keyboard/kbdhu/kbdhu.c index e300fbd2f6f..d51086d90a4 100644 --- a/dll/keyboard/kbdhu/kbdhu.c +++ b/dll/keyboard/kbdhu/kbdhu.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -377,7 +374,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdic/kbdic.c b/dll/keyboard/kbdic/kbdic.c index ec14a97250d..12000d95cc2 100644 --- a/dll/keyboard/kbdic/kbdic.c +++ b/dll/keyboard/kbdic/kbdic.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -442,7 +440,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdinasa/kbdinasa.c b/dll/keyboard/kbdinasa/kbdinasa.c index 32e39764f69..2aab04bdca4 100644 --- a/dll/keyboard/kbdinasa/kbdinasa.c +++ b/dll/keyboard/kbdinasa/kbdinasa.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -379,7 +377,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdinben/kbdinben.c b/dll/keyboard/kbdinben/kbdinben.c index ad7c1db9b57..65cc9f0c43b 100644 --- a/dll/keyboard/kbdinben/kbdinben.c +++ b/dll/keyboard/kbdinben/kbdinben.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -374,7 +372,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdindev/kbdindev.c b/dll/keyboard/kbdindev/kbdindev.c index 966c0be19fb..efa9f55b7fd 100644 --- a/dll/keyboard/kbdindev/kbdindev.c +++ b/dll/keyboard/kbdindev/kbdindev.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -379,7 +377,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdinguj/kbdinguj.c b/dll/keyboard/kbdinguj/kbdinguj.c index 90a1dcf93ac..10ae88c08c3 100644 --- a/dll/keyboard/kbdinguj/kbdinguj.c +++ b/dll/keyboard/kbdinguj/kbdinguj.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -379,7 +377,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdinmal/kbdinmal.c b/dll/keyboard/kbdinmal/kbdinmal.c index 904c4f22679..87069ccbe85 100644 --- a/dll/keyboard/kbdinmal/kbdinmal.c +++ b/dll/keyboard/kbdinmal/kbdinmal.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -375,7 +373,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdir/kbdir.c b/dll/keyboard/kbdir/kbdir.c index 8f8377271e8..2cd21d6eb39 100644 --- a/dll/keyboard/kbdir/kbdir.c +++ b/dll/keyboard/kbdir/kbdir.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -407,7 +405,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdit/kbdit.c b/dll/keyboard/kbdit/kbdit.c index 9c841421df5..e1793f5feb1 100644 --- a/dll/keyboard/kbdit/kbdit.c +++ b/dll/keyboard/kbdit/kbdit.c @@ -155,9 +155,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* 7c */ VK_EMPTY, /* 7d */ VK_EMPTY, /* 7e */ VK_EMPTY, -/* 7f */ VK_EMPTY, -/* 80 */ VK_EMPTY, -/* 00 */ 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -432,7 +429,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdjpn/kbdjpn.c b/dll/keyboard/kbdjpn/kbdjpn.c index eb09fe6d211..85363620428 100644 --- a/dll/keyboard/kbdjpn/kbdjpn.c +++ b/dll/keyboard/kbdjpn/kbdjpn.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_CONVERT | KBDSPECIAL, VK_EMPTY, VK_NONCONVERT | KBDSPECIAL, VK_EMPTY, VK_OEM_5, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -378,7 +375,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdkaz/kbdkaz.c b/dll/keyboard/kbdkaz/kbdkaz.c index 60121f69a6a..4b336343586 100644 --- a/dll/keyboard/kbdkaz/kbdkaz.c +++ b/dll/keyboard/kbdkaz/kbdkaz.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdkor/kbdkor.c b/dll/keyboard/kbdkor/kbdkor.c index e3553a9342d..9d4591b9fa0 100644 --- a/dll/keyboard/kbdkor/kbdkor.c +++ b/dll/keyboard/kbdkor/kbdkor.c @@ -104,9 +104,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -377,7 +374,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdla/kbdla.c b/dll/keyboard/kbdla/kbdla.c index 488cfeaf204..11bdddb4834 100644 --- a/dll/keyboard/kbdla/kbdla.c +++ b/dll/keyboard/kbdla/kbdla.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -428,7 +426,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdlt1/kbdlt1.c b/dll/keyboard/kbdlt1/kbdlt1.c index b5781ca5304..2b0fbae235f 100644 --- a/dll/keyboard/kbdlt1/kbdlt1.c +++ b/dll/keyboard/kbdlt1/kbdlt1.c @@ -100,9 +100,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -369,7 +366,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdlv/kbdlv.c b/dll/keyboard/kbdlv/kbdlv.c index 2d75ebf4b5e..a81170fdcc6 100644 --- a/dll/keyboard/kbdlv/kbdlv.c +++ b/dll/keyboard/kbdlv/kbdlv.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -373,7 +370,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdmac/kbdmac.c b/dll/keyboard/kbdmac/kbdmac.c index 8a77a449aea..8bca30bf2ba 100644 --- a/dll/keyboard/kbdmac/kbdmac.c +++ b/dll/keyboard/kbdmac/kbdmac.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -364,7 +362,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdne/kbdne.c b/dll/keyboard/kbdne/kbdne.c index f58e7ae36d2..090ef00602b 100644 --- a/dll/keyboard/kbdne/kbdne.c +++ b/dll/keyboard/kbdne/kbdne.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -446,7 +444,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdno/kbdno.c b/dll/keyboard/kbdno/kbdno.c index c9b19bc3729..021e5317429 100644 --- a/dll/keyboard/kbdno/kbdno.c +++ b/dll/keyboard/kbdno/kbdno.c @@ -93,9 +93,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -460,7 +457,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdpl/kbdpl.c b/dll/keyboard/kbdpl/kbdpl.c index b2557bf34a6..919186abaf3 100644 --- a/dll/keyboard/kbdpl/kbdpl.c +++ b/dll/keyboard/kbdpl/kbdpl.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -397,7 +394,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdpl1/kbdpl1.c b/dll/keyboard/kbdpl1/kbdpl1.c index bd20e8c8ab5..c0c6ff8d15e 100644 --- a/dll/keyboard/kbdpl1/kbdpl1.c +++ b/dll/keyboard/kbdpl1/kbdpl1.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -413,7 +410,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdpo/kbdpo.c b/dll/keyboard/kbdpo/kbdpo.c index a6fb89072a4..7bf501c08e3 100644 --- a/dll/keyboard/kbdpo/kbdpo.c +++ b/dll/keyboard/kbdpo/kbdpo.c @@ -165,9 +165,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* 7c */ VK_EMPTY, /* 7d */ VK_EMPTY, /* 7e */ VK_EMPTY, -/* 7f */ VK_EMPTY, -/* 80 */ VK_EMPTY, -/* 00 */ 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -553,7 +550,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdro/kbdro.c b/dll/keyboard/kbdro/kbdro.c index 8363139d366..ce0df72cec7 100644 --- a/dll/keyboard/kbdro/kbdro.c +++ b/dll/keyboard/kbdro/kbdro.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -363,7 +361,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdrost/kbdrost.c b/dll/keyboard/kbdrost/kbdrost.c index 7b06638cf9d..f3358a65d2a 100644 --- a/dll/keyboard/kbdrost/kbdrost.c +++ b/dll/keyboard/kbdrost/kbdrost.c @@ -134,10 +134,6 @@ ROSDATA USHORT scancode_to_vk[] = /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = @@ -461,7 +457,7 @@ ROSDATA KBDTABLES keyboard_layout_table = /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdru/kbdru.c b/dll/keyboard/kbdru/kbdru.c index 092ed570957..09c71f256e8 100644 --- a/dll/keyboard/kbdru/kbdru.c +++ b/dll/keyboard/kbdru/kbdru.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -371,7 +369,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdru1/kbdru1.c b/dll/keyboard/kbdru1/kbdru1.c index b3419c76a8a..f9a46eb0908 100644 --- a/dll/keyboard/kbdru1/kbdru1.c +++ b/dll/keyboard/kbdru1/kbdru1.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -371,7 +369,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdsf/kbdsf.c b/dll/keyboard/kbdsf/kbdsf.c index f7b11f643c1..5bebb745e44 100644 --- a/dll/keyboard/kbdsf/kbdsf.c +++ b/dll/keyboard/kbdsf/kbdsf.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -461,7 +458,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdsg/kbdsg.c b/dll/keyboard/kbdsg/kbdsg.c index b7985437731..89f1768ad1f 100644 --- a/dll/keyboard/kbdsg/kbdsg.c +++ b/dll/keyboard/kbdsg/kbdsg.c @@ -99,9 +99,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -458,7 +455,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdsl/kbdsl.c b/dll/keyboard/kbdsl/kbdsl.c index e01e6521482..edd62aad63b 100644 --- a/dll/keyboard/kbdsl/kbdsl.c +++ b/dll/keyboard/kbdsl/kbdsl.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -445,7 +442,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdsl1/kbdsl1.c b/dll/keyboard/kbdsl1/kbdsl1.c index 7f505a4bd25..ef7f42eceb7 100644 --- a/dll/keyboard/kbdsl1/kbdsl1.c +++ b/dll/keyboard/kbdsl1/kbdsl1.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -445,7 +442,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdsp/kbdsp.c b/dll/keyboard/kbdsp/kbdsp.c index bfee723463a..ee515860bd9 100644 --- a/dll/keyboard/kbdsp/kbdsp.c +++ b/dll/keyboard/kbdsp/kbdsp.c @@ -165,9 +165,6 @@ ROSDATA USHORT scancode_to_vk[] = /* 7c */ VK_EMPTY, /* 7d */ VK_EMPTY, /* 7e */ VK_EMPTY, - /* 7f */ VK_EMPTY, - /* 80 */ VK_EMPTY, - /* 00 */ 0 }; ROSDATA VSC_VK extcode0_to_vk[] = @@ -534,7 +531,7 @@ ROSDATA KBDTABLES keyboard_layout_table = /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdsw/kbdsw.c b/dll/keyboard/kbdsw/kbdsw.c index 66d8fa32791..da6415d20dd 100644 --- a/dll/keyboard/kbdsw/kbdsw.c +++ b/dll/keyboard/kbdsw/kbdsw.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -456,7 +453,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdtat/kbdtat.c b/dll/keyboard/kbdtat/kbdtat.c index 4f04ba193a7..2755b853679 100644 --- a/dll/keyboard/kbdtat/kbdtat.c +++ b/dll/keyboard/kbdtat/kbdtat.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -368,7 +366,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdth0/kbdth0.c b/dll/keyboard/kbdth0/kbdth0.c index 7085975b853..85b62a356fe 100644 --- a/dll/keyboard/kbdth0/kbdth0.c +++ b/dll/keyboard/kbdth0/kbdth0.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdth1/kbdth1.c b/dll/keyboard/kbdth1/kbdth1.c index d30fd373f5a..927825a3530 100644 --- a/dll/keyboard/kbdth1/kbdth1.c +++ b/dll/keyboard/kbdth1/kbdth1.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdth2/kbdth2.c b/dll/keyboard/kbdth2/kbdth2.c index 3779699ab5a..9196403ce5b 100644 --- a/dll/keyboard/kbdth2/kbdth2.c +++ b/dll/keyboard/kbdth2/kbdth2.c @@ -95,10 +95,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -359,7 +357,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdth3/kbdth3.c b/dll/keyboard/kbdth3/kbdth3.c index c98c7c0ab98..03f1a3f2ccf 100644 --- a/dll/keyboard/kbdth3/kbdth3.c +++ b/dll/keyboard/kbdth3/kbdth3.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdtuf/kbdtuf.c b/dll/keyboard/kbdtuf/kbdtuf.c index 03cdb1d2b31..980739a8f23 100644 --- a/dll/keyboard/kbdtuf/kbdtuf.c +++ b/dll/keyboard/kbdtuf/kbdtuf.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -453,7 +451,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdtuq/kbdtuq.c b/dll/keyboard/kbdtuq/kbdtuq.c index f2393d034a5..42a5cbe5efc 100644 --- a/dll/keyboard/kbdtuq/kbdtuq.c +++ b/dll/keyboard/kbdtuq/kbdtuq.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -453,7 +451,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbduk/kbduk.c b/dll/keyboard/kbduk/kbduk.c index 23feb4a492d..54d7c81ca98 100644 --- a/dll/keyboard/kbduk/kbduk.c +++ b/dll/keyboard/kbduk/kbduk.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -383,7 +380,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdur/kbdur.c b/dll/keyboard/kbdur/kbdur.c index b101be5c6ed..d8446214e2d 100644 --- a/dll/keyboard/kbdur/kbdur.c +++ b/dll/keyboard/kbdur/kbdur.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -372,7 +370,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdurs/kbdurs.c b/dll/keyboard/kbdurs/kbdurs.c index 320f1dae9f8..ae2165e77d8 100644 --- a/dll/keyboard/kbdurs/kbdurs.c +++ b/dll/keyboard/kbdurs/kbdurs.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -364,7 +362,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdus/kbdus.c b/dll/keyboard/kbdus/kbdus.c index ef103cdc1b2..d3fad47efae 100644 --- a/dll/keyboard/kbdus/kbdus.c +++ b/dll/keyboard/kbdus/kbdus.c @@ -98,9 +98,6 @@ ROSDATA USHORT scancode_to_vk[] = { /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, /* PA1 */ - VK_EMPTY, - /* - 80 - */ - 0 }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -378,7 +375,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdusa/kbdusa.c b/dll/keyboard/kbdusa/kbdusa.c index 7f39d4d1c80..c83fe1b756f 100644 --- a/dll/keyboard/kbdusa/kbdusa.c +++ b/dll/keyboard/kbdusa/kbdusa.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -363,7 +361,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdusl/kbdusl.c b/dll/keyboard/kbdusl/kbdusl.c index 4ee85186dff..1f104db5a65 100644 --- a/dll/keyboard/kbdusl/kbdusl.c +++ b/dll/keyboard/kbdusl/kbdusl.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdusr/kbdusr.c b/dll/keyboard/kbdusr/kbdusr.c index 8733483d0e1..68319893177 100644 --- a/dll/keyboard/kbdusr/kbdusr.c +++ b/dll/keyboard/kbdusr/kbdusr.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdusx/kbdusx.c b/dll/keyboard/kbdusx/kbdusx.c index 0f0ae653d86..5b52adb3f69 100644 --- a/dll/keyboard/kbdusx/kbdusx.c +++ b/dll/keyboard/kbdusx/kbdusx.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -447,7 +445,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbduzb/kbduzb.c b/dll/keyboard/kbduzb/kbduzb.c index f48c4b28933..93aa9c12e70 100644 --- a/dll/keyboard/kbduzb/kbduzb.c +++ b/dll/keyboard/kbduzb/kbduzb.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -358,7 +356,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdvntc/kbdvntc.c b/dll/keyboard/kbdvntc/kbdvntc.c index 2c453c794a7..df56da7868b 100644 --- a/dll/keyboard/kbdvntc/kbdvntc.c +++ b/dll/keyboard/kbdvntc/kbdvntc.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -363,7 +361,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdycc/kbdycc.c b/dll/keyboard/kbdycc/kbdycc.c index 9570f49ae53..50b6f11865c 100644 --- a/dll/keyboard/kbdycc/kbdycc.c +++ b/dll/keyboard/kbdycc/kbdycc.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -379,7 +377,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk, diff --git a/dll/keyboard/kbdycl/kbdycl.c b/dll/keyboard/kbdycl/kbdycl.c index 3991436e0ae..12976a38f67 100644 --- a/dll/keyboard/kbdycl/kbdycl.c +++ b/dll/keyboard/kbdycl/kbdycl.c @@ -98,10 +98,8 @@ ROSDATA USHORT scancode_to_vk[] = { VK_F24, /* - 77 - */ VK_EMPTY, VK_EMPTY, VK_EMPTY, VK_EMPTY, - VK_OEM_PA1, VK_TAB, 0xc2, 0, /* PA1 */ - 0, - /* - 80 - */ - 0 + VK_OEM_PA1, VK_TAB, 0xc2, VK_EMPTY, /* PA1 */ + VK_EMPTY, }; ROSDATA VSC_VK extcode0_to_vk[] = { @@ -499,7 +497,7 @@ ROSDATA KBDTABLES keyboard_layout_table = { /* scan code to virtual key maps */ scancode_to_vk, - sizeof(scancode_to_vk) / sizeof(scancode_to_vk[0]), + RTL_NUMBER_OF(scancode_to_vk), extcode0_to_vk, extcode1_to_vk,
2 years, 2 months
1
0
0
0
[reactos] 01/01: [USER32_APITEST] Add tests for Keyboard Layouts
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6aacfa93c0c77a534fb44…
commit 6aacfa93c0c77a534fb4484e3e7917a5f7d218dd Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Oct 5 03:36:11 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Wed Oct 5 16:18:16 2022 +0300 [USER32_APITEST] Add tests for Keyboard Layouts CORE-17906 --- modules/rostests/apitests/user32/CMakeLists.txt | 1 + modules/rostests/apitests/user32/KbdLayout.c | 113 ++++++++++++++++++++++++ modules/rostests/apitests/user32/testlist.c | 2 + 3 files changed, 116 insertions(+) diff --git a/modules/rostests/apitests/user32/CMakeLists.txt b/modules/rostests/apitests/user32/CMakeLists.txt index c7eeefc5db5..ef2e7c1715b 100644 --- a/modules/rostests/apitests/user32/CMakeLists.txt +++ b/modules/rostests/apitests/user32/CMakeLists.txt @@ -23,6 +23,7 @@ list(APPEND SOURCE GetUserObjectInformation.c GetWindowPlacement.c InitializeLpkHooks.c + KbdLayout.c keybd_event.c LoadImage.c LookupIconIdFromDirectoryEx.c diff --git a/modules/rostests/apitests/user32/KbdLayout.c b/modules/rostests/apitests/user32/KbdLayout.c new file mode 100644 index 00000000000..997c97794a6 --- /dev/null +++ b/modules/rostests/apitests/user32/KbdLayout.c @@ -0,0 +1,113 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Tests for Keyboard Layouts DLL files + * COPYRIGHT: Copyright 2022 Stanislav Motylkov <x86corez(a)gmail.com> + */ + +#include "precomp.h" +#include <ndk/kbd.h> +#include <strsafe.h> + +typedef PVOID (*PFN_KBDLAYERDESCRIPTOR)(VOID); + +static void testLayout( + _In_ LPWSTR szFileName, + _In_ LPWSTR szFilePath) +{ + HMODULE hModule; + PFN_KBDLAYERDESCRIPTOR pfnKbdLayerDescriptor; + PKBDTABLES pKbdTbl; + USHORT i, uTableSize; + + trace("Testing '%ls'...\n", szFileName); + + hModule = LoadLibraryW(szFilePath); + if (!hModule) + { + ok(FALSE, "LoadLibraryW failed with code %ld\n", GetLastError()); + return; + } + + pfnKbdLayerDescriptor = (PFN_KBDLAYERDESCRIPTOR)GetProcAddress(hModule, "KbdLayerDescriptor"); + if (!pfnKbdLayerDescriptor) + { + ok(FALSE, "KbdLayerDescriptor not found!\n"); + goto Cleanup; + } + + pKbdTbl = pfnKbdLayerDescriptor(); + if (!pKbdTbl) + { + ok(FALSE, "PKBDTABLES is NULL!\n"); + goto Cleanup; + } + + if (!pKbdTbl->pusVSCtoVK) + { + ok(FALSE, "pusVSCtoVK table is NULL!\n"); + goto Cleanup; + } + + if (wcscmp(szFileName, L"kbdnec.dll") == 0) + uTableSize = 128; /* Only NEC PC-9800 Japanese keyboard layout has 128 entries. */ + else + uTableSize = 127; + + /* Validate number of entries in pusVSCtoVK array. */ + ok(pKbdTbl->bMaxVSCtoVK == uTableSize, "pKbdTbl->bMaxVSCtoVK = %u\n", pKbdTbl->bMaxVSCtoVK); + + for (i = 0; i < pKbdTbl->bMaxVSCtoVK; ++i) + { + /* Make sure there are no Virtual Keys with zero value. */ + if (pKbdTbl->pusVSCtoVK[i] == 0) + ok(FALSE, "Scan Code %u => Virtual Key %u\n", i, pKbdTbl->pusVSCtoVK[i]); + } + +Cleanup: + if (hModule) + FreeLibrary(hModule); +} + +static void testKeyboardLayouts(void) +{ + DWORD dwRet; + WCHAR szSysPath[MAX_PATH], + szPattern[MAX_PATH], + szFilePath[MAX_PATH]; + HANDLE hFindFile = INVALID_HANDLE_VALUE; + WIN32_FIND_DATAW wfd; + BOOL bFound = TRUE; + + dwRet = GetSystemDirectoryW(szSysPath, ARRAYSIZE(szSysPath)); + if (!dwRet) + { + skip("GetSystemDirectoryW failed with code %ld\n", GetLastError()); + return; + } + + StringCchCopyW(szPattern, ARRAYSIZE(szPattern), szSysPath); + StringCchCatW(szPattern, ARRAYSIZE(szPattern), L"\\kbd*.dll"); + + for (hFindFile = FindFirstFileW(szPattern, &wfd); + bFound && (hFindFile != INVALID_HANDLE_VALUE); + bFound = FindNextFileW(hFindFile, &wfd)) + { + if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + continue; + + StringCchCopyW(szFilePath, ARRAYSIZE(szFilePath), szSysPath); + StringCchCatW(szFilePath, ARRAYSIZE(szFilePath), L"\\"); + StringCchCatW(szFilePath, ARRAYSIZE(szFilePath), wfd.cFileName); + + testLayout(wfd.cFileName, szFilePath); + } + + if (hFindFile != INVALID_HANDLE_VALUE) + FindClose(hFindFile); +} + +START_TEST(KbdLayout) +{ + testKeyboardLayouts(); +} diff --git a/modules/rostests/apitests/user32/testlist.c b/modules/rostests/apitests/user32/testlist.c index 77a0f4fb343..53d1c8b243d 100644 --- a/modules/rostests/apitests/user32/testlist.c +++ b/modules/rostests/apitests/user32/testlist.c @@ -25,6 +25,7 @@ extern void func_GetSystemMetrics(void); extern void func_GetUserObjectInformation(void); extern void func_GetWindowPlacement(void); extern void func_InitializeLpkHooks(void); +extern void func_KbdLayout(void); extern void func_keybd_event(void); extern void func_LoadImage(void); extern void func_LookupIconIdFromDirectoryEx(void); @@ -78,6 +79,7 @@ const struct test winetest_testlist[] = { "GetUserObjectInformation", func_GetUserObjectInformation }, { "GetWindowPlacement", func_GetWindowPlacement }, { "InitializeLpkHooks", func_InitializeLpkHooks }, + { "KbdLayout", func_KbdLayout }, { "keybd_event", func_keybd_event }, { "LoadImage", func_LoadImage }, { "LookupIconIdFromDirectoryEx", func_LookupIconIdFromDirectoryEx },
2 years, 2 months
1
0
0
0
[reactos] 01/01: [RTL][NTDLL_APITEST] Implement RtlRemovePrivileges (#4614)
by Ratin Gao
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=badd97043fbce3bbfe60a…
commit badd97043fbce3bbfe60aa0470749a0cf4678b34 Author: Ratin Gao <ratin(a)knsoft.org> AuthorDate: Wed Oct 5 20:31:39 2022 +0800 Commit: GitHub <noreply(a)github.com> CommitDate: Wed Oct 5 14:31:39 2022 +0200 [RTL][NTDLL_APITEST] Implement RtlRemovePrivileges (#4614) Vista+ API, compile-time guarded. Add tests for it. --- dll/ntdll/def/ntdll.spec | 2 +- modules/rostests/apitests/ntdll/CMakeLists.txt | 1 + .../rostests/apitests/ntdll/RtlRemovePrivileges.c | 111 +++++++++++++++++++++ modules/rostests/apitests/ntdll/testlist.c | 2 + sdk/include/ndk/rtlfuncs.h | 14 +++ sdk/lib/rtl/priv.c | 102 +++++++++++++++++++ 6 files changed, 231 insertions(+), 1 deletion(-) diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec index 80d27637413..3cd201aa3d4 100644 --- a/dll/ntdll/def/ntdll.spec +++ b/dll/ntdll/def/ntdll.spec @@ -1111,7 +1111,7 @@ @ stdcall -stub -version=0x600+ RtlReleaseSRWLockExclusive(ptr) @ stdcall -stub -version=0x600+ RtlReleaseSRWLockShared(ptr) @ stdcall RtlRemoteCall(ptr ptr ptr long ptr long long) -@ stub -version=0x600+ RtlRemovePrivileges +@ stdcall -version=0x600+ RtlRemovePrivileges(ptr ptr long) @ stdcall RtlRemoveVectoredContinueHandler(ptr) @ stdcall RtlRemoveVectoredExceptionHandler(ptr) @ stub -version=0x600+ RtlReportException diff --git a/modules/rostests/apitests/ntdll/CMakeLists.txt b/modules/rostests/apitests/ntdll/CMakeLists.txt index e1076a3a584..c2ec474a5a0 100644 --- a/modules/rostests/apitests/ntdll/CMakeLists.txt +++ b/modules/rostests/apitests/ntdll/CMakeLists.txt @@ -85,6 +85,7 @@ list(APPEND SOURCE RtlpEnsureBufferSize.c RtlQueryTimeZoneInfo.c RtlReAllocateHeap.c + RtlRemovePrivileges.c RtlUnicodeStringToAnsiString.c RtlUnicodeStringToCountedOemString.c RtlUnicodeToOemN.c diff --git a/modules/rostests/apitests/ntdll/RtlRemovePrivileges.c b/modules/rostests/apitests/ntdll/RtlRemovePrivileges.c new file mode 100644 index 00000000000..861dba1a8a8 --- /dev/null +++ b/modules/rostests/apitests/ntdll/RtlRemovePrivileges.c @@ -0,0 +1,111 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: See COPYING in the top level directory + * PURPOSE: Test for RtlRemovePrivileges + * PROGRAMMER: Ratin Gao <ratin(a)knsoft.org> + */ + +#include "precomp.h" + +START_TEST(RtlRemovePrivileges) +{ +#if (NTDDI_VERSION >= NTDDI_VISTA) + NTSTATUS Status; + HANDLE TokenHandle, TestTokenHandle; + ULONG ReturnLength; + UCHAR Buffer + [sizeof(TOKEN_PRIVILEGES) + + sizeof(LUID_AND_ATTRIBUTES) * (SE_MAX_WELL_KNOWN_PRIVILEGE - SE_MIN_WELL_KNOWN_PRIVILEGE)]; + PTOKEN_PRIVILEGES Privileges; + ULONG PrivilegesToKeep[2]; + + /* Duplicate current process token to run this test */ + Status = NtOpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE, &TokenHandle); + if (!NT_SUCCESS(Status)) + { + ok(0, "Failed to open current process token with TOKEN_DUPLICATE access (Status code %lx)!\n", Status); + return; + } + + Status = NtDuplicateToken(TokenHandle, TOKEN_ALL_ACCESS, NULL, FALSE, TokenPrimary, &TestTokenHandle); + NtClose(TokenHandle); + if (!NT_SUCCESS(Status)) + { + ok(0, "Failed to duplicate current process token (Status code %lx)!\n", Status); + return; + } + + /* Retrieve token privileges, we need at least 3 privileges to run following tests */ + Status = NtQueryInformationToken(TestTokenHandle, TokenPrivileges, Buffer, sizeof(Buffer), &ReturnLength); + if (!NT_SUCCESS(Status)) + { + NtClose(TestTokenHandle); + ok(0, "Failed to retrieve token privileges (Status code %lx)!\n", Status); + return; + } + Privileges = (PTOKEN_PRIVILEGES)Buffer; + if (Privileges->PrivilegeCount < 3) + { + NtClose(TestTokenHandle); + ok(0, "No enough privileges to run the test (Number of privilege: %lu)!\n", Privileges->PrivilegeCount); + return; + } + + /* Remove all privileges except 2nd and 3rd privileges, this should succeed */ + PrivilegesToKeep[0] = Privileges->Privileges[1].Luid.LowPart; + PrivilegesToKeep[1] = Privileges->Privileges[2].Luid.LowPart; + Status = RtlRemovePrivileges(TestTokenHandle, PrivilegesToKeep, ARRAYSIZE(PrivilegesToKeep)); + + /* Do not use NT_SUCCESS, RtlRemovePrivileges may returns STATUS_NOT_ALL_ASSIGNED */ + if (Status != STATUS_SUCCESS) + { + NtClose(TestTokenHandle); + ok_ntstatus(Status, STATUS_SUCCESS); + return; + } + + /* Now, only two privileges we kept should be present */ + Status = NtQueryInformationToken(TestTokenHandle, TokenPrivileges, Buffer, sizeof(Buffer), &ReturnLength); + if (!NT_SUCCESS(Status)) + { + NtClose(TestTokenHandle); + ok(0, "Failed to retrieve token privileges (Status code %lx)!\n", Status); + return; + } + ok(Privileges->PrivilegeCount == ARRAYSIZE(PrivilegesToKeep), + "Number of privileges after RtlRemovePrivileges is %lu, expected %u\n", Privileges->PrivilegeCount, + ARRAYSIZE(PrivilegesToKeep)); + ok(PrivilegesToKeep[0] + PrivilegesToKeep[1] == + Privileges->Privileges[0].Luid.LowPart + Privileges->Privileges[1].Luid.LowPart, + "Incorrect privileges kept by RtlRemovePrivileges: %lu and %lu, expected %lu and %lu", + Privileges->Privileges[0].Luid.LowPart, Privileges->Privileges[1].Luid.LowPart, PrivilegesToKeep[0], + PrivilegesToKeep[1]); + + /* Remove all privileges, this should succeed */ + Status = RtlRemovePrivileges(TestTokenHandle, NULL, 0); + + /* Do not use NT_SUCCESS, RtlRemovePrivileges may returns STATUS_NOT_ALL_ASSIGNED */ + if (Status != STATUS_SUCCESS) + { + NtClose(TestTokenHandle); + ok_ntstatus(Status, STATUS_SUCCESS); + return; + } + + /* Now, no privilege should be present */ + Status = NtQueryInformationToken(TestTokenHandle, TokenPrivileges, Buffer, sizeof(Buffer), &ReturnLength); + if (!NT_SUCCESS(Status)) + { + NtClose(TestTokenHandle); + ok(0, "Failed to retrieve token privileges (Status code %lx)!\n", Status); + return; + } + ok(Privileges->PrivilegeCount == 0, "There are %lu privileges still exist after RtlRemovePrivileges\n", + Privileges->PrivilegeCount); + + NtClose(TestTokenHandle); + return; +#else + skip("RtlRemovePrivileges available on NT6.0+ (NTDDI_VERSION >= NTDDI_VISTA)"); +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ +} diff --git a/modules/rostests/apitests/ntdll/testlist.c b/modules/rostests/apitests/ntdll/testlist.c index f5b265f0305..29b3ae4ba21 100644 --- a/modules/rostests/apitests/ntdll/testlist.c +++ b/modules/rostests/apitests/ntdll/testlist.c @@ -81,6 +81,7 @@ extern void func_RtlpApplyLengthFunction(void); extern void func_RtlpEnsureBufferSize(void); extern void func_RtlQueryTimeZoneInformation(void); extern void func_RtlReAllocateHeap(void); +extern void func_RtlRemovePrivileges(void); extern void func_RtlUnicodeStringToAnsiString(void); extern void func_RtlUnicodeStringToCountedOemString(void); extern void func_RtlUnicodeToOemN(void); @@ -172,6 +173,7 @@ const struct test winetest_testlist[] = { "RtlpEnsureBufferSize", func_RtlpEnsureBufferSize }, { "RtlQueryTimeZoneInformation", func_RtlQueryTimeZoneInformation }, { "RtlReAllocateHeap", func_RtlReAllocateHeap }, + { "RtlRemovePrivileges", func_RtlRemovePrivileges }, { "RtlUnicodeStringToAnsiSize", func_RtlxUnicodeStringToAnsiSize }, /* For some reason, starting test name with Rtlx hides it */ { "RtlUnicodeStringToAnsiString", func_RtlUnicodeStringToAnsiString }, { "RtlUnicodeStringToCountedOemString", func_RtlUnicodeStringToCountedOemString }, diff --git a/sdk/include/ndk/rtlfuncs.h b/sdk/include/ndk/rtlfuncs.h index c6bdcfcdd19..05dc37686ba 100644 --- a/sdk/include/ndk/rtlfuncs.h +++ b/sdk/include/ndk/rtlfuncs.h @@ -1568,6 +1568,20 @@ RtlReleasePrivilege( _In_ PVOID ReturnedState ); +#if (NTDDI_VERSION >= NTDDI_VISTA) + +NTSYSAPI +NTSTATUS +NTAPI +RtlRemovePrivileges( + _In_ HANDLE TokenHandle, + _In_reads_opt_(PrivilegeCount) _When_(PrivilegeCount != 0, _Notnull_) + PULONG PrivilegesToKeep, + _In_ ULONG PrivilegeCount +); + +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */ + _IRQL_requires_max_(APC_LEVEL) NTSYSAPI NTSTATUS diff --git a/sdk/lib/rtl/priv.c b/sdk/lib/rtl/priv.c index 164bd80f75f..0070140103f 100644 --- a/sdk/lib/rtl/priv.c +++ b/sdk/lib/rtl/priv.c @@ -486,3 +486,105 @@ RtlAdjustPrivilege(IN ULONG Privilege, return STATUS_SUCCESS; } + +#if (NTDDI_VERSION >= NTDDI_VISTA) + +/** + * @brief + * Removes all privileges in the specified access token. + * + * @param[in] TokenHandle + * A handle to the access token that contains the privileges to be removed. + * + * @param[in] PrivilegesToKeep + * A pointer to an array of privilege values (defined as SE_XXX_PRIVILEGE) that specify + * the privileges to keep in the token. + * + * @param[in] PrivilegeCount + * Specifies the number of entries in the PrivilegesToKeep array. + * + * @return + * Returns STATUS_SUCCESS if privileges removed successfully. + * STATUS_INVALID_PARAMETER is returned if input privilege value greater than + * SE_MAX_WELL_KNOWN_PRIVILEGE. STATUS_NOT_ALL_ASSIGNED is returned if The token does + * not have one or more of the privileges specified in the PrivilegesToKeep parameter, + * and no privileges were removed. A failure NTSTATUS code is returned otherwise. + */ +NTSTATUS +NTAPI +RtlRemovePrivileges( + _In_ HANDLE TokenHandle, + _In_reads_opt_(PrivilegeCount) _When_(PrivilegeCount != 0, _Notnull_) + PULONG PrivilegesToKeep, + _In_ ULONG PrivilegeCount) +{ + NTSTATUS Status; + UINT64 PrivilegesToKeepBitmap; + ULONG i, ReturnLength; + UCHAR Buffer[sizeof(TOKEN_PRIVILEGES) + + sizeof(LUID_AND_ATTRIBUTES) * (SE_MAX_WELL_KNOWN_PRIVILEGE - SE_MIN_WELL_KNOWN_PRIVILEGE)]; + PTOKEN_PRIVILEGES Privileges; + + C_ASSERT(SE_MAX_WELL_KNOWN_PRIVILEGE < 64); + + DPRINT("RtlRemovePrivileges(%p, %p, %u)\n", TokenHandle, PrivilegesToKeep, PrivilegeCount); + + /* Save privileges that should be keep */ + PrivilegesToKeepBitmap = 0; + if (PrivilegeCount) + { + for (i = 0; i < PrivilegeCount; i++) + { + if (PrivilegesToKeep[i] > SE_MAX_WELL_KNOWN_PRIVILEGE) + { + return STATUS_INVALID_PARAMETER; + } + PrivilegesToKeepBitmap |= (1ULL << PrivilegesToKeep[i]); + } + } + + /* Get token privileges information */ + Status = ZwQueryInformationToken(TokenHandle, + TokenPrivileges, + Buffer, + sizeof(Buffer), + &ReturnLength); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Remove all privileges that we don't need to keep */ + Privileges = (PTOKEN_PRIVILEGES)Buffer; + for (i = 0; i < Privileges->PrivilegeCount; i++) + { + LARGE_INTEGER Privilege = *(LARGE_INTEGER*)&Privileges->Privileges[i].Luid; + ASSERT(Privilege.QuadPart <= SE_MAX_WELL_KNOWN_PRIVILEGE); + if (PrivilegesToKeepBitmap & (1ULL << Privilege.QuadPart)) + { + PrivilegesToKeepBitmap &= ~(1ULL << Privilege.QuadPart); + } + else + { + Privileges->Privileges[i].Attributes = SE_PRIVILEGE_REMOVED; + } + } + + if (PrivilegesToKeepBitmap) + { + Status = STATUS_NOT_ALL_ASSIGNED; + } + else + { + Status = ZwAdjustPrivilegesToken(TokenHandle, + FALSE, + (PTOKEN_PRIVILEGES)Buffer, + sizeof(Buffer), + NULL, + NULL); + } + + return Status; +} + +#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
2 years, 2 months
1
0
0
0
[reactos] 01/01: [WINLOGON] Protect function calls to '3rd-party' DLLs by SEH. (#4743)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=967f5b98983928e1884e8…
commit 967f5b98983928e1884e824371e7002dbd417308 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Fri Sep 30 20:40:43 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Oct 4 23:14:35 2022 +0200 [WINLOGON] Protect function calls to '3rd-party' DLLs by SEH. (#4743) This includes: - Notification dll calling in CallNotificationDll(). - winmm.dll API calling (e.g. PlaySound) in PlaySoundRoutine(). Also: - Fix dwKeyName usage in RegEnumKeyExW() specifying a number of *characters*. --- base/system/winlogon/CMakeLists.txt | 2 +- base/system/winlogon/notify.c | 44 +++++++++++++++++++++++-------------- base/system/winlogon/sas.c | 26 +++++++++++++--------- base/system/winlogon/winlogon.h | 9 ++++++-- 4 files changed, 51 insertions(+), 30 deletions(-) diff --git a/base/system/winlogon/CMakeLists.txt b/base/system/winlogon/CMakeLists.txt index 06ff9241c91..18f9f79a328 100644 --- a/base/system/winlogon/CMakeLists.txt +++ b/base/system/winlogon/CMakeLists.txt @@ -21,7 +21,7 @@ list(APPEND SOURCE add_rc_deps(winlogon.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/winlogon.ico) add_executable(winlogon ${SOURCE} winlogon.rc) -target_link_libraries(winlogon wine) +target_link_libraries(winlogon wine ${PSEH_LIB}) set_module_type(winlogon win32gui) add_importlibs(winlogon user32 advapi32 userenv secur32 rpcrt4 mpr msvcrt kernel32 ntdll) add_pch(winlogon winlogon.h SOURCE) diff --git a/base/system/winlogon/notify.c b/base/system/winlogon/notify.c index d84e06af47f..3aa3e0d98ec 100644 --- a/base/system/winlogon/notify.c +++ b/base/system/winlogon/notify.c @@ -278,7 +278,7 @@ InitNotifications(VOID) dwIndex = 0; for(;;) { - dwKeyName = 80 * sizeof(WCHAR); + dwKeyName = ARRAYSIZE(szKeyName); lError = RegEnumKeyExW(hNotifyKey, dwIndex, szKeyName, @@ -312,11 +312,8 @@ CallNotificationDll( NOTIFICATION_TYPE Type, PWLX_NOTIFICATION_INFO pInfo) { - HKEY hDllKey = NULL; - HMODULE hModule = NULL; + HMODULE hModule; CHAR szFuncBuffer[128]; - DWORD dwSize; - DWORD dwType; DWORD dwError = ERROR_SUCCESS; PWLX_NOTIFY_HANDLER pNotifyHandler; @@ -338,6 +335,10 @@ CallNotificationDll( } else { + HKEY hDllKey; + DWORD dwSize; + DWORD dwType; + dwError = RegOpenKeyExW(hNotifyKey, NotificationDll->pszKeyName, 0, @@ -356,23 +357,32 @@ CallNotificationDll( &dwType, (PBYTE)szFuncBuffer, &dwSize); + + RegCloseKey(hDllKey); } - if (dwError == ERROR_SUCCESS) - { - hModule = LoadLibraryW(NotificationDll->pszDllName); - if (hModule != NULL) - { - pNotifyHandler = (PWLX_NOTIFY_HANDLER)GetProcAddress(hModule, szFuncBuffer); - if (pNotifyHandler != NULL) - pNotifyHandler(pInfo); + if (dwError != ERROR_SUCCESS) + return; - FreeLibrary(hModule); - } + hModule = LoadLibraryW(NotificationDll->pszDllName); + if (!hModule) + return; + + pNotifyHandler = (PWLX_NOTIFY_HANDLER)GetProcAddress(hModule, szFuncBuffer); + + _SEH2_TRY + { + if (pNotifyHandler) + pNotifyHandler(pInfo); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + ERR("WL: Exception while running notification %S!%s, Status 0x%08lx\n", + NotificationDll->pszDllName, szFuncBuffer, _SEH2_GetExceptionCode()); } + _SEH2_END; - if (hDllKey != NULL) - RegCloseKey(hDllKey); + FreeLibrary(hModule); } diff --git a/base/system/winlogon/sas.c b/base/system/winlogon/sas.c index a78733b7771..bc37d5db49d 100644 --- a/base/system/winlogon/sas.c +++ b/base/system/winlogon/sas.c @@ -251,30 +251,36 @@ PlaySoundRoutine( BOOL Ret = FALSE; hLibrary = LoadLibraryW(L"winmm.dll"); - if (hLibrary) + if (!hLibrary) + return FALSE; + + waveOutGetNumDevs = (WAVEOUTGETNUMDEVS)GetProcAddress(hLibrary, "waveOutGetNumDevs"); + Play = (PLAYSOUNDW)GetProcAddress(hLibrary, "PlaySoundW"); + + _SEH2_TRY { - waveOutGetNumDevs = (WAVEOUTGETNUMDEVS)GetProcAddress(hLibrary, "waveOutGetNumDevs"); if (waveOutGetNumDevs) { NumDevs = waveOutGetNumDevs(); if (!NumDevs) { if (!bLogon) - { Beep(440, 125); - } - FreeLibrary(hLibrary); - return FALSE; + _SEH2_LEAVE; } } - Play = (PLAYSOUNDW)GetProcAddress(hLibrary, "PlaySoundW"); if (Play) - { Ret = Play(FileName, NULL, Flags); - } - FreeLibrary(hLibrary); } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + ERR("WL: Exception while playing sound '%S', Status 0x%08lx\n", + FileName ? FileName : L"(n/a)", _SEH2_GetExceptionCode()); + } + _SEH2_END; + + FreeLibrary(hLibrary); return Ret; } diff --git a/base/system/winlogon/winlogon.h b/base/system/winlogon/winlogon.h index 668fd3e0ad2..3dcf6fda0c3 100644 --- a/base/system/winlogon/winlogon.h +++ b/base/system/winlogon/winlogon.h @@ -26,10 +26,12 @@ #ifndef __WINLOGON_MAIN_H__ #define __WINLOGON_MAIN_H__ -#include <stdarg.h> - #define USE_GETLASTINPUTINFO + +#include <stdarg.h> + +/* PSDK/NDK Headers */ #define WIN32_NO_STATUS #include <windef.h> #include <winbase.h> @@ -41,6 +43,9 @@ #include <ndk/exfuncs.h> #include <strsafe.h> +/* PSEH for SEH Support */ +#include <pseh/pseh2.h> + #include <reactos/undocuser.h> #include <reactos/undocmpr.h>
2 years, 2 months
1
0
0
0
[reactos] 02/02: [DESK] Fix screensaver preview drawing
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ab3e0002a6197cd096bee…
commit ab3e0002a6197cd096bee57ffe24489d94cae440 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Oct 3 17:34:10 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Tue Oct 4 21:16:08 2022 +0300 [DESK] Fix screensaver preview drawing Use window subclassing to override WM_PAINT message handling and use RedrawWindow function along with WS_CLIPCHILDREN style for the parent window in order to preserve screensaver drawing. CORE-15929 --- dll/cpl/desk/screensaver.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c index f4b81612ca3..6041c533b60 100644 --- a/dll/cpl/desk/screensaver.c +++ b/dll/cpl/desk/screensaver.c @@ -27,6 +27,7 @@ typedef struct _DATA ScreenSaverItem ScreenSaverItems[MAX_SCREENSAVERS]; PROCESS_INFORMATION PrevWindowPi; int Selection; + WNDPROC OldPreviewProc; UINT ScreenSaverCount; HWND ScreenSaverPreviewParent; } DATA, *PDATA; @@ -107,6 +108,33 @@ SelectionChanged(HWND hwndDlg, PDATA pData) } +LRESULT CALLBACK +RedrawSubclassProc(HWND hwndDlg, + UINT uMsg, + WPARAM wParam, + LPARAM lParam) +{ + HWND hwnd; + PDATA pData; + LRESULT Ret = FALSE; + + pData = (PDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + if (!pData) + return Ret; + + Ret = CallWindowProc(pData->OldPreviewProc, hwndDlg, uMsg, wParam, lParam); + + if (uMsg == WM_PAINT) + { + hwnd = pData->ScreenSaverPreviewParent; + if (hwnd) + RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN); + } + + return Ret; +} + + static VOID ShowScreenSaverPreview(IN LPDRAWITEMSTRUCT draw, IN PDATA pData) { @@ -650,8 +678,16 @@ OnInitDialog(HWND hwndDlg, PDATA pData) HWND hParent = GetDlgItem(hwndDlg, IDC_SCREENS_PREVIEW); HWND hChild; + if (hParent != NULL) + { + pData->OldPreviewProc = (WNDPROC)GetWindowLongPtr(hParent, GWLP_WNDPROC); + SetWindowLongPtr(hParent, GWLP_WNDPROC, (LONG_PTR)RedrawSubclassProc); + SetWindowLongPtr(hParent, GWLP_USERDATA, (LONG_PTR)pData); + } + hChild = CreateWindowEx(0, szPreviewWndClass, NULL, - WS_CHILD, 0, 0, 0, 0, hParent, + WS_CHILD | WS_CLIPCHILDREN, + 0, 0, 0, 0, hParent, NULL, hApplet, NULL); if (hChild != NULL) { @@ -781,6 +817,9 @@ ScreenSaverPageProc(HWND hwndDlg, { if (pData->ScreenSaverPreviewParent) { + SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_SCREENS_PREVIEW), + GWLP_WNDPROC, + (LONG_PTR)pData->OldPreviewProc); DestroyWindow(pData->ScreenSaverPreviewParent); pData->ScreenSaverPreviewParent = NULL; }
2 years, 2 months
1
0
0
0
[reactos] 01/02: [DESK] Show screensaver preview in a monitor
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=092fc8edd0c8895e361a3…
commit 092fc8edd0c8895e361a3dda5d90f185a1145ac8 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Oct 3 17:32:42 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Tue Oct 4 21:16:07 2022 +0300 [DESK] Show screensaver preview in a monitor Reuse the same monitor bitmap for the top preview control. Also use Windows-compatible class name for it. CORE-10606 --- dll/cpl/desk/lang/bg-BG.rc | 2 +- dll/cpl/desk/lang/cs-CZ.rc | 2 +- dll/cpl/desk/lang/de-DE.rc | 2 +- dll/cpl/desk/lang/el-GR.rc | 2 +- dll/cpl/desk/lang/en-GB.rc | 2 +- dll/cpl/desk/lang/en-US.rc | 2 +- dll/cpl/desk/lang/es-ES.rc | 2 +- dll/cpl/desk/lang/et-EE.rc | 2 +- dll/cpl/desk/lang/fr-FR.rc | 2 +- dll/cpl/desk/lang/he-IL.rc | 2 +- dll/cpl/desk/lang/hu-HU.rc | 2 +- dll/cpl/desk/lang/id-ID.rc | 2 +- dll/cpl/desk/lang/it-IT.rc | 2 +- dll/cpl/desk/lang/ja-JP.rc | 2 +- dll/cpl/desk/lang/nl-NL.rc | 2 +- dll/cpl/desk/lang/no-NO.rc | 2 +- dll/cpl/desk/lang/pl-PL.rc | 2 +- dll/cpl/desk/lang/pt-BR.rc | 2 +- dll/cpl/desk/lang/pt-PT.rc | 2 +- dll/cpl/desk/lang/ro-RO.rc | 2 +- dll/cpl/desk/lang/ru-RU.rc | 2 +- dll/cpl/desk/lang/sk-SK.rc | 2 +- dll/cpl/desk/lang/sq-AL.rc | 2 +- dll/cpl/desk/lang/sv-SE.rc | 2 +- dll/cpl/desk/lang/tr-TR.rc | 2 +- dll/cpl/desk/lang/uk-UA.rc | 2 +- dll/cpl/desk/lang/zh-CN.rc | 2 +- dll/cpl/desk/lang/zh-HK.rc | 2 +- dll/cpl/desk/lang/zh-TW.rc | 2 +- dll/cpl/desk/screensaver.c | 89 +++++++++++++++++++++++++++++++++++++++++++++- 30 files changed, 117 insertions(+), 30 deletions(-) diff --git a/dll/cpl/desk/lang/bg-BG.rc b/dll/cpl/desk/lang/bg-BG.rc index b742bfd45b1..4dae3f7b9ae 100644 --- a/dll/cpl/desk/lang/bg-BG.rc +++ b/dll/cpl/desk/lang/bg-BG.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Екранен предпазител" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Екранен предпазител", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "На&стройки", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/cs-CZ.rc b/dll/cpl/desk/lang/cs-CZ.rc index 386411e122d..9d083f1936e 100644 --- a/dll/cpl/desk/lang/cs-CZ.rc +++ b/dll/cpl/desk/lang/cs-CZ.rc @@ -39,7 +39,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Spořič obrazovky" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Spořič obrazovky", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Nastavení", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/de-DE.rc b/dll/cpl/desk/lang/de-DE.rc index d83f0b84916..ddf5cb6ed79 100644 --- a/dll/cpl/desk/lang/de-DE.rc +++ b/dll/cpl/desk/lang/de-DE.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Bildschirmschoner" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Bild&schirmschoner", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Eins&tellungen", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/el-GR.rc b/dll/cpl/desk/lang/el-GR.rc index c3a5444845e..6678325805b 100644 --- a/dll/cpl/desk/lang/el-GR.rc +++ b/dll/cpl/desk/lang/el-GR.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Προφύλαξη οθόνης" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Προφύλαξη οθόνης", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Ρυθμίσεις", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/en-GB.rc b/dll/cpl/desk/lang/en-GB.rc index d0fc9282a17..11609378370 100644 --- a/dll/cpl/desk/lang/en-GB.rc +++ b/dll/cpl/desk/lang/en-GB.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Screensaver" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Se&ttings", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/en-US.rc b/dll/cpl/desk/lang/en-US.rc index 12cc26ce914..2de5355fc14 100644 --- a/dll/cpl/desk/lang/en-US.rc +++ b/dll/cpl/desk/lang/en-US.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Screensaver" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Se&ttings", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/es-ES.rc b/dll/cpl/desk/lang/es-ES.rc index 21ce9e4fe2c..244ec1931f4 100644 --- a/dll/cpl/desk/lang/es-ES.rc +++ b/dll/cpl/desk/lang/es-ES.rc @@ -43,7 +43,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Protector de pantalla" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Protector de pantalla ", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "C&onfiguración", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/et-EE.rc b/dll/cpl/desk/lang/et-EE.rc index 4436b9c0b73..74b1198e85b 100644 --- a/dll/cpl/desk/lang/et-EE.rc +++ b/dll/cpl/desk/lang/et-EE.rc @@ -40,7 +40,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ekraanisäästja" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Erkaanisäästja", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "S&ätted", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/fr-FR.rc b/dll/cpl/desk/lang/fr-FR.rc index 9f8a90e1e0b..1cf8f9868c1 100644 --- a/dll/cpl/desk/lang/fr-FR.rc +++ b/dll/cpl/desk/lang/fr-FR.rc @@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Écran de veille" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "É&cran de veille", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Paramè&tres", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/he-IL.rc b/dll/cpl/desk/lang/he-IL.rc index e5b4c511655..60e1156616d 100644 --- a/dll/cpl/desk/lang/he-IL.rc +++ b/dll/cpl/desk/lang/he-IL.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "שומר מסך" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "שומר מסך", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "הגדרות", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/hu-HU.rc b/dll/cpl/desk/lang/hu-HU.rc index f96f7c872c6..1f3d1b70309 100644 --- a/dll/cpl/desk/lang/hu-HU.rc +++ b/dll/cpl/desk/lang/hu-HU.rc @@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Képernyőkímélő" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Képernyőkímélő", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Beállítások", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/id-ID.rc b/dll/cpl/desk/lang/id-ID.rc index a2f0a2fe2dc..5e85b95bbca 100644 --- a/dll/cpl/desk/lang/id-ID.rc +++ b/dll/cpl/desk/lang/id-ID.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Screensaver" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Se&telan", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/it-IT.rc b/dll/cpl/desk/lang/it-IT.rc index d66cf49191d..e96ec2d79d6 100644 --- a/dll/cpl/desk/lang/it-IT.rc +++ b/dll/cpl/desk/lang/it-IT.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Salva schermo" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Salva schermo", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Impostazioni", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/ja-JP.rc b/dll/cpl/desk/lang/ja-JP.rc index 432b61a7fef..e98ce8bca89 100644 --- a/dll/cpl/desk/lang/ja-JP.rc +++ b/dll/cpl/desk/lang/ja-JP.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "スクリーン セーバー" FONT 9, "MS UI Gothic", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "スクリーン セーバー(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "設定(&T)", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/nl-NL.rc b/dll/cpl/desk/lang/nl-NL.rc index fca749f8c8f..6487d1ee77e 100644 --- a/dll/cpl/desk/lang/nl-NL.rc +++ b/dll/cpl/desk/lang/nl-NL.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Schermbeveiliging" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Schermbeveiliging", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Instellingen", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/no-NO.rc b/dll/cpl/desk/lang/no-NO.rc index d6520cb9f0c..9fa117f234e 100644 --- a/dll/cpl/desk/lang/no-NO.rc +++ b/dll/cpl/desk/lang/no-NO.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Skjermsparer" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Skjermsparer", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Inn&stillinger", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/pl-PL.rc b/dll/cpl/desk/lang/pl-PL.rc index e88a01a9988..8409da7729a 100644 --- a/dll/cpl/desk/lang/pl-PL.rc +++ b/dll/cpl/desk/lang/pl-PL.rc @@ -43,7 +43,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Wygaszacz ekranu" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Wygaszacz ekranu", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Ustawienia", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/pt-BR.rc b/dll/cpl/desk/lang/pt-BR.rc index 2a524c8c992..ea7bbfcc074 100644 --- a/dll/cpl/desk/lang/pt-BR.rc +++ b/dll/cpl/desk/lang/pt-BR.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Proteção de tela" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Proteção de &tela", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Configurações", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/pt-PT.rc b/dll/cpl/desk/lang/pt-PT.rc index 2c93d48cbbf..5275419926f 100644 --- a/dll/cpl/desk/lang/pt-PT.rc +++ b/dll/cpl/desk/lang/pt-PT.rc @@ -38,7 +38,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Protecção de ecrã" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Protecção de &ecrã", IDC_SCREENS_DUMMY, 8, 92, 230, 64 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Definições", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/ro-RO.rc b/dll/cpl/desk/lang/ro-RO.rc index bf87ce2334d..a6655c12562 100644 --- a/dll/cpl/desk/lang/ro-RO.rc +++ b/dll/cpl/desk/lang/ro-RO.rc @@ -38,7 +38,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Regim de inactivitate" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Ani&mație de ecran inactiv", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Opțiuni", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/ru-RU.rc b/dll/cpl/desk/lang/ru-RU.rc index c48b93a8c78..afe0555ac7f 100644 --- a/dll/cpl/desk/lang/ru-RU.rc +++ b/dll/cpl/desk/lang/ru-RU.rc @@ -33,7 +33,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Заставка" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Заставка", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Параметры", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/sk-SK.rc b/dll/cpl/desk/lang/sk-SK.rc index fd458e45db3..ce7e673f425 100644 --- a/dll/cpl/desk/lang/sk-SK.rc +++ b/dll/cpl/desk/lang/sk-SK.rc @@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Šetrič obrazovky" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Šetrič o&brazovky", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Nastavenie", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/sq-AL.rc b/dll/cpl/desk/lang/sq-AL.rc index b6b504e1e49..5722554caab 100644 --- a/dll/cpl/desk/lang/sq-AL.rc +++ b/dll/cpl/desk/lang/sq-AL.rc @@ -37,7 +37,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Screensaver" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Cilësime&t", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/sv-SE.rc b/dll/cpl/desk/lang/sv-SE.rc index 409fc3f491b..2533296827e 100644 --- a/dll/cpl/desk/lang/sv-SE.rc +++ b/dll/cpl/desk/lang/sv-SE.rc @@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Screensaver" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Screensaver", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Se&ttings", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/tr-TR.rc b/dll/cpl/desk/lang/tr-TR.rc index c828f0b5cb9..759472c8f13 100644 --- a/dll/cpl/desk/lang/tr-TR.rc +++ b/dll/cpl/desk/lang/tr-TR.rc @@ -35,7 +35,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Ekran Koruyucu" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "Ekran Koruyucu", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Ayarlar", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/uk-UA.rc b/dll/cpl/desk/lang/uk-UA.rc index 5e9d3a285e2..4343a9ad45d 100644 --- a/dll/cpl/desk/lang/uk-UA.rc +++ b/dll/cpl/desk/lang/uk-UA.rc @@ -41,7 +41,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "Заставка" FONT 8, "MS Shell Dlg", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "&Заставка", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "П&араметри", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/zh-CN.rc b/dll/cpl/desk/lang/zh-CN.rc index a9a51d7d598..df8d1e8ab74 100644 --- a/dll/cpl/desk/lang/zh-CN.rc +++ b/dll/cpl/desk/lang/zh-CN.rc @@ -43,7 +43,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "屏幕保护程序" FONT 9, "宋体", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "屏幕保护程序(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "设置(&T)...", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/zh-HK.rc b/dll/cpl/desk/lang/zh-HK.rc index 2e42c33b408..62fa240f8c1 100644 --- a/dll/cpl/desk/lang/zh-HK.rc +++ b/dll/cpl/desk/lang/zh-HK.rc @@ -41,7 +41,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "螢幕保護裝置" FONT 9, "新細明體", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "螢幕保護裝置(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "設定(&T)...", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/lang/zh-TW.rc b/dll/cpl/desk/lang/zh-TW.rc index 2f8a659304c..8f08fefd871 100644 --- a/dll/cpl/desk/lang/zh-TW.rc +++ b/dll/cpl/desk/lang/zh-TW.rc @@ -42,7 +42,7 @@ STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION CAPTION "螢幕保護裝置" FONT 9, "新細明體", 0, 0 BEGIN - CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 70, WS_EX_STATICEDGE + CONTROL "", IDC_SCREENS_PREVIEW, "Static", SS_OWNERDRAW, 70, 10, 105, 74 GROUPBOX "螢幕保護裝置(&S)", IDC_SCREENS_DUMMY, 8, 92, 230, 52 COMBOBOX IDC_SCREENS_LIST, 14, 103, 100, 100, CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "設定(&T)...", IDC_SCREENS_SETTINGS, 120, 102, 50, 15, WS_GROUP diff --git a/dll/cpl/desk/screensaver.c b/dll/cpl/desk/screensaver.c index 02c05c9b650..f4b81612ca3 100644 --- a/dll/cpl/desk/screensaver.c +++ b/dll/cpl/desk/screensaver.c @@ -12,6 +12,8 @@ #define MAX_SCREENSAVERS 100 +static const TCHAR szPreviewWndClass[] = TEXT("SSDemoParent"); + typedef struct { BOOL bIsScreenSaver; /* Is this background a wallpaper */ @@ -26,6 +28,7 @@ typedef struct _DATA PROCESS_INFORMATION PrevWindowPi; int Selection; UINT ScreenSaverCount; + HWND ScreenSaverPreviewParent; } DATA, *PDATA; @@ -104,10 +107,48 @@ SelectionChanged(HWND hwndDlg, PDATA pData) } +static VOID +ShowScreenSaverPreview(IN LPDRAWITEMSTRUCT draw, IN PDATA pData) +{ + HBRUSH hBrush; + HDC hDC; + HGDIOBJ hOldObj; + RECT rcItem = { + MONITOR_LEFT, + MONITOR_TOP, + MONITOR_RIGHT, + MONITOR_BOTTOM + }; + + hDC = CreateCompatibleDC(draw->hDC); + hOldObj = SelectObject(hDC, g_GlobalData.hMonitorBitmap); + + if (!IsWindowVisible(pData->ScreenSaverPreviewParent)) + { + /* FIXME: Draw static bitmap inside monitor. */ + hBrush = CreateSolidBrush(g_GlobalData.desktop_color); + FillRect(hDC, &rcItem, hBrush); + DeleteObject(hBrush); + } + + GdiTransparentBlt(draw->hDC, + draw->rcItem.left, draw->rcItem.top, + draw->rcItem.right - draw->rcItem.left + 1, + draw->rcItem.bottom - draw->rcItem.top + 1, + hDC, + 0, 0, + g_GlobalData.bmMonWidth, g_GlobalData.bmMonHeight, + MONITOR_ALPHA); + + SelectObject(hDC, hOldObj); + DeleteDC(hDC); +} + + static VOID SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData) { - HWND hPreview = GetDlgItem(hwndDlg, IDC_SCREENS_PREVIEW); + HWND hPreview = pData->ScreenSaverPreviewParent; STARTUPINFO si; TCHAR szCmdline[2048]; @@ -119,6 +160,7 @@ SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData) CloseHandle(pData->PrevWindowPi.hThread); pData->PrevWindowPi.hThread = pData->PrevWindowPi.hProcess = NULL; } + ShowWindow(pData->ScreenSaverPreviewParent, SW_HIDE); if (pData->Selection > 0) { @@ -131,6 +173,8 @@ SetScreenSaverPreviewBox(HWND hwndDlg, PDATA pData) si.cb = sizeof(si); ZeroMemory(&pData->PrevWindowPi, sizeof(pData->PrevWindowPi)); + ShowWindow(pData->ScreenSaverPreviewParent, SW_SHOW); + if (!CreateProcess(NULL, szCmdline, NULL, @@ -584,6 +628,7 @@ OnInitDialog(HWND hwndDlg, PDATA pData) LPTSTR lpCurSs; HWND hwndSSCombo = GetDlgItem(hwndDlg, IDC_SCREENS_LIST); INT Num; + WNDCLASS wc = {0}; pData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -594,6 +639,32 @@ OnInitDialog(HWND hwndDlg, PDATA pData) return FALSE; } + wc.lpfnWndProc = DefWindowProc; + wc.hInstance = hApplet; + wc.hCursor = NULL; + wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); + wc.lpszClassName = szPreviewWndClass; + + if (RegisterClass(&wc)) + { + HWND hParent = GetDlgItem(hwndDlg, IDC_SCREENS_PREVIEW); + HWND hChild; + + hChild = CreateWindowEx(0, szPreviewWndClass, NULL, + WS_CHILD, 0, 0, 0, 0, hParent, + NULL, hApplet, NULL); + if (hChild != NULL) + { + RECT rc; + GetClientRect(hParent, &rc); + rc.left += MONITOR_LEFT; + rc.top += MONITOR_TOP; + MoveWindow(hChild, rc.left, rc.top, MONITOR_WIDTH, MONITOR_HEIGHT, FALSE); + } + + pData->ScreenSaverPreviewParent = hChild; + } + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pData); @@ -708,6 +779,12 @@ ScreenSaverPageProc(HWND hwndDlg, case WM_DESTROY: { + if (pData->ScreenSaverPreviewParent) + { + DestroyWindow(pData->ScreenSaverPreviewParent); + pData->ScreenSaverPreviewParent = NULL; + } + UnregisterClass(szPreviewWndClass, hApplet); if (pData->PrevWindowPi.hProcess) { TerminateProcess(pData->PrevWindowPi.hProcess, 0); @@ -727,6 +804,16 @@ ScreenSaverPageProc(HWND hwndDlg, break; } + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT lpDrawItem; + lpDrawItem = (LPDRAWITEMSTRUCT)lParam; + + if (lpDrawItem->CtlID == IDC_SCREENS_PREVIEW) + ShowScreenSaverPreview(lpDrawItem, pData); + break; + } + case WM_COMMAND: { DWORD controlId = LOWORD(wParam);
2 years, 2 months
1
0
0
0
[reactos] 01/01: [REACTOS][CPL] Coding style fixes only
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d5bd08fca429624869001…
commit d5bd08fca429624869001b926d2cf134865c8618 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Tue Oct 4 21:14:31 2022 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Tue Oct 4 21:14:31 2022 +0300 [REACTOS][CPL] Coding style fixes only --- base/applications/mstsc/connectdialog.c | 2 +- dll/cpl/desk/settings.c | 2 +- dll/cpl/sysdm/general.c | 2 +- dll/cpl/timedate/timezone.c | 2 +- modules/rostests/tests/statst2/statst2.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/base/applications/mstsc/connectdialog.c b/base/applications/mstsc/connectdialog.c index 5e3d2720f69..3795a7f0640 100644 --- a/base/applications/mstsc/connectdialog.c +++ b/base/applications/mstsc/connectdialog.c @@ -944,7 +944,7 @@ DisplayDlgProc(HWND hDlg, case WM_DRAWITEM: { LPDRAWITEMSTRUCT lpDrawItem; - lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + lpDrawItem = (LPDRAWITEMSTRUCT)lParam; if(lpDrawItem->CtlID == IDC_COLORIMAGE) { HDC hdcMem; diff --git a/dll/cpl/desk/settings.c b/dll/cpl/desk/settings.c index 8784f4a9743..602df32800b 100644 --- a/dll/cpl/desk/settings.c +++ b/dll/cpl/desk/settings.c @@ -892,7 +892,7 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar case WM_DRAWITEM: { LPDRAWITEMSTRUCT lpDrawItem; - lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + lpDrawItem = (LPDRAWITEMSTRUCT)lParam; switch (lpDrawItem->CtlID) { diff --git a/dll/cpl/sysdm/general.c b/dll/cpl/sysdm/general.c index e09b4a44b6d..d6d1288786a 100644 --- a/dll/cpl/sysdm/general.c +++ b/dll/cpl/sysdm/general.c @@ -747,7 +747,7 @@ INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM case WM_DRAWITEM: { - LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT)lParam; if (lpDrawItem->CtlID == IDC_ROSIMG) { diff --git a/dll/cpl/timedate/timezone.c b/dll/cpl/timedate/timezone.c index cd7361136a9..dcc8fab661a 100644 --- a/dll/cpl/timedate/timezone.c +++ b/dll/cpl/timedate/timezone.c @@ -285,7 +285,7 @@ TimeZonePageProc(HWND hwndDlg, case WM_DRAWITEM: { LPDRAWITEMSTRUCT lpDrawItem; - lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + lpDrawItem = (LPDRAWITEMSTRUCT)lParam; if(lpDrawItem->CtlID == IDC_WORLD_BACKGROUND) { HDC hdcMem; diff --git a/modules/rostests/tests/statst2/statst2.c b/modules/rostests/tests/statst2/statst2.c index 6ac769ed38b..2cd856ce06b 100644 --- a/modules/rostests/tests/statst2/statst2.c +++ b/modules/rostests/tests/statst2/statst2.c @@ -100,7 +100,7 @@ LRESULT CALLBACK WndProc ( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) case WM_DRAWITEM: { - LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT) lParam; + LPDRAWITEMSTRUCT lpDrawItem = (LPDRAWITEMSTRUCT)lParam; DrawText ( lpDrawItem->hDC, "SS_DRAWITEM test successful!", 28, &(lpDrawItem->rcItem), 0 ); } break;
2 years, 2 months
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200