59 Commits
Author SHA1 Message Date
Timo Kreuzer 5635d244fc [KERNEL32] Add support for UTF-16 surrogate pairs to MultiByteToWideChar 2026-05-26 20:58:29 +00:00
Mikhail Tyukinandbuddyjojo 3518663767 [COMBASE][COML2] Sync to wine-10.0
Co-Authored-By: buddyjojo <[email protected]>
2026-03-01 10:38:42 +02:00
Justin MillerandHermès BÉLUSCA - MAÏTO c81bc9f21e [KERNEL32] Split off some ANSI functions from the bulk of Kernel32 (#8555)
* [KERNEL32] Split off some ANSI functions from the bulk of Kernel32

Co-authored-by: Hermès BÉLUSCA - MAÏTO <[email protected]>
2026-02-14 04:13:23 +00:00
Timo Kreuzer f49eccef01 [KERNEL32] Fix alignment of a security descriptor
Fixes boot of release builds. See CORE-20432
2026-01-15 10:26:14 +02:00
Timo Kreuzer 06414ac85a [KERNEL32_VISTA] Implement IsValidLocaleName 2025-06-19 17:36:40 +00:00
Timo Kreuzer a8987adb67 [KERNEL32_VISTA] Move GetLocaleInfoEx from locale.c into a separate file
This allows to have it in kernel32_vista
2025-06-19 17:36:40 +00:00
Timo Kreuzer 5225c75d3b [KERNEL32_VISTA] Move EnumSystemLocalesEx from locale.c into a separate file
This allows to have it in kernel32_vista
2025-06-19 17:36:40 +00:00
Timo Kreuzer 48ec990a49 [KERNEL32_VISTA] Implement LCIDToLocaleName 2025-06-19 17:36:40 +00:00
Timo Kreuzer 7c1b7ee87d [KERNEL32_VISTA] Implement LocaleNameToLCID 2025-06-19 17:36:40 +00:00
Timo Kreuzer e83eccee31 [KERNEL32] Zero out CPINFO in GetCPInfo 2025-06-19 17:36:40 +00:00
Timo Kreuzer 189ce2a5a6 [KERNEL32_VISTA] Implement GetUserDefaultLocaleName 2025-06-19 17:36:40 +00:00
Timo Kreuzer c7eba0c5c7 [SDK] Improve definition of (RTL_)CRITICAL_SECTION_DEBUG 2025-03-27 12:50:40 +00:00
Katayama Hirofumi MZ fe11f7a2e5 [REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Timo Kreuzer bf95874c2d [REACTOS] Improve handling of non-standard names
- Link oldnames instead of defining names
- Define _CRT_DECLARE_NONSTDC_NAMES to 1 where needed
- Remove header hacks
2024-10-20 14:12:25 +03:00
Timo Kreuzer bd9bb36b18 [KERNEL32] Reduce diff to wine-3.3 2024-05-03 16:10:00 +02:00
winesync c08580dee3 [WINESYNC] kernel32: Don't return a parent locale for neutral locales in GetLocaleInfoEx.
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id c63a08586f19af7e6a65a064696743f648006fcd by Alexandre Julliard <[email protected]>
2024-05-03 16:10:00 +02:00
winesync 90c0562935 [WINESYNC] kernel32: Keep the sublanguage specified by the script name when looking for the default.
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id c5a39bd98f5388d48b728d19ce466665fa37bfbd by Alexandre Julliard <[email protected]>
2024-05-03 16:10:00 +02:00
winesync b46bf67c2e [WINESYNC] kernel32: Add stub for ResolveLocaleName.
Signed-off-by: Jactry Zeng <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id b9a9fe4a042f98521efea3275ded4af4b7cba4c9 by Jactry Zeng <[email protected]>
2024-05-03 16:10:00 +02:00
winesync a8d367089c [WINESYNC] kernel32: Improve locale detection on Android.
setlocale is coded to just return 'C' for all inquiries ignoring locale
that may be set in the environment.

Signed-off-by: Aric Stewart <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 9dc5d299f11c599862d39af3e32d92e787c1ae7b by Aric Stewart <[email protected]>
2024-05-03 16:10:00 +02:00
winesync 535fffd824 [WINESYNC] kernel32: Check for invalid flags in codepage conversion functions.
Signed-off-by: Alex Henrie <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 0b95ebd283986fa179c7ec6d2ea3f34c977c3aaf by Alex Henrie <[email protected]>
2024-05-03 16:10:00 +02:00
winesync 544f114459 [WINESYNC] kernel32: Use different default sublangs for Spanish and Chinese.
Signed-off-by: Andrew Eikum <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 7737693693ca46a88c41cfeab95d2b65423d8e51 by Andrew Eikum <[email protected]>
2024-05-03 16:10:00 +02:00
winesync a3102dc0dd [WINESYNC] kernel32: Improved GetUserPreferredUILanguages stub.
Implementation and tests are based on GetSystemPreferredUILanguages.

Signed-off-by: Jacek Caban <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 26d0105cd8a8ce1131033f1871de0dd9a7b4c43c by Jacek Caban <[email protected]>
2024-05-03 16:10:00 +02:00
winesync 6f4d2924f0 [WINESYNC] kernel32: Fixed handling LOCALE_NAME_USER_DEFAULT in GetLocaleInfoEx.
Signed-off-by: Jacek Caban <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>

wine commit id 505406fc83b65dd1f9ebcbaabb582f0fabec1b0a by Jacek Caban <[email protected]>
2024-05-03 16:10:00 +02:00
winesync 8c0ffa6f18 [WINESYNC] Assorted spelling/grammar fixes.
wine commit id 1e214eb5d354ffbb64699686913a5eb61998ed78 by Frédéric Delanoy <[email protected]>
2024-05-03 16:10:00 +02:00
Timo Kreuzer f70a1d03b0 [KERNEL32] Import GetLocaleInfoEx from wine-1.9.17 2024-05-03 16:10:00 +02:00
Timo Kreuzer b01b6926a4 [KERNEL32] locale.c: Reduce diff to wine-1.9.17 2024-05-03 16:10:00 +02:00
Timo Kreuzer 98c4379291 [KERNEL32] locale.c: Move functions to match wine order 2024-05-03 16:10:00 +02:00
Timo Kreuzer 3016060883 [KERNEL32] Rename lang.c to locale.c as in wine 2024-05-03 16:10:00 +02:00
Timo Kreuzer 3a0b53386c [KERNEL32] Add CompareStringOrdinal from wine-3.21 2023-08-20 15:17:41 +03:00
Timo Kreuzer 2549e10c38 [KERNEL32] Export more Vista APIs
Create kernel32_vista_static library and link both kernel32_vista and kernel32 to it.
Export some vista functions from kernel32.
Export BaseProcessInitPostImport for Vista+, too, because ntdll needs to dynamically link to it.
2023-08-11 19:00:42 +03:00
Katayama Hirofumi MZ 13b1eadebb [KERNEL32] LCMapString: Convert Chinese characters (#5316)
* [KERNEL32] LCMAP_SIMPLIFIED_CHINESE and LCMAP_TRADITIONAL_CHINESE

* fix

* improve

* reduce data

* improve
2023-06-04 21:46:01 +09:00
Katayama Hirofumi MZ 3f5bcf5775 [KERNEL32] LCMapString: Fullwidth/halfwidth conversion (#5206)
- Add file dll/win32/kernel32/winnls/string/dakuten.h.
- Add file dll/win32/kernel32/winnls/string/full2half.h.
- Support LCMAP_FULLWIDTH and LCMAP_HALFWIDTH in LCMapString.
CORE-11700
2023-04-01 11:33:36 +09:00
Katayama Hirofumi MZ 0569bbd4a7 [KERNEL32] LCMapString: Sync to Wine a little (#5203)
Preparation for LCMAP_FULLWIDTH and LCMAP_HALFWIDTH support.
Slightly synchronize lang.c to locale.c in Wine's dlls/kernelbase.
CORE-11700
2023-03-28 21:09:27 +09:00
Katayama Hirofumi MZ ab5aff5948 [KERNEL32] Follow-up of #5200 (5d1ae45)
Add "Voiced Iteration Marks" to convert.
CORE-11700
2023-03-28 10:00:22 +09:00
Katayama Hirofumi MZ 5d1ae45b83 [KERNEL32] LCMapString: Hiragana/Katakana conversion (#5200)
Implement LCMAP_KATAKANA and LCMAP_HIRAGANA flags. CORE-11700
2023-03-28 08:37:17 +09:00
Hermès Bélusca-Maïto d8cc88ca80 [KERNEL32][BASESRV] Fix interoperability with Win2k3 regarding NLS section security. (#4828)
Partially revert some aspects of commits 5696e4ba4 and bf40c7a31.
(See PR #4340.)

In order for Win2k3 kernel32.dll to operate with our basesrv.dll (or our
kernel32.dll to operate with Win2k3 basesrv.dll), we need in particular
to have the CreateNlsSecurityDescriptor() helper to exactly take the
expected parameters. Namely, a pointer to a **user-allocated**
SECURITY_DESCRIPTOR buffer, its size (and an access mask).

The function expects its caller to provide all this, and the caller expects
the function to initialize the security descriptor buffer. Note that the
function does *NOT* allocate a new descriptor buffer to be returned!

Indeed, with the way it currently is in master, using Win2k3 kernel32
with our basesrv is now failing with the errors:
```
NLSAPI: Could NOT Create ACL - c0000023.
(subsystems/win/basesrv/nls.c:279) NLS: CreateNlsSecurityDescriptor FAILED!: c0000023
NLSAPI: Could NOT initialize Server - c0000023.
(dll/ntdll/ldr/ldrinit.c:867) LDR: DLL_PROCESS_ATTACH for dll "kernel32.dll" (InitRoutine: 77E40D95) failed
```
(and, if we ever attempted to increase the so-claimed "dummy parameter"
descriptor size in the basesrv call, we would end up with its stack
corrupted and a crash).
Conversely, using our kernel32 with Win2k3 basesrv, would end up with
basesrv receiving a wrongly-initialized descriptor that would not work
(the buffer not being initialized with the contents of a descriptor, but
instead receiving some address to a descriptor allocated somewhere else).
2022-11-01 02:34:04 +01:00
George Bișoc bf40c7a310 [KERNEL32] Let KERNEL32 assign security to NLS section names
Currently Kernel32 doesn't make any server call to Basesrv in order to create NLS section names, instead it's Kernel32 itself that handles the job of NLS section names. With that said, let Kernel32 assign a security descriptor to NLS section names. See the FIXME comment on code for further dtails
2022-05-06 10:09:49 +02:00
George Bișoc 5696e4ba4d [KERNEL32][BASESRV] Implement NLS section security
Implement code that deals with the security side of NLS, more specifically, create two security descriptors for NLS directory and NLS section names and let the server use such code.
2022-05-06 10:09:49 +02:00
Katayama Hirofumi MZ 581757d861 [KERNEL32_APITEST] Improve MultiByteToWideChar testcase
- Fix WinXP and ReactOS cases.

CORE-13349

NOTE: We use Win10's MultiByteToWideChar behaviour due to security reason.
2021-12-10 12:24:41 +09:00
Thomas Faber 0af3689c2e [REACTOS] Fix traces with missing arguments.
Courtesy of VS Code Analysis warning C6064:
Missing integer argument to 'DbgPrint' that corresponds to conversion specifier 'N'.
2021-11-21 12:57:35 -05:00
Stanislav Motylkov 4278f46620 [KERNEL32][WINNLS] GetGeoInfoW: Allow to get localized text
Previous implementation ignored the last LangId parameter,
and always used GetUserDefaultLCID() instead.
2021-10-24 23:42:06 +03:00
Hermès Bélusca-Maïto 9393fc320e [FORMATTING] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
2021-09-13 03:52:22 +02:00
Kyle Katarn c1fad34755 [WINNLS] Fix of GetCurrencyFormatW to handle "32" grouping format (#2719) 2020-05-10 08:34:35 +02:00
Katayama Hirofumi MZ ccc52d2e5b [KERNEL32] Fix multibyte conversion in default char (#2111)
Fix kernel32!MultiByteToWideChar function. The default character was wrong. CORE-16468
2019-11-30 15:10:10 +09:00
Katayama Hirofumi MZ a63678c9a9 [KERNEL32] Fix MultiByteToWideChar(CP_UTF8, ...) (#2007)
CP_UTF8 validation was not strict. 5- or 6-byte length sequences are invalid in RFC 3629 UTF-8. CORE-16468

- Fix MultiByteToWideChar(CP_UTF8, ...) by making check strict.
2019-11-02 14:16:26 +09:00
Katayama Hirofumi MZ 083d6be31e [KERNEL32] Implement InvalidateNLSCache 2019-04-16 21:41:58 +09:00
Katayama Hirofumi MZ a004233bd3 [KERNEL32] Fix handle leak and caching (follow-up of 7e38267) 2019-04-16 20:57:02 +09:00
Katayama Hirofumi MZ 7e3826786e [KERNEL32] Era first year is GANNEN 2019-04-16 11:10:00 +09:00
Katayama Hirofumi MZ 15537c3bbe [KERNEL32] Support Japanese calendar (#1482)
Implement the Japanese calendar in kernel32. Locale info and date formatting. CORE-15920
2019-04-07 20:20:23 +09:00
Katayama Hirofumi MZ c7bebe40cb [KERNEL32] Improve MultiByteToWideChar (#1477)
Reduce MultiByteToWideChar failures. CORE-13349
2019-04-06 20:11:07 +09:00