Commit graph

87064 commits

Author SHA1 Message Date
Timo Kreuzer
31a693a035 [NTOS:MM] Remove some obsolete declarations 2025-04-17 22:22:08 +00:00
Katayama Hirofumi MZ
67e5343daf
[IMM32] Make IMM32 non-Wine module (#7890)
Related to #7870. IMM32 uses NDK.
So, we have to remove Wine
dependency.
JIRA issue: CORE-5743
- Add dll/win32/imm32/debug.h.
- Remove Wine dependency.
- Update the documentation
  (media/doc/WINESYNC.txt).
2025-04-17 22:50:22 +09:00
Adam Słaboń
016c5fd083
[KERNEL32] RemoveDirectoryW: Fix the code for removing a mounted folder (#7897)
- Fix the crash due to copying the memory to wrong destination buffer.
- Fix the check for trailing backlash on path string.
2025-04-17 15:49:38 +02:00
Adam Słaboń
3d9b919814
[MOUNTMGR] Few fixes and improvements (#7896)
- `MountMgrVolumeMountPointChanged()`: Set status code in all failure
  paths and correct the check for remote or removable media.
- `DeleteRemoteDatabaseEntry()`: Do not allow the database with size of zero.
- `QueryVolumeName()`: Use reparse point file reference when no file name is supplied.
2025-04-17 15:26:58 +02:00
Adam Słaboń
26e0a5472f
[NDK] Add definitions for system partition and disk information classes (#7895)
Add definitions for SystemSystemPartitionInformation and SystemSystemDiskInformation classes.
2025-04-17 13:57:19 +02:00
Petru Răzvan
7026466324
[USRMGR] Implement "Require user name and password on system startup." (#7887)
This implements the tickbox along with the associated code required for it to work.

CORE-11371
2025-04-17 13:55:31 +02:00
Curtis Wilson
be56c5c328
[TRACERT] Improve command line parsing (#7779)
- Added bounds check for -w and -h options to prevent the program from crashing.
- Added argument checks for -w and -h to make sure values were of the correct type and within range.
- Added check to see if a host was specified.
- Added new resource strings for reporting errors related to the checks above.
- Added the slash character as an additional option to specify command options.
2025-04-17 13:53:43 +02:00
Doug Lyons
23ad93627b
[COMDLG32] Improve IDC_TOOLBARPLACES placement (#7898)
Change IDC_TOOLBARPLACES y-value from 192 to 200 to allow Browse Dialog for "My Network Places" to show lower border.
CORE-19732
2025-04-16 19:52:33 -05:00
Serge Gautherie
2f380814d3
[NTOS:KD] Fix KdMax value without KDBG debugger (#7889)
Addendum to commit 271b985
CORE-20107

[NTOS:KD] Comment defines related to KdMax. They are not used,
but keep them for documentation purposes.
Addendum to e160c0f (r14799) and 6d53c91 (r27419).
2025-04-16 17:18:07 +02:00
Katayama Hirofumi MZ
80eb313eed
[COMCTL32] Pager: Fix PGM_RECALCSIZE behaviour (#7875)
JIRA issue: CORE-7017
- Add m_bProcessingReCalcSize to PAGER_INFO structure.
- Fix EM_FMTLINES and PGM_RECALCSIZE handling, by
  usiing m_bProcessingReCalcSize.
2025-04-15 08:59:43 +09:00
Eric Kohl
00983aa86f [UMPNPMGR] PNP_AddEmptyLogConf: Implement adding a resource list to an existing configuration value 2025-04-13 20:12:08 +02:00
Hermès Bélusca-Maïto
79f281e74f
[SDK:CMAKE] Remove unused BUILD_MP build option (#7862)
It was introduced in commit 1f9c4940d (r38270), but this flag isn't used
anymore in our source tree, and nowadays, we actively compile both UP
and MP support.
2025-04-12 22:37:48 +02:00
Timo Kreuzer
00f4a0f89b [RICHED20] Enable thiscall wrappers for MSVC
Properly fix thiscall functions by enabling thiscall wrappers on MSVC builds.
See CORE-20079, CORE-20006
2025-04-12 07:57:42 +00:00
Timo Kreuzer
dd53e7f79e Revert "[RICHED20] Fix MSVC Wordpad failure after riched20 Wine Sync to 6.10 (#7789)"
This reverts commit 74599f6c97.
2025-04-12 07:57:42 +00:00
Timo Kreuzer
18fc5a1391 [USER32] Fix use of uninitialized variable 2025-04-11 07:24:44 +00:00
Doug Lyons
3b8cfa42c1
[RICHED20] Fix RTC MSVC Failure in function ME_GetTextW. (#7881)
Import Wine Commit: 5cbe3a6cb1
CORE-20082
2025-04-10 13:35:53 -05:00
Whindmar Saksit
5022a451df
[SHELL32] Fix Search Folder resource string id (#7874) 2025-04-09 16:29:57 +02:00
Alexey Strukov
9a0ff8b21b
[BROWSEUI] Fix backspace button behavior in win32 shell browser (#7837)
Update backspace button functionality to align with standard modern Windows behavior in the win32 shell browser.
2025-04-08 23:54:14 +02:00
Hermès Bélusca-Maïto
1b564c1ba8
[REACTOS] Use the RT_* resource type defines where possible (#6023)
And use the self-documenting `MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)`
instead of `0` for the `LDR_RESOURCE_INFO::Language` structure member.
2025-04-08 20:21:07 +02:00
Hermès Bélusca-Maïto
111c8cc62a
[REACTOS] Usage improvements for some RtlFindMessage invocations (#6023)
Use `RT_MESSAGETABLE` and `MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)`
instead of hardcoding their values.
2025-04-08 20:19:54 +02:00
Hermès Bélusca-Maïto
2f805d7a02
[PSDK] winuser.h: Add missing (MINIMUM|MAXIMUM)_RESERVED_MANIFEST_RESOURCE_ID define 2025-04-08 20:18:44 +02:00
Hermès Bélusca-Maïto
a3899d8151
[FREELDR:PC98] Don't do the HighRes check everytime a character is written with writechr (#4359)
And bring similar simplifications to the PC98 FAT12 bootsector.

Co-authored-by: Dmitry Borisov <di.sean@protonmail.com>
2025-04-08 15:50:43 +02:00
Hermès Bélusca-Maïto
94a650cdf7
[TASKKILL] Simplify children processes termination code (#7855)
Use process-tree Level-Order-Traversal to determine the children
processes to be terminated.

This avoids using recursion to establish the process tree, and also
allows termination in a fashion similar to Windows' taskkill.
The main difference with the latter is that we terminate parent
processes first before terminating their children, instead of doing
the reverse. (This allows avoiding the case where parent processes
respawn their children when they have been terminated.)
2025-04-08 15:42:36 +02:00
Hermès Bélusca-Maïto
1519a676bd
[TASKKILL] Improve translations of the process-termination messages (#7855) 2025-04-08 15:40:46 +02:00
Hermès Bélusca-Maïto
4089e90890
[TASKKILL] Final sync with wine-10.0 (#7855)
[WINESYNC] taskkill: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id fb80c1b554eaf07bf2f89fcf2960e39bd0d4787a by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] taskkill: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 3180972ee2c8e67c425aa7f5279d0cd830455c3d by Michael Stefaniuc <mstefani@winehq.org>

[WINESYNC] taskkill: Use the standard va_list instead of __ms_va_list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 2c2e75503bea973a3091ea48d431782da656ef8e by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] taskkill: Use OEM code page for output.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
wine commit id 8fdf397505522cc8e41b58cd960899ef7cdf322b by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] taskkill: Use exit code 1 when terminating processes.
wine commit id fe6294c74346e9956fb839d2a4ca078c624f6bbf by Brendan Shanks <bshanks@codeweavers.com>

[WINESYNC] taskkill: Use CRT allocation functions.
wine commit id dd3f3f381f9e761325c7c06236de1241c9605ed6 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Remove unneeded free() before process exit.
wine commit id 20ab5f06d0972440a7df7fb1ba390ab1b32f3b1d by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Enumerate processes in main().
wine commit id cf4a0b7392f33ba3e0b3fe69007a6d1f327f13f2 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Factor out get_task_pid().
wine commit id 62ef3c5be1d2c5374399984588a9daa75663d030 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Use toolhelp snapshot to get process information.
wine commit id 6cca1f5099a8354b67578b42dd34fd010e80b6de by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Mark processes for termination in main().
wine commit id 5c851451892e05c1747108432a5a2bff3a78ed9e by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] taskkill: Support terminating child processes.
wine commit id fb6b1c91bbf412f5eba260ae52ee38176fd693d4 by Paul Gofman <pgofman@codeweavers.com>

NOTE: This implementation is disabled for ReactOS, and we keep
our own. See the comment block in the code for the reasons why.

+ Adaptations for ReactOS-specific code.

In particular, great care has been taken to keep the `pkill_list`
functionality (read: fix) introduced in PR #2403 (commit 97e7efc020).
The current problem with Wine's code is that if many processes (more
than one) with the same image name are running, then:

   taskkill /im theimagename.exe

would only terminate *one* of the corresponding processes, instead of
all processes having this same image name (as on Windows).
The `pkill_list` array contains all the PIDs of these processes. This
replaces the single `pid` initialized by `get_task_pid`.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2025-04-08 15:36:57 +02:00
Whindmar Saksit
f669426bf4
[COMCTL32] Include size of state imagelist for column 0 LVSCW_AUTOSIZE (#7873)
CORE-20080 CORE-15423
2025-04-07 21:20:15 +02:00
Timo Kreuzer
52719b52ae [VCRUNTIME] Fix a bug in x64 __security_init_cookie 2025-04-07 13:57:17 +00:00
Whindmar Saksit
182f353b2f
[COMCTL32] ImageList_LoadImageW with CLR_NONE should not use a mask (#7869)
CORE-16146
2025-04-06 19:00:54 +02:00
Oleg Dubinskiy
ff7bf747bf [WDMAUD.DRV] Allow enumerating only present audio devices
- Avoid unnecessary enumerating audio-related device interfaces which are currently not present in the system.
- Do this for MMixer routines, same as it's already done for Legacy ones.
2025-04-06 17:29:45 +02:00
Johannes Anderwald
ecf4001e6f
[SETUPAPI] Do not fail enumeration on invalid device interface keys (#7741)
Necessary for drivers, which install multiple device interfaces and all interfaces might not be available for this device.
CORE-17285
2025-04-06 17:10:08 +02:00
Oleg Dubinskiy
9aa299bea4
[MMIXER] Don't stop audio devices enumeration when one or more of them failed to initialize (#7863)
Skip unsuccessfully initialized devices and continue enumeration until all of devices are enumerated.
Patch by Johannes Anderwald with additional improvements from me.
This fixes 0 audio devices detected for HD audio controllers (e. g., Realtek), and hence allows to properly detect all available devices and play the sound with MMixer routines enabled (they are currently default).
Tested personally with Realtek HD Audio driver version R2.74 for Windows XP/Server 2003 in pair with hdaudbus.sys from Windows Vista SP2 on real hardware.
CORE-17285
2025-04-06 10:55:55 +02:00
Eric Kohl
2ec3a199af [UMPNPMGR] Implement first part of PNP_FreeLogConf 2025-04-05 18:17:33 +02:00
Doug Lyons
208dfd22c6
[ROSAUTOTEST] Final changes to improvements (#7857)
Follow-up of PR #7823.
2025-04-04 22:00:54 -05:00
Hermès Bélusca-Maïto
8d7eca9482
[CODEOWNERS] Add myself for modules I wrote or heavily contributed to (#5279) 2025-04-04 20:47:59 +02:00
Whindmar Saksit
ac3ecb2b2d
[SHELL32] Add SHFileOp error UI and use it for CFSFolder renaming (#7858) 2025-04-04 20:34:52 +02:00
Hermès Bélusca-Maïto
774b3a6e1d
[RAPPS] Correctly update the Install/Uninstall/... buttons (#7351)
The Install/Uninstall/Modify/... buttons stay disabled by default, unless:

- For installed apps: when an app item is selected, Uninstall (and
  Registry-remove) are enabled, and Modify is enabled under certain
  conditions.

- For available apps:
  * Modify, Uninstall and Registry-remove are always disabled.
  * When an app item is selected, Install is enabled.
  * Install is also enabled if there is at least one application
    selected for installation (box checked), in which case the button
    stays enabled even while changing across apps categories.
2025-04-04 18:18:49 +02:00
Katayama Hirofumi MZ
1e6e5529c6
[FREETYPE][FTFD][DOC] Update FreeType to 2.10.0 from 2.9 (#7786)
Modernize font engine modules.
JIRA issue: CORE-16084
- Update FreeType to 2.10.0 from 2.9.
- Delete useless files.
- Add technical notes (TechNote.txt) on freetype.
- DbgPrint became FT_Message.
2025-04-04 20:50:25 +09:00
Katayama Hirofumi MZ
7efab12e6f
[CMAKE] Introduce set_wine_module (Retry) (#7860)
Re-trial of #7800. Deleting __WINESRC__
hacks.
JIRA issue: CORE-5743
- Add sdk/cmake/set_wine_module.cmake.
- Load set_wine_module.cmake at
  top-level CMakeLists.txt.
- Use set_wine_module cmake function
  and delete __WINESRC__ as possible.
- Delete many include_directories.
2025-04-04 20:44:38 +09:00
Hermès Bélusca-Maïto
125f94d8ab
[NTOS:EX] Check whether the boot-time drivers are safe to use on MP systems (#7744)
Invoke the MmVerifyImageIsOkForMpUse() helper. If the boot-time driver
only supports a uniprocessor system, bugcheck with UP_DRIVER_ON_MP_SYSTEM.

https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/bug-check-0x92--up-driver-on-mp-system

Note that we don't do this check very soon at boot time (e.g. in
MiReloadBootLoadedDrivers or MiInitializeLoadedModuleList), but only
after loading the drivers' debug symbols (if any).
The reason is simply to ease debugging in case we bugcheck: this allows
having the debugger set up with the symbols for this driver.

For automatic and manual driver loading, MmVerifyImageIsOkForMpUse()
is invoked by MmCheckSystemImage() but in this case, there is graceful
failure and no bugcheck.
2025-04-04 13:05:22 +02:00
Hermès Bélusca-Maïto
4750cbe55b
[SDK:INCLUDE] bugcodes.mc: Add missing UP_DRIVER_ON_MP_SYSTEM bugcheck code (#7744) 2025-04-04 13:04:51 +02:00
Hermès Bélusca-Maïto
3022d74beb
[NTOS:EX/KE][HALX86] Add support for NUMPROC, BOOTPROC, MAXPROC, ONECPU boot switches (#6024)
These SMP-specific switches allow to test and control configurations
with various number of CPUs on multiprocessor systems.

- NUMPROC: maximum number of logical processors that can be started
  (including dynamically, not currently supported by ReactOS) at run-time.

- BOOTPROC: maximum number of logical processors that can be started at
  boot-time.

- MAXPROC: forces the OS to report the maximum possible number of CPUs
  as existing on the system.

- ONECPU (MP HAL-only boot switch): causes the HAL to only use one
  (the boot) CPU on a multiprocessor system. Attempting to start other
  processors will fail.

For more information, see:
https://www.geoffchappell.com/notes/windows/boot/bcd/osloader/numproc.htm
https://www.geoffchappell.com/notes/windows/license/processors.htm
https://rmscrypt.wordpress.com/2011/02/
https://codeinsecurity.wordpress.com/2022/04/07/cpu-socket-and-core-count-limits-in-windows-10-and-how-to-remove-them/

Generic references about BOOT.INI switches:
https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/boot-options-in-a-boot-ini-file
https://www.itprotoday.com/cloud-computing/what-switches-can-be-used-bootini
http://franck.kiechel.free.fr/dbr_eng/BootIni.htm

References about BCD options:
https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/bcdedit--set
http://www.mistyprojects.co.uk/documents/BCDEdit/files/commands.6.1.7601.htm#TYPES%20OSLOADER
2025-04-04 12:51:49 +02:00
Hermès Bélusca-Maïto
7093412f4e
[NTOS] Build mproc.c _only_ for MP ntoskrnl, not for single-processor
The usage of the BUILD_MP cmake variable was inadequate.
2025-04-04 12:51:29 +02:00
Hermès Bélusca-Maïto
b0dd4ba09c
[HALX86][HALARM] Minor formatting to HalInitSystem
Add CODE_SEG("INIT"), SAL2 annotations, remove extra-parenthesis...
2025-04-04 12:51:28 +02:00
Katayama Hirofumi MZ
1890ad20f8
[NTGDI][GDI32] AddFontResource: Support multiple files (#7833)
JIRA issue: CORE-17684
- Add HEAP_strdupA2W_buf and HEAP_strdupA2W_buf_free
  helper functions for quick string conversion.
- Optimize HEAP_... functions.
- Add IntConvertFontPaths helper function.
- Support multiple files in AddFontResource function.
- Add cFiles parameter to some internal font addition/
  removal functions.
- Half-implement NtGdiRemoveFontResourceW and
  RemoveFontResourceExW functions.
2025-04-04 19:30:18 +09:00
Whindmar Saksit
72bd9ef29a
[BROWSEUI] Don't pass the internal PIDL to the shell for processing (#7859)
CORE-20063
2025-04-03 20:52:53 +02:00
Timo Kreuzer
98b26cc24a [NTDLL_APITEST] Fix NtCreateProfile tests for x64 2025-04-03 16:22:42 +00:00
Timo Kreuzer
0679260073 [HAL/APIC] Set the profiling interrupt handler
Fixes hang when running mtdll_apitest NtStartProfile.
2025-04-03 16:22:42 +00:00
Timo Kreuzer
dca5194279 [FTFD] Fix malloc/realloc/free wrappers
On x64 malloc needs to return a 16 byte aligned buffer, the previous code used an 8 byte header, making the allocations unaligned. This is now fixed with an improved header structure.
Also simplify realloc a bit and make it handle Object == NULL.
2025-04-03 16:22:09 +00:00
George Bișoc
91fadeb6c3
[STOBJECT] Explicitly tell the user the battery is fully charged
Short answer: our UI sucks bolas rojas.

Long answer: when the NT kernel informs the user-mode part of the system that the battery is no longer charging, the machine is directly powered up by the AC adapter.
This is understood by determining the presence of AC_LINE_ONLINE status bit in ACLineStatus member field, which is a Windows API construct.
In the NT world this is understood by checking the power state returned by the BATTERY_STATUS structure.

What's happening right now is that when the battery is fully charged, ROS UI simply displays "100% remaining" implying the battery is about to discharge, which is not the case.
This is extremely confusing to the user. AND WORST PART IS THAT IT'S XP/2003 DESIGN, AND I HATE IT UGGGHHH.
With this patch we're leaning towards Windows 10/11 way of informing the user the battery is fully charged. VIVA LA NT6!

CORE-18969
CORE-19452
2025-04-02 23:16:47 +02:00
Whindmar Saksit
5dbf87e2c1
[BROWSEUI] Handle resolution change when fullscreen (#7852)
CORE-20072
2025-04-02 18:18:23 +02:00