Add SetThreadUILanguage, SetThreadPreferredUILanguages and GetThreadUILanguage in c.s.j.p.win32.Kernel32#1514
Conversation
matthiasblaesing
left a comment
There was a problem hiding this comment.
In general looks good to me. I left a few inline comments.
contrib/platform/src/com/sun/jna/platform/win32/Kernel32Util.java
Outdated
Show resolved
Hide resolved
- Bind SetThreadUILanguage, SetThreadPreferredUILanguages and GetThreadUILanguage in c.s.j.p.win32.Kernel32 - test is written - update CHANGES.md - remove unused imports in Kernel32.java
e935d9c to
f9e5f5b
Compare
|
Thanks for the review, supposedly everything has been fixed. |
|
@overpathz thank you for the updates. I pushed the PR to appveyor and got a test failure on x86 (32bit JDK): https://ci.appveyor.com/project/matthiasblaesing/jna/builds/46657755/job/vf95hkhb08ax9cyx#L2772 The second thing I'd like to ask is whether it is possible to test |
|
Yes, thanks, I looked at the test. But unfortunately, at the moment I cannot continue the investigate/implementation due to the fact that the machine with Windows has broken, now only mac. Therefore, the contribution continues when a new laptop is purchased. Thanks for understanding. |
Hi.
The SetThreadUILanguage function sets the user interface language for the current thread, which can be useful in situations where you need to ensure consistent language settings across an application. In my project, we are currently calling this function from C++ before starting the Java application, which adds overhead and creates inconsistency.
By adding the SetThreadUILanguage function to Kernel32, you can call it directly from Java code, which would streamline your application's startup process and ensure that language settings are consistent throughout the application. This would eliminate the need to call the function from C++ and would make the code easier to maintain and update.