microsoft / microsoft/win32metadata
Predefined locale values are missing
- Dominant language
- C++
- Stars
- 1.5k
- Forks
- 149
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 4
Description
The official docs for [`GetLocaleInfoW()`](https://learn.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getlocaleinfow) list a number of constants for the first parameter that aren't in the `windows` crate.
Maybe it's because the top of the page says [`GetLocaleInfoEx()`](https://learn.microsoft.com/en-us/windows/desktop/api/winnls/nf-winnls-getlocaleinfoex) should be used instead (by why is the old function available then?). But for that new function, I also found the missing value `LOCALE_NAME_USER_DEFAULT`.
---
BTW: The official docs for [`GetLocaleInfoEx()`](https://learn.microsoft.com/en-us/windows/desktop/api/winnls/nf-winnls-getlocaleinfoex) also contain an easily misunderstood statement, or one that you first have to think of as a documentation error:
> The buffer that receives the value must be at least the length of a DWORD value, which is 2.
By "2", they mean 2 wide chars, so 4 bytes.
Contributor guide
Research direction
Start by comparing the documented constants for GetLocaleInfoW() and GetLocaleInfoEx() with the Windows metadata generated by this repository, paying particular attention to LOCALE_NAME_USER_DEFAULT. Confirm which predefined locale values are absent and verify that the corrected generated metadata exposes them; the buffer-size wording is a separate documentation concern.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100