https://git.reactos.org/?p=reactos.git;a=commitdiff;h=20e23bbfcdcc1bb4efc3b…
commit 20e23bbfcdcc1bb4efc3b0a92bbd3053c5eb9c6f
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Jan 21 17:09:53 2022 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Feb 8 15:56:39 2022 +0100
[NTOS:EX] ExpGet/SetCurrentUserUILanguage() take pointer to const string. Add an
implementation note to NtQueryDefaultUILanguage().
---
ntoskrnl/ex/locale.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/ex/locale.c b/ntoskrnl/ex/locale.c
index 9e0f57aa458..b8abb886031 100644
--- a/ntoskrnl/ex/locale.c
+++ b/ntoskrnl/ex/locale.c
@@ -21,14 +21,14 @@ LCID PsDefaultSystemLocaleId = 0x00000409;
LANGID PsInstallUILanguageId = LANGIDFROMLCID(0x00000409);
/* UI/Thread IDs: Same as system */
-LANGID PsDefaultUILanguageId = 0x00000409;
-LCID PsDefaultThreadLocaleId = LANGIDFROMLCID(0x00000409);
+LCID PsDefaultThreadLocaleId = 0x00000409;
+LANGID PsDefaultUILanguageId = LANGIDFROMLCID(0x00000409);
/* PRIVATE FUNCTIONS *********************************************************/
NTSTATUS
NTAPI
-ExpGetCurrentUserUILanguage(IN PWSTR MuiName,
+ExpGetCurrentUserUILanguage(IN PCWSTR MuiName,
OUT LANGID* LanguageId)
{
UCHAR ValueBuffer[256];
@@ -101,7 +101,7 @@ ExpGetCurrentUserUILanguage(IN PWSTR MuiName,
NTSTATUS
NTAPI
-ExpSetCurrentUserUILanguage(IN PWSTR MuiName,
+ExpSetCurrentUserUILanguage(IN PCWSTR MuiName,
IN LANGID LanguageId)
{
OBJECT_ATTRIBUTES ObjectAttributes;
@@ -426,6 +426,7 @@ NtQueryDefaultUILanguage(OUT LANGID* LanguageId)
else
{
/* Failed, use fallback value */
+ // NOTE: Windows doesn't use PsDefaultUILanguageId.
*LanguageId = PsInstallUILanguageId;
}
}