Commit graph

137 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto a94436b519
[KERNEL32] SetThreadUILanguage(): Validate the parameter. Use LANGIDFROMLCID() macro. (#4301)
Both ReactOS and Win2k3 only support '0' for the parameter.
2022-02-08 15:58:04 +01:00
Hermès Bélusca-Maïto 3e44a5d71c
[KERNEL32][CONSRV] Retrieve the best-suited language ID corresponding to the active console output code page. (#4301)
CORE-17601, CORE-17803
Replaces PR #4281.

Implement SrvGetConsoleLangId() (server-side) and set the new current
thread's locale after connecting to a console, or changing its output
code page.

Based on API tracing on Windows 2003, as well as on comments and code
gathered from: https://github.com/microsoft/terminal

Tests results are listed in PR #4301.
2022-02-08 15:58:02 +01:00
Serge Gautherie 1944d7b71b [KERNEL32] HeapCreateTagsW(): Sync' types and add annotations
See RtlCreateTagHeap().
2022-02-03 20:21:40 +01:00
Chan Chilung 171a920680
[TRANSLATION] Update Chinese Traditional (zh-TW) translation (#4154)
- Added translation for:
  - [W32TIME]
  - [MODE]
  - [TIMEOUT]
  - [MODEMUI]
  - [ARPING]
  - [FRAGINATOR]
  - and more
- Updated existing translation
- [WINNLS] Update cht (zh-TW) and zhh (zh-HK)
- [DOC] Update rules in Chinese translation notes.txt
- Wine translation sync

Some of the punctuation use in WIne has been converted to half-width,
so the punctuation will no longer synced.
2022-01-14 20:22:46 +03:00
Hermès Bélusca-Maïto afb04208f7
[KERNEL32] Add missing NTOS_MODE_USER when including the NDK. 2022-01-11 22:45:15 +01:00
Eric Kohl cf8380100e [KERNEL32] SetComputerNameExW: Truncate the computer name
This fixes the SetComputerNameExW api test.
2021-12-12 17:40:52 +01: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
Hermès Bélusca-Maïto d6d30f9e05
[KERNEL32] Don't hardcode some types in sizeofs, and some flag values. 2021-11-28 00:26:42 +01:00
Jose Carlos Jesus b3c6407d6e
[SYSSETUP][USETUP] [NLS] Update pt-PT translation (#4120)
- NLS: Change weekdays name to capital letter.
- USETUP: Fix typos to pt-PT translation.

- SYSSETUP: Update pt-PT translation.
  + Sync IDS_USER_ADMINISTRATOR_NAME and IDS_ADMINISTRATOR_NAME (in samsrv).
2021-11-24 01:57:11 +01: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
Oleg Dubinskiy 334ab0f2a5 [KERNEL32] Implement SetFileCompletionNotificationModes
Call native Nt* function to do the actual work, similarly to as it done in Wine: 530c183960:/dlls/kernel32/file.c#l258.
Also add/fix some declarations in internal kernel32/public ndk neaders, to fix compilation.
CORE-17821
2021-10-23 16:19:22 +02:00
Süleyman Poyraz 05c39d8d62
[TRANSLATION] Update Turkish (tr-TR) translations (#3958)
Reviewed-by: Can Taşan <ctasan99@hotmail.com>
Signed-off-by: Süleyman Poyraz <zaryob.dev@gmail.com>
2021-10-10 16:00:12 +03:00
Victor Perevertkin 655ddfa8e2
[KERNEL32] FindFirstFileExW: fix syscall buffer alignment
NtQueryDirectoryFile required the FileInformation buffer to be
ULONG-aligned. Declare the aligned buffer explicitly.
2021-09-14 17:58:22 +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
Hermès Bélusca-Maïto bbabe2489e
[FORMATTING][TRANSLATION] Remove trailing whitespace. Addendum to 34593d93.
Excluded: 3rd-party code (incl. wine).
2021-09-13 03:52:21 +02:00
Süleyman Poyraz 53221834c5
[TRANSLATION] Add and improve Turkish (tr-TR) translation (#3561)
Reviewed-by: Can Taşan <ctasan99@hotmail.com>
Reviewed-by: Ercan Ersoy <ercanersoy@ercanersoy.net>
Signed-off-by: Süleyman Poyraz <zaryob.dev@gmail.com>
2021-09-12 00:34:11 +03:00
Timo Kreuzer 41bc57ddf0 [REACTOS] Silence warnings in 3r-party code 2021-07-23 22:03:48 +02:00
Timo Kreuzer 5d8e834897 [REACTOS] Fix a number of MSVC warnings 2021-07-23 22:03:48 +02:00
Mark Jansen b58c3d73ca
[RTL][KERNEL32] Move the STUB printing code to a place where it's actually called 2021-05-22 16:33:19 +02:00
Jérôme Gardou 523912536e [KERNEL32] Sync NLS RC files with wine 6.7
Mostly for having them UTF-8 encoded
2021-05-03 22:00:57 +02:00
Serge Gautherie 249f2388bd
[REACTOS] Fix parameter types on some exports (#3217)
Fix some wrong parameter types on some exports in NTDLL, KERNEL32, WTSAPI32, and NTOSKRNL.
2021-05-01 21:11:34 +02:00
Jérôme Gardou e470b58376 [REACTOS] Explicitly link against pseh & include pseh headers in a few places 2021-04-28 13:10:23 +02:00
Chan Chilung 6b700c6af1
[TRANSLATION] Chinese Traditional (zh-TW) translation update (#3526)
*Add Chinese Traditional translation for:
- [THEMES]
- [HIVESFT]
- [HIVEDEF]
- [HIVECLS]
- [SCREENSAVERS]
- [VGAFONTEDIT]
- [KERNEL32]
- [TASKLIST]
- [MYDOCS]
- [MSXML3R]
- INFs

*Chinese Traditional translation update for:
PR 3399
- [MSGINA]
- [SHELL32]

PR 3422
- [SOLITAIRE]

Others...

*Wine translation sync
2021-04-11 10:59:19 +02:00
Colin Finck fd8080b094
[KERNEL32] Align the PROCESS_PRIORITY_CLASS variable in GetPriorityClass on a 4-byte boundary.
Fixes CORE-16757.
This is required for NtQueryInformationProcess as proven by my test application in the bug report.
2021-02-20 17:13:38 +01:00
Victor Perevertkin 46ca069e42
[XDK] Remove UNREFERENCE_LOCAL_VARIABLE macro
Change UNREFERENCED_PARAMETER to (VOID)P to support const parameters
2021-01-19 00:15:02 +03:00
Timo Kreuzer 8df1bd612a [KERNEL32] Fix register initialization in BaseInitializeContext
Get rid of BaseThreadStartupThunk and BaseProcessStartThunk asm wrappers and go to the C functions directly (home space is allocated on the stack by the kernel)
2020-11-07 18:33:02 +01:00
Timo Kreuzer d8b5c00c33 [KERNEL32_VISTA] Move vista.c from kernel32 to kernel32_vista
- Remove duplicated functions
- Use AreFileApisANSI() instead of global variable bIsFileApiAnsi in shared kernel32_shared
2020-09-25 09:45:54 +02:00
Timo Kreuzer fcd83242d4 [KERNEL32] Move some functions into a static library to be shared between kernel32 and kernel32_vista 2020-09-25 09:45:54 +02:00
Timo Kreuzer 4e72da0858 [KERNEL32_VISTA] Move under kernel32 2020-09-25 09:45:54 +02:00
Katayama Hirofumi MZ 378b26ce27
[KERNEL32] Improve SetComputerNameExW (#3171)
Reduce failures of kernel32_apitest SetComputerNameExW testcase and improve SetComputerNameExW.
2020-09-17 23:51:47 +09:00
Serge Gautherie 4aeb45ce0c
[KERNEL32] GetPriorityClass(): Return explicit 0, not FALSE (match return type) (#3170) 2020-09-12 21:38:06 +02:00
Serge Gautherie 8140203940
[KERNEL32] FatalAppExitW: Add an 'UNREFERENCED_LOCAL_VARIABLE(Status)' (#2883)
Addendum to 21d2accad3 (r71793).
2020-06-04 23:35:54 +03:00
Julen Urizar Compains 546862babc
[TRANSLATION] Update Spanish, and add Basque translation (#2667)
Add/update translation for:
charmap_new, logoff, mspaint, notepad, usetup, welcome,
hotplug.cpl, sysdm.cpl, aclui.dll, comctl32.dll, comdlg32.dll,
hhctrl.ocx, kernel32.dll, msi.dll, oledlg.dll, shell32.dll,
tapiui.dll, themeui.dll, wininet.dll, winmm.dll, wldap32.dll,
winsrv.dll.
2020-05-17 18:46:36 +02:00
Kyle Katarn c1fad34755
[WINNLS] Fix of GetCurrencyFormatW to handle "32" grouping format (#2719) 2020-05-10 08:34:35 +02:00
Mark Jansen 177ae91bf6
[RTL] Introduce RtlpImageNtHeader,
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857
2020-03-29 21:27:38 +02:00
Hermès Bélusca-Maïto 98b58df2bf
[KERNEL32:CONSOLE] Explicitly use _WIN32_WINNT_VISTA. 2020-03-02 01:08:36 +01:00
Hermès Bélusca-Maïto 570eba2a52
[KERNEL32][CONSRV] Use more often the internal ConioRectHeight/Width() and ConioIsRectEmpty() macros. 2020-02-22 21:15:58 +01:00
Eric Kohl c645660384 [KERNEL32] Improvements to Get/SetComputerNameExW
- The ComputerNamePhysicalDnsDomain name type gets or sets the 'NV Domain' registry value.
- The ComputerNamePhysicalDnsHostname name type gets or sets the 'NV Hostname' registry value.
- IsValidComputerName: Enforce name length restrictions according to the name type.
2020-01-19 13:34:31 +01: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
Oleg Dubinskiy c6b64448ce [KERNEL32] Stub GetSystemTimePreciseAsFileTime 2019-11-29 09:03:09 +01:00
William Kent 192926ee02 Stub GetCurrentPackageId() (#1942)
* [KERNEL32] Add stub implementation for GetCurrentPackageId() function

This Windows 8+ function is called by WiX bundles (EXE-based installers) upon exit, if the export is present. If it is a stub in the spec, they will crash, even if they are coded to be compatible with Windows XP/ReactOS.
Also add GetCurrentPackageId() forwarder to apiset.
2019-11-29 08:56:02 +01:00
Joachim Henze 93220e26d0 [KERNEL32] The DPRINT again - Nevermind
Tribute to DepositePirate.

This reverts commit 4ed0c1acef.
2019-11-03 23:41:34 +01:00
Joachim Henze 4ed0c1acef [KERNEL32] Fix typo in DPRINT
I checked: this is no Wine synced code.
2019-11-03 22:30:35 +01: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
Pierre Schweitzer 0ce3941b41
[KERNEL32] Fix FIXME by calling appropriate function in GetNativeSystemInfo() 2019-10-02 10:52:00 +02:00
Denis Malikov 18a9993d69 [KERNEL32] implement CreateSemaphoreExW/A and adjust macroses for it 2019-08-15 15:50:59 +02:00
Serge Gautherie 40ab30d6a0 [KERNEL32] Partially fix dll/win32/kernel32/client/vista.c compilation as NT6
CORE-12596
2019-08-15 15:42:34 +02:00
Hermès Bélusca-Maïto 44cddadba8
[KERNEL32] Minor enhancements for CreateRemoteThread(). (#804)
- Add some cleanup code in failure code paths, instead of asserting.
- Move BasepNotifyCsrOfThread() helper to the only file where it is used.
- Don't use ERROR_DBGBREAK in failure paths but just DPRINT the error
  message: we handle the failures properly.
- When creating the remote thread, sync its service tag with the parent
  thread's one.
2019-08-01 19:12:49 +02:00
Hermès Bélusca-Maïto effdb6f232
[KERNEL32][RTL] Diverse fixes/improvements for thread stack creation code. (#802)
- kernel32!BaseCreateStack() is compatible with ntdll!RtlpCreateUserStack().
- When checking whether a stack guard page can be added, its size has to
  be accounted for in the checking logic.
- We have to satisfy the PEB::MinimumStackCommit constraint.
- We cannot use PEB::GuaranteedStackBytes in BaseCreateStack() since it is
  nowhere initialized (default is 0). It gets initialized to a non-zero
  value when the user manually calls SetThreadStackGuarantee().
  https://www.installsetupconfig.com/win32programming/windowsthreadsprocessapis7_6.html

- RtlpCreateUserStack(): Fix memory leak in failure case.
- RtlpFreeUserStack() doesn't need to return anything.

See also commit 1bc59379 (r59868).

CORE-11319
2019-08-01 19:04:13 +02:00