Author: greatlrd
Date: Sun Feb 4 19:01:25 2007
New Revision: 25711
URL:
http://svn.reactos.org/svn/reactos?rev=25711&view=rev
Log:
merge down 25710 change from trunk : implement NtUserGetKeyboardLayoutName tested in 0.3.1
and works fine, it is one step closer to fix ibrowers typing bug
Modified:
branches/ros-branch-0_3_1/reactos/subsystems/win32/win32k/ntuser/keyboard.c
Modified: branches/ros-branch-0_3_1/reactos/subsystems/win32/win32k/ntuser/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/subsys…
==============================================================================
--- branches/ros-branch-0_3_1/reactos/subsystems/win32/win32k/ntuser/keyboard.c
(original)
+++ branches/ros-branch-0_3_1/reactos/subsystems/win32/win32k/ntuser/keyboard.c Sun Feb 4
19:01:25 2007
@@ -1263,10 +1263,38 @@
NtUserGetKeyboardLayoutName(
LPWSTR lpszName)
{
- UNIMPLEMENTED
-
- return 0;
-}
+ BOOL ret = FALSE;
+ LCID LocaleId;
+ WCHAR LocaleBuffer[16];
+ NTSTATUS Status;
+
+
+ UserEnterExclusive();
+
+ DPRINT("Enter NtUserGetKeyboardLayoutName\n");
+
+ Status = ZwQueryDefaultLocale(FALSE, &LocaleId);
+ if (NT_SUCCESS(Status))
+ {
+ swprintf(LocaleBuffer, L"%08lx", LocaleId);
+ DPRINT("LocaleId : %08lx\n",LocaleId);
+ _SEH_TRY
+ {
+ ProbeForWrite(lpszName, 16, 1);
+ RtlCopyMemory(lpszName,LocaleBuffer,16);
+ ret = TRUE;
+ }
+ _SEH_HANDLE
+ {
+ SetLastNtError(_SEH_GetExceptionCode());
+ ret = FALSE;
+ }
+ _SEH_END;
+ }
+ UserLeave();
+ return ret;
+}
+
HKL FASTCALL
UserGetKeyboardLayout(