From d8af591e49e328df32764cc6923f20db305d75e7 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Sun, 27 May 2007 20:47:12 +0000 Subject: [PATCH] Fix NtUserLoadKeyboardLayoutEx prototype: - Current prototype breaks compatibility. - This prototype was researched in clean room techniques. - Any questions, please email me, I will write a book to explain these techniques. svn path=/trunk/; revision=26927 --- reactos/dll/win32/user32/windows/input.c | 10 +++++----- reactos/include/reactos/win32k/ntuser.h | 10 +++++----- reactos/subsystems/win32/win32k/ntuser/kbdlayout.c | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/reactos/dll/win32/user32/windows/input.c b/reactos/dll/win32/user32/windows/input.c index abb4b8f1a9b..f379e7c6704 100644 --- a/reactos/dll/win32/user32/windows/input.c +++ b/reactos/dll/win32/user32/windows/input.c @@ -298,9 +298,9 @@ HKL STDCALL LoadKeyboardLayoutA(LPCSTR pwszKLID, UINT Flags) { - return NtUserLoadKeyboardLayoutEx( + return NtUserLoadKeyboardLayoutEx( NULL, 0, NULL, NULL, strtoul(pwszKLID, NULL, 16), - Flags, 0, 0, 0, 0); + Flags); } @@ -312,10 +312,10 @@ LoadKeyboardLayoutW(LPCWSTR pwszKLID, UINT Flags) { // Look at revision 25596 to see how it's done in windows. - // We will do things our own way. - return NtUserLoadKeyboardLayoutEx( + // We will do things our own way. Also be compatible too! + return NtUserLoadKeyboardLayoutEx( NULL, 0, NULL, NULL, wcstoul(pwszKLID, NULL, 16), - Flags, 0, 0, 0, 0); + Flags); } diff --git a/reactos/include/reactos/win32k/ntuser.h b/reactos/include/reactos/win32k/ntuser.h index 1c86c67c0db..150d8c94ae5 100644 --- a/reactos/include/reactos/win32k/ntuser.h +++ b/reactos/include/reactos/win32k/ntuser.h @@ -1229,12 +1229,12 @@ NtUserKillTimer HKL STDCALL NtUserLoadKeyboardLayoutEx( + IN HANDLE Handle, + IN DWORD offTable, + IN HKL hKL, + IN PUNICODE_STRING puszKLID, IN DWORD dwKLID, - IN UINT Flags, - IN DWORD Unused1, - IN DWORD Unused2, - IN DWORD Unused3, - IN DWORD Unused4); + IN UINT Flags); BOOL NTAPI diff --git a/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c b/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c index 86e3500fd3e..2e1f424de3a 100644 --- a/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c +++ b/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c @@ -489,12 +489,12 @@ NtUserGetKeyboardLayoutName( HKL STDCALL NtUserLoadKeyboardLayoutEx( + IN HANDLE Handle, + IN DWORD offTable, + IN HKL hKL, + IN PUNICODE_STRING puszKLID, IN DWORD dwKLID, - IN UINT Flags, - IN DWORD Unused1, - IN DWORD Unused2, - IN DWORD Unused3, - IN DWORD Unused4) + IN UINT Flags) { HKL Ret = NULL; PKBL pKbl = NULL, Cur;