https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a94436b5194ca86fedc75…
commit a94436b5194ca86fedc759c63f79653c85e281a0
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Jan 21 18:01:29 2022 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Feb 8 15:58:04 2022 +0100
[KERNEL32] SetThreadUILanguage(): Validate the parameter. Use LANGIDFROMLCID() macro.
(#4301)
Both ReactOS and Win2k3 only support '0' for the parameter.
---
dll/win32/kernel32/client/thread.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dll/win32/kernel32/client/thread.c b/dll/win32/kernel32/client/thread.c
index be33021fcf3..6d31a1b394d 100644
--- a/dll/win32/kernel32/client/thread.c
+++ b/dll/win32/kernel32/client/thread.c
@@ -935,8 +935,19 @@ LANGID
WINAPI
SetThreadUILanguage(IN LANGID LangId)
{
+#if (NTDDI_VERSION < NTDDI_LONGHORN)
+ /* We only support LangId == 0, for selecting a language
+ * identifier that best supports the NT Console. */
+ if (LangId != 0)
+ {
+ BaseSetLastNTError(STATUS_NOT_SUPPORTED);
+ return 0;
+ }
+#endif
+
UNIMPLEMENTED;
- return (LANGID)NtCurrentTeb()->CurrentLocale;
+
+ return LANGIDFROMLCID(NtCurrentTeb()->CurrentLocale);
}
/*