Thomas :
ZwQueryDefaultLocale is located in ntoskrnl
and it is call on NtQueryDefaultLocale check by my self
let us take a look at NtUserGetKeyboardLayoutName
1. it return a keyboard name the keyboard name is
the current active Keyboard LCID
to optain it we can use ZwQueryDefaultLocale
(check reactos code in ntoskrnl how it works)
so let us use ZwQueryDefaultLocale to optain the
current activate keyboard with follow call
ZwQueryDefaultLocale(FALSE, &LocaleId);
what happen then let us take a look at ZwQueryDefaultLocale
if (UserProfile)
*DefaultLocaleId = PsDefaultThreadLocaleId;
else
*DefaultLocaleId = PsDefaultSystemLocaleId;
return DefaultLocaleId;
etiher we get current threed local or local system keyboard LCID with this call
depns on it is current user or not. depns what we whant.
so it is a correct impement to use it.
now we can check other thing as well
please check how it works in ntoskrnl in ex/local.c then we can talk how it
works.