[WIN32K]
[reactos.git] / reactos / win32ss / user / ntuser / kbdlayout.c
index a6d20c5..5d3c633 100644 (file)
@@ -9,6 +9,9 @@
  */
 
 #include <win32k.h>
+
+#include <winnls.h>
+
 DBG_DEFAULT_CHANNEL(UserKbdLayout);
 
 PKL gspklBaseLayout = NULL;
@@ -235,7 +238,7 @@ UserLoadKbdLayout(PUNICODE_STRING pwszKLID, HKL hKL)
        pKl->iBaseCharset = cs.ciCharset;
        pKl->dwFontSigs = cs.fs.fsCsb[0];
        pKl->CodePage = (USHORT)cs.ciACP;
-       TRACE("Charset %d Font Sig %d CodePage %d\n", pKl->iBaseCharset, pKl->dwFontSigs, pKl->CodePage);
+       TRACE("Charset %u Font Sig %lu CodePage %u\n", pKl->iBaseCharset, pKl->dwFontSigs, pKl->CodePage);
     }
     else
     {
@@ -472,7 +475,10 @@ NtUserGetKeyboardLayoutList(
     UserEnterShared();
 
     if (!gspklBaseLayout)
+    {
+        UserLeave();
         return 0;
+    }
     pKl = gspklBaseLayout;
 
     if (nBuff == 0)
@@ -695,7 +701,7 @@ NtUserActivateKeyboardLayout(
 
     if (!pKl)
     {
-        ERR("Invalid HKL %x!\n", hKl);
+        ERR("Invalid HKL %p!\n", hKl);
         goto cleanup;
     }
 
@@ -741,7 +747,7 @@ NtUserUnloadKeyboardLayout(
     if (pKl)
         bRet = UserUnloadKbl(pKl);
     else
-        ERR("Invalid HKL %x!\n", hKl);
+        ERR("Invalid HKL %p!\n", hKl);
 
     UserLeave();
     return bRet;