[WIN32K]
[reactos.git] / reactos / subsystems / win32 / win32k / ntuser / keyboard.c
index 075d793..04be007 100644 (file)
@@ -430,7 +430,6 @@ IntTranslateKbdMessage(LPMSG lpMsg,
    MSG NewMsg = { 0 };
    PKBDTABLES keyLayout;
    BOOL Result = FALSE;
-   DWORD ScanCode = 0;
 
    pti = PsGetCurrentThreadWin32Thread();
    keyLayout = pti->KeyboardLayout->KBTables;
@@ -456,8 +455,6 @@ IntTranslateKbdMessage(LPMSG lpMsg,
         return TRUE;
     }
 
-   ScanCode = (lpMsg->lParam >> 16) & 0xff;
-
    UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff,
                            gQueueKeyStateTable, wp, 2, 0,
                            keyLayout );
@@ -742,7 +739,7 @@ NtUserToUnicodeEx(
       OutPwszBuff = ExAllocatePoolWithTag(NonPagedPool,sizeof(WCHAR) * cchBuff, TAG_STRING);
       if( !OutPwszBuff )
       {
-         DPRINT1( "ExAllocatePool(%d) failed\n", sizeof(WCHAR) * cchBuff);
+         DPRINT1( "ExAllocatePoolWithTag(%d) failed\n", sizeof(WCHAR) * cchBuff);
          RETURN(0);
       }
       RtlZeroMemory( OutPwszBuff, sizeof( WCHAR ) * cchBuff );
@@ -944,6 +941,12 @@ W32kKeyProcessMessage(LPMSG Msg,
          VscVkTable = KeyboardLayout->pVSCtoVK_E1;
       }
 
+      if (!VscVkTable)
+      {
+          DPRINT1("somethings wrong, Prefix=0x%x", Prefix);
+          return;
+      }
+
       RawVk = 0xff;
       while (VscVkTable->Vsc)
       {