Commit graph

86994 commits

Author SHA1 Message Date
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
Whindmar Saksit
32fad87a08
[ROSAUTOTEST][SDK] ROS detection for apitests (#7613) 2025-04-02 15:17:18 +02:00
Whindmar Saksit
4965d6a8ac
[USER32_APITEST] Add more PrivateExtractIcons tests (#7831) 2025-04-02 15:16:04 +02:00
Katayama Hirofumi MZ
3660920b7f
[GDI32][NTGDI][SDK] ExtTextOut: Fix some type problems (#7856)
JIRA issue: CORE-19898
- Modify NtGdiExtTextOutW prototype.
- Add const to some paramters.
- Make Count parameter unsigned.
- Delete needless type casts.
2025-04-02 20:30:47 +09:00
Doug Lyons
7afcd2a8b7
[ROSAUTOTEST] Allow rosautotest to be in the same directory as its files and show its duration at the end. (#7823)
Example output:
[ROSAUTOTEST] System uptime 7.41 seconds

... Testing here...

[ROSAUTOTEST] System uptime at start was 7.41 seconds

[ROSAUTOTEST] System uptime at end was 1546.20 seconds
[ROSAUTOTEST] Duration was 25.65 minutes

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-04-01 21:21:10 -05:00
Adam Słaboń
d66ad21ee0
[FREELDR][INSTALL] Update the FreeLoader installation message (#7853)
Update the installfreeldr message in accordance with the changes in 3d516e71d3.
2025-04-02 00:06:12 +03:00
Katayama Hirofumi MZ
87cd66a577
[NTGDI:FREETYPE] IntExtTextOutW: Renaming variables (#7851)
JIRA issue: CORE-19898
This PR is simply trivial renaming.
In IntExtTextOutW function:
s/SurfObj/psoDest/
s/SourceGlyphSurf/psoGlyph/
s/HSourceGlyph/hbmGlyph/
s/bitSize/glyphSize/
2025-04-02 03:54:42 +09:00
Whindmar Saksit
769462faaa
[IEFRAME] Implement URL PIDL (#7850) 2025-04-01 16:09:25 +02:00
Doug Lyons
13657fdb5b
[USER32][LIBPNG] Support PNG/Vista icons (Retry) (#7709)
CORE-18385
Retry of PR #7704

In USER32 change CMakeLists.txt to include libpng.
Improve libpng.spec to include additional needed defines.
Add code into mostly cursoricon.c to support PNG icons.

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
2025-03-31 12:55:53 -05:00
Whindmar Saksit
190782c3e0
[SHELL32] Fix some clang warnings (#7845) 2025-03-31 18:59:04 +02:00
Whindmar Saksit
aa4fac61c8
[BROWSEUI] Implement ShellBrowser F11 fullscreen mode (#7844) 2025-03-31 18:09:54 +02:00
Whindmar Saksit
cc8ec38a87
[SHELL32] Use SHGDN_FOREDITING when renaming in BrowseForFolder (#7840)
- Use SHGDN_FOREDITING when renaming.
- Handle rename change notification without full refresh.
- Don't use FS path when deleting.

CORE-20064
2025-03-30 23:11:27 +02:00
Eric Kohl
c5325f5016 [UMPNPMGR] Implement first part of PNP_AddEmptyLogConf
TODO: Adding a new configuration to an already existing configuration of the same type.
2025-03-30 17:16:00 +02:00
Katayama Hirofumi MZ
81d845fb2c
[SHELL32] Implement PathProcessCommandW (#7818)
Follow-up of #7815. This function
affects ShellExec_RunDLLA/W
implementation.
JIRA issue: CORE-17659
- Implement PathProcessCommandW
  in shlexec.cpp.
- Adapt utils.h to non-C++.
2025-03-30 20:28:31 +09:00
Whindmar Saksit
467dec4d16
[CLEANMGR] Only allow one instance per drive (#7832)
CORE-18941
2025-03-29 16:58:18 +01:00
Whindmar Saksit
21b3382f31
[SHELL32] Allow shell to format blank partitions (#7810)
- Don't corrupt static (global) data when formatting more than one disk at the same time.
- Guess partition size to enable formatting blank partitions.
- Added info tip.
- Calls SetVolumeLabel.

CORE-17273
2025-03-29 16:35:03 +01:00
Whindmar Saksit
090d563488
[SHELL32] CFolderOptions Reset can call DefView directly if there is no browser (#7806)
CORE-20029
2025-03-28 23:15:01 +01:00
Hervé Poussineau
cfde03ec9b [VIDEOPRT] Write monitor EDID to registry
This will be used later by win32k to give only valid display modes
to user mode.
2025-03-28 23:10:42 +01:00
Justin Miller
177cbd81af Revert "[FREELDR] Pass the correct ACPI table for Windows (#7486)"
Sorry this is something I had to do, I should have investigated deeper
before approving it and that's on me so ill take this over and get this
done. and credit you once again. Thank you @ILauncherDev
This reverts commit 185225a5fc.
2025-03-28 07:20:45 +01:00
Whindmar Saksit
b6562a664b
[SHELL32] DefView statusbar item file size fix in recycler and UNC (#7732)
- Display item sizes inside \\ UNC paths.
- Don't display anything in the location pane inside the Recycle Bin (CORE-20005).
- Don't display the size and location panes in My Computer
- Don't update the location pane on simple item selection changes.

CORE-20005
2025-03-27 18:29:44 +01:00
Timo Kreuzer
c7eba0c5c7 [SDK] Improve definition of (RTL_)CRITICAL_SECTION_DEBUG 2025-03-27 12:50:40 +00:00