- Fix a bug with incorrect handling of the keyboard layout pointer (which is HKL in fact in our current implementation).

- Change the prototype to better match actual parameters usage.
See issue #2787 for more details.

svn path=/trunk/; revision=30046
This commit is contained in:
Aleksey Bragin 2007-11-01 17:06:49 +00:00
parent 8609c9c790
commit 4a05c1e591
4 changed files with 10 additions and 8 deletions

View file

@ -2356,8 +2356,8 @@ NtUserValidateTimerCallback(
DWORD
NTAPI
NtUserVkKeyScanEx(
DWORD Unknown0,
DWORD Unknown1,
WCHAR wChar,
ULONG_PTR KeyboardLayout,
DWORD Unknown2);
DWORD

View file

@ -32,6 +32,7 @@ BOOL FASTCALL IntMouseInput(MOUSEINPUT *mi);
BOOL FASTCALL IntKeyboardInput(KEYBDINPUT *ki);
BOOL UserInitDefaultKeyboardLayout();
PKBL UserHklToKbl(HKL hKl);
#define ThreadHasInputAccess(W32Thread) \
(TRUE)

View file

@ -308,7 +308,7 @@ PKBL W32kGetDefaultKeyLayout(VOID)
return pKbl;
}
static PKBL UserHklToKbl(HKL hKl)
PKBL UserHklToKbl(HKL hKl)
{
PKBL pKbl = KBLList;
do

View file

@ -1007,12 +1007,11 @@ UserGetKeyboardType(
DWORD
STDCALL
NtUserVkKeyScanEx(
DWORD wChar,
DWORD KeyboardLayout,
WCHAR wChar,
ULONG_PTR KeyboardLayout,
DWORD Unknown2)
{
/* FAXME: currently, this routine doesnt seem to need any locking */
/* FIXME: currently, this routine doesnt seem to need any locking */
PKBDTABLES KeyLayout;
PVK_TO_WCHAR_TABLE vtwTbl;
PVK_TO_WCHARS10 vkPtr;
@ -1020,9 +1019,11 @@ NtUserVkKeyScanEx(
int nMod;
DWORD CapsMod = 0, CapsState = 0;
DPRINT("NtUserVkKeyScanEx() wChar %d, KbdLayout 0x%p\n", wChar, KeyboardLayout);
if(!KeyboardLayout)
return -1;
KeyLayout = (PKBDTABLES) KeyboardLayout;
KeyLayout = UserHklToKbl((HKL)KeyboardLayout)->KBTables;
for (nMod = 0; KeyLayout->pVkToWcharTable[nMod].nModifications; nMod++)
{