magnus(a)itkonsult-olsen.com wrote:
  some example
 ZwQueryDefaultLocale is located in ntoskrnl  it call on  NtQueryDefaultLocale
 it is to get current keyboard name  file ntoskrnl/ex/locale.c 
No it's not.
  in that file it exists all api to get and set the a
keyboard. 
locale != keyboard
  a keyboard are being loading either from user mode or
kmode.
 in kmode it is loading by ntoskrnl or win32k depns on the case
 which keyboard that is active are set by ntoskrnl not win32k
 to get defult or current keyboard is the ntoskrnl jobb not win32k
 so on. 
they keyboard may(!) be selected by win32k depending on the thread's locale
  we need using same api as windows and same prototype.
 even undocument thing. but what I provide is a start to use it.
 but not complete what I did give about NtUser* so change it to 7 param
 and use the protoype I gave u. use the x2 and x6 I put in, so we can change
 it to same as windows when we got more informations how it works. I do not have
 time to dig after any more doc about it. 
I don't see a reason why NtUser* has to match since it's no publicly
documented interface any may be altered at any time.
  use the Zw* api when u call on ntoskrnl from win32k.
It can't be generalized, it depends on the context.
  and the keyboard work are split betwin user32.dll,
win32k.sys, ntoskrnl. 
They keyboard selection code is mainly a user32/win32k thing, ntoskrnl
isn't directly involved.
- Thomas