This is an undocumented API used by some programs to fetch the user's selected languages.
Example is Fusion360 (during its login process).
Signature currently taken from here: https://stackoverflow.com/questions/63877075/what-is-the-right-way-to-get-th... (Maybe that stackoverflow answer is also why Fusion has implemented this...) And I haven't found a way yet to retrieve a result that is not static.
-- v2: bcp47langs: Implement GetUserLanguages
From: Marius Schiffer marius@mschiffer.de
This is an undocumented API used by some programs to fetch the user's selected languages --- dlls/bcp47langs/Makefile.in | 3 +++ dlls/bcp47langs/bcp47langs.spec | 2 +- dlls/bcp47langs/main.c | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 dlls/bcp47langs/main.c
diff --git a/dlls/bcp47langs/Makefile.in b/dlls/bcp47langs/Makefile.in index 5eb4caaf0e7..1c73a895909 100644 --- a/dlls/bcp47langs/Makefile.in +++ b/dlls/bcp47langs/Makefile.in @@ -1,2 +1,5 @@ MODULE = bcp47langs.dll IMPORTLIB = bcp47langs +IMPORTS = combase + +SOURCES = main.c diff --git a/dlls/bcp47langs/bcp47langs.spec b/dlls/bcp47langs/bcp47langs.spec index a054c1486a9..969f77b56b8 100644 --- a/dlls/bcp47langs/bcp47langs.spec +++ b/dlls/bcp47langs/bcp47langs.spec @@ -48,7 +48,7 @@ @ stub GetUserDisplayLanguageOverride @ stub GetUserLanguageInputMethods @ stub GetUserLanguageInputMethodsForUser -@ stub GetUserLanguages +@ stdcall GetUserLanguages(long ptr) @ stub GetUserLanguagesForAllUsers @ stub GetUserLanguagesForUser @ stub GetUserLocaleFromLanguageProfileOptOut diff --git a/dlls/bcp47langs/main.c b/dlls/bcp47langs/main.c new file mode 100644 index 00000000000..f79c27dbf02 --- /dev/null +++ b/dlls/bcp47langs/main.c @@ -0,0 +1,8 @@ +#include <hstring.h> +#include <winstring.h> + +int WINAPI GetUserLanguages(char Delimiter, HSTRING* UserLanguages) { + static const WCHAR* languages = L"eng"; + WindowsCreateString(languages, wcslen(languages), UserLanguages); + return 0; +}
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147255
Your paranoid android.
=== debian11b (64 bit WoW report) ===
Report validation errors: dxgi:dxgi has unaccounted for todo messages dxgi:dxgi has unaccounted for skip messages The report seems to have been truncated