Commit graph

189 commits

Author SHA1 Message Date
Ratin Gao 1cf8759d69
[KERNEL32][KERNEL32_VISTA][KERNEL32_APITEST] Implement and export NT6+ firmware API (#6580)
- Implement `GetFirmwareType` and improve existing API test for it
- Move (Get/Set)FirmwareEnvironmentVariableEx(A/W) to kernel32_vista_static and export them when NT version >= 6.2

Addendum to 4c8a2a8815. CORE-11954
2024-03-30 15:46:34 +03:00
Hermès Bélusca-Maïto 3a49e26f13
[KERNEL32][PSDK][NTVDM][CONSRV] Use now-documented ReadConsoleInputEx() flag names.
Addendum to commit b8b8819c7 (r60920)

ReadConsoleInputEx() and its flags used to be undocumented.
In the meantime they became documented on MSDN, see:
https://learn.microsoft.com/en-us/windows/console/readconsoleinputex

We can therefore adopt these now-documented flag names.
2024-03-06 12:28:27 +01:00
Muhammad Faathin Abdurrahman 5391eaadff
[KERNEL32] OpenFile(): Use InitializeObjectAttributes (#6323)
Use InitializeObjectAttributes macro instead of initializing the members manually.
2024-01-11 12:31:12 +01:00
Timo Kreuzer 86f2d4cd4e [NTDLL] Initialize keyed event for condition variables 2023-12-16 13:52:15 +02:00
Katayama Hirofumi MZ 6e449d47e8
[IMM32][KERNEL32][SDK] Half-implement BaseCheckAppcompatCache (#6069)
- And add it to <compat_undoc.h>.
- Use <compat_undoc.h> in IMM32.
- Modify kernel32.spec.
CORE-19268
2023-12-03 23:40:49 +09:00
Timo Kreuzer 642c795531 [KERNEL32] Fix 64-bit bug in SetProcessAffinityMask 2023-11-30 13:01:14 +02:00
Katayama Hirofumi MZ af7defb556 [KERNEL32] Implement SetComPlusPackageInstallStatus 2023-11-26 21:30:00 +09:00
Timo Kreuzer 455f330775 [KERNEL32_VISTA] Sync GetFileInformationByHandleEx with wine head 2023-11-18 17:53:42 +02:00
Ratin Gao bd0a5498b0
[NTDLL:LDR] Little fixes about SAL annotation and behavior (#5793)
- Uniform function declarations in .c and .h with fixes and SAL2 improvements.
- Use LDR_[UN]LOCK_LOADER_LOCK_FLAG_XXX correctly.
- Fix incorrect UsedSize calculation in LdrQueryProcessModuleInformationEx (caught by ThFabba).
- Whatever the callback request stop the enumeration or not in LdrEnumerateLoadedModules, the following operations should be the same.
- Fix 2 incorrect DPRINT1 that printed incorrect parameter.
- Return error if RtlAllocateHeap failed in LdrpGetProcedureAddress, and add comments about NT6.2 new changes.
2023-11-15 20:59:32 +01:00
Timo Kreuzer a8e8add0c0 [KERNEL32] Export more Vista functions 2023-10-18 15:55:41 +03:00
Timo Kreuzer 41c99aa60a [KERNEL32] Fix RaiseException to correctly copy the passed in parameters as ULONG_PTR
Fixes C++ exception handling on x64.
2023-09-21 21:33:47 +03:00
Ratin Gao 4c8a2a8815
[KERNEL32][KERNEL32_APITEST] Implement user-mode UEFI / Firmware API (#5149)
- Implement firmware environment variable read/write APIs
- Add, fix and improve related definitions and declarations
- Add kernel32:UEFIFirmware apitest

CORE-11954
2023-09-14 22:14:07 +03:00
Ratin Gao f491d7cc99
[KERNEL32][RTL] Implement One-Time initialization API and improve RTL support (#5046)
* [KERNEL32][RTL] Implement One-Time initialization API and improve RTL support
2023-09-06 15:40:53 -07:00
Ratin Gao 657f728767
[KERNEL32] Little fixes for FindFirstFileExW() behavior (#5592)
- Don't forget to release RTL_RELATIVE_NAME_U before return
- Ignore lpSearchFilter correctly as on Windows

Fixes 6 failures in kernel32:FindFiles test in LiveCD.
2023-08-27 02:20:08 +03:00
Timo Kreuzer 08629037ea [KERNEL32] Improve a few NT6 stubs 2023-08-22 18:46:31 +03:00
Timo Kreuzer 3a0b53386c [KERNEL32] Add CompareStringOrdinal from wine-3.21 2023-08-20 15:17:41 +03:00
Serge Gautherie 8888311452 [KERNEL32] CreateProcessInternalW(): Always use Peb variable
Trivial consistency/optimization.

Addendum to d81cd01 (r59637).
2023-08-17 02:51:09 +02:00
Timo Kreuzer 5645f7cf8f [KERNEL32] Fix startup context of initial thread
When creating a new process the monster function CreateProcessInternalW calls BaseInitializeContext to set up the context for the initial thread. One of the parameters is the PEB pointer. Instead of passing the pointer to the newly created process' PEB, the function was passing it's own PEB address, leading to test failures. How this is not an issue otherwise is a mystery to be resolved by someone else.
Also remove ros_skip_flaky marks in kernel32_winetest:process (yes, flaky, because sometimes the PEB addresses actually match)
2023-08-16 22:03:05 +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
Hermès Bélusca-Maïto cbae866df3
[KERNEL32] CreateProcessInternalW: Initialize uninitialized ClientId.
This situation happens when either of the two "goto VdmShortCircuit;"
code paths are taken when starting a DOS or WoW16 app.
2023-05-17 16:17:42 +02:00
Hermès Bélusca-Maïto 1cbcc4ac5c
[KERNEL32] Minor comments improvements in CreateProcessInternalW. 2023-05-17 16:17:38 +02:00
Katayama Hirofumi MZ 8b948ff062
[KERNEL32][SDK] RegisterConsoleIME and UnregisterConsoleIME (#5270)
The conime.exe program exists in WinXP/Win2k3 and it realizes Console IME. conime.exe calls kernel32!RegisterConsoleIME and kernel32!UnregisterConsoleIME. To realize Console IME, these two functions are required. CORE-11700
2023-05-07 22:55:46 +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
Ratin Gao d09072626b [KERNEL32] GlobalMemoryStatusEx should handle error and return FALSE when failed 2023-03-23 09:42:58 +01:00
Ratin Gao df7ab5d8f7
[KERNEL32] Remove a pointless SEH in VirtualAllocEx (#5117)
Win2K3 just wraps in SEH only this syscall, which appears pointless
and was removed since NT6.0. We remove it too as an experiment.
Revert the change that added SEH here from commit 6d97180 (r52899).
2023-03-09 17:08:08 +01:00
Jose Carlos Jesus f691efefc2
[SHLWAPI] No need extension to execute '.bat' files CORE-17612 (#4932)
When no extension is provided, add default extension with correct precedence using PathFileExistsDefExtW.
- Use PathFindOnPathExW when searching in current directory and PATH environment variable.
- Fix Width String terminator to UNICODE_NULL.
- Fix all failed tests on PathFindPathExW KVM test.
CORE-17612
2023-02-11 00:05:11 +09:00
Hermès Bélusca-Maïto 1b25fe161c
[KERNEL32][NTOS:PS][RTL] Cleanup some DbgPrompt() calls. 2023-01-06 14:44:49 +01:00
Timo Kreuzer 437f2b1b0e [KERNEL32] Silence 2 annoying DPRINTs 2023-01-04 10:32:28 +01:00
Timo Kreuzer eb502bbc10 [KERNEL32] Fix a bug in GetVolumeNameForRoot 2022-12-01 20:17:40 +02:00
Hermès Bélusca-Maïto 25958a7c3d
[KERNEL32] Spec file: GetCurrencyFormatW takes wide strings in parameters. 2022-11-03 02:50:23 +01:00
Hermès Bélusca-Maïto 9f938ea3bb
[KERNEL32] Reformat K32CreateDBMonMutex(). 2022-11-03 02:50:20 +01: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
Hermès Bélusca-Maïto 5bf0c00ddc
[KERNEL32] Minor code style changes + add documentation for BasepMoveFileDelayed().
+ cut the too long lines; don't hardcode types in sizeofs; correctly specify COPY_FILE_FAIL_IF_EXISTS flag.
2022-11-01 02:29:24 +01:00
Jose Carlos Jesus fece68b63f
[TRANSLATION] Improve Portuguese (pt-PT) translation (#4758)
- [WINNLS] Update pt-PT translation
- [NETCFGX] Update pt-PT translation
- [SHELL32] Update pt-PT translation
2022-10-06 22:48:38 +03:00
Hermès Bélusca-Maïto 61cfc0f055
[KERNEL32] Fix DisableThreadLibraryCalls function argument type in spec file.
+ Remove space between function name and parentheses there too.
2022-10-06 16:16:46 +02:00
Mark Jansen f10d40f912
[KERNEL32] Fix BaseDefaultPath containing extra '.' 2022-09-06 21:09:38 +02:00
Katayama Hirofumi MZ bb9c5e8e3e
[KERNEL32] Fix kernel32.rc for UTF-8 codepage (#4648)
- Move #pragma code_page(65001) line.
CORE-18177
2022-08-31 12:04:21 +09:00
Timo Kreuzer 39f11249ff [NTOS][RTL] Initialize MxCsr where missing 2022-08-22 11:22:08 +02:00
Andrew Boyarshin c15a9c1d09
[KERNEL32] lpNumberOfCharsWritten is optional for WriteConsole (#1079)
Some applications (and libraries, like replxx) rely on this undocumented behavior.
2022-08-12 01:58:18 +02:00
Timo Kreuzer f96bee30ed [KERNEL32] Fix printing exception address 2022-08-04 16:15:24 +02:00
Mark Jansen 8ea46b53e3
[KERNEL32] Fix reading SafeDllSearchMode 2022-05-25 22:43:47 +02:00
Justin Miller 4363e74ddc
[REACTOS] Finally get some ARM64 applications building (#4517)
- Add some missing ARM64 exports to ntdll, kernel32 and user32
- Create mmtypes header file based on WoA debug symbols
- Get the remaining headers in order, so we can build ARM64 apps
- Adjust subsystem version for binaries so they can run on WoA host
- Get calc, notepad and more base apps to build for ARM64 platform

CORE-17518

Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-05-25 17:06:32 +03: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
Hermès Bélusca-Maïto 75e2fb4566
[KERNEL32] Improve annotation of BaseProcess/ThreadStartup(); remove useless cast; fix PPROCESS_START_ROUTINE return type. 2022-04-18 02:40:32 +02:00
Wu Haotian 0c42866e64
[TRANSLATION] Review & update Simplified Chinese (zh-CN) translation (#3933)
Reviewed all Chinese Simplified translation files and updated those
inappropriate or outdated ones.

Co-authored-by: Liu Wenyuan <15816141883@163.com>
Reviewed-by: Chan Chilung <eason066@gmail.com>
Reviewed-by: He Yang <1160386205@qq.com>
Reviewed-by: Zheng Jianping <robsean@126.com>
Reviewed-by: Luo Yufan <njlyf2011@hotmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
2022-03-31 20:30:52 +03:00