Commit Graph

88287 Commits

Author SHA1 Message Date
Katayama Hirofumi MZ
6af07a31b0 [FONTEXT][SHELL32][SDK] Support delete operation (#8639)
Improve usability of Fonts folder.
JIRA issue: CORE-17311
- Modify PIDL design to contain
  name and filename.
- Implement CFontExt::
  ParseDisplayName to parsing
  name as PIDL.
- Modify CDefaultContextMenu::
  GetCommandString and
  CDefaultContextMenu::
  DoCopyOrCut for DFM_GETVERBA,
  DFM_GETVERBW, DFM_CMD_COPY,
  and DFM_CMD_MOVE.
- Add IDS_CONFIRM_DELETE_FONT,
  IDS_CANTDELETEFONT, and
  IDS_PROPERTIES resource strings.
- Add SHMultiFileProperties
  prototype to <shlobj.h>.
2026-02-13 18:37:06 +09:00
Justin Miller
5213cf717c [BOOT][ENVIRON] Remove Environ (#8667)
* [SDK][BOOT] Reimport the EDK2 headers

* [ENVIRON] Remove Environ
2026-02-11 14:01:16 -08:00
Eric Kohl
b03c40f440 [DISKPART] Disable all unimplemented commands 2026-02-08 12:38:34 +01:00
Eric Kohl
44609d1398 [DISKPART] Ignore non-mounted GPT partitions in DismountVolume 2026-02-07 14:44:05 +01:00
Eric Kohl
ece92ee517 [DISKPART] Improve the PrintSize function
- Pass the output buffer size to the PrintSize function.
- Use StringCchPrintfW instead of swprintf.
2026-02-07 12:24:22 +01:00
Katayama Hirofumi MZ
c11583c817 [ZIPFLDR][SHELL32] Support delete operation in Zip Folder (#8643)
Follow-up of #8632. Improve usability of ZIP Folder.
JIRA issue: CORE-20464
- Add IDS_CONFIRMDELETE_TEXT and
  IDS_CANTDELETEFILE resource strings.
- When deleting files in Zip Folder, create a
  temporary file.
- CZipFolder::CopyZipEntry adds files to the
  temporary file without adding files to delete.
- Replacing the target ZIP file with the temporary
  file implements deleting files in Zip Folder.
- Add SFGAO_CANDELETE attribute.
- Add DFM_CMD_DELETE action.
- Modify CDefaultContextMenu in shell32 to invoke DFM_CMD_DELETE etc.
- Modify CNewMenu::LoadItem in shell32.
2026-02-07 18:28:23 +09:00
Adam Słaboń
50d99bf974 [OPENGL32] Misc refactoring and a bugfix for Nvidia OpenGL ICD (#8656)
* [OPENGL32] Use NDK definitions for list functions
* [OPENGL32] wglCreateLayerContext: Insert an entry into context list

Fixes a crash when wglDeleteContext is called on layer context.
2026-02-07 00:36:47 +00:00
Katayama Hirofumi MZ
f9c7221a1e [NTGDI][FREETYPE] Follow-up of #8641 (#8658)
Follow-up of #8641. Reduce freetype.c lines.
JIRA issue: CORE-19898
- Follow @HBelusca's review in #8641.
- Move some codes in freetype.c into utils.c.
2026-02-07 08:08:30 +09:00
Nathan Giovannini
4f15235d89 [NTUSER] Fix assertion failure in UserDerefObjectCo (#8659)
Ensure we dereference the same parent window object after a user-mode callback. We cache spwndParent in a local before sending messages so a parent change during the callback no longer trips the LIFO reference check.

- Capture the parent window in a local in IntDefWindowProc (WM_APPCOMMAND) and IntSendParentNotify.
- Use the local for UserRefObjectCo, co_IntSendMessage, and UserDerefObjectCo to prevent object mismatches when the parent changes mid-callback.

CORE-17331
2026-02-05 12:50:37 +03:00
Doug Lyons
a727273fbf [FREETYPE] HACK: Verify we have format 4 for tt_cmap4_char_map_binary (#8649)
[FREETYPE] HACK: Verify the cmap format 4 is used in the function
"tt_cmap4_char_map_binary" in ttcmap.c before proceeding.
Otherwise issue debug message.

CORE-12549
2026-02-04 00:39:05 -06:00
Mikhail Tyukin
c5c0e5987d [MSAFD][AFD] Implement WSPConnectEx and SO_UPDATE_CONNECT_CONTEXT (#8636)
- Update AFD to use the shared structure
- Fix AFD get context to match windows behavior
- implement SO_UPDATE_CONNECT_CONTEXT

CORE-17174
CORE-16335
2026-02-04 00:14:55 -06:00
Eric Kohl
b2c1dd83d5 [DISKPART] Fix the drive letter deletion code
The remove and assign commands work properly now.
2026-02-02 22:11:05 +01:00
Katayama Hirofumi MZ
9d5c0bff36 [NTGDI][FREETYPE] Introduce font look-up cache (#8641)
Text rendering speed is justice! Font
search is heavy operation. Adding
cache to it is rational.
JIRA issue: CORE-19898
- Define FONT_LOOKUP_CACHE
  structure.
- Add s_FontLookupCacheList
  global variable to save cache.
- Use cache in FontLink_PrepareFontInfo
  and TextIntRealizeFont.
2026-02-02 09:45:06 +09:00
Eric Kohl
5fd860b383 [DISKPART] Print proper success message in the assign command 2026-02-01 23:53:41 +01:00
Katayama Hirofumi MZ
f96fa0e232 [BROWSEUI] Address Bar: Relative path again! (#8653)
Follow-up of #8633. Relative path parsing.
JIRA issue: CORE-20473
Modify CAddressEditBox::ParseNow.
2026-02-02 07:05:11 +09:00
Adam Słaboń
4a7d370d93 [VIDEOPRT] VideoPortVerifyAccessRanges: Fix use after free (#8648)
Fixes a crash when booting with special pool enabled
Addendum to 0511e9d869
2026-02-01 14:02:06 +01:00
Katayama Hirofumi MZ
026a53c076 [USER32][COMCTL32] EDIT control: Use ImmIsIME instead of IS_IME_HKL (#8652)
Prepare to support CTF IMEs.
The IS_IME_HKL macro cannot
detect CTF IME.
JIRA issue: CORE-1926
- Use ImmIsIME instead of
  IS_IME_HKL to check whether
  the keyboard is IME.
2026-02-01 18:51:37 +09:00
Timo Kreuzer
fc55d38e0e [CRTDLL] Build from msvcrt sources 2026-02-01 11:46:59 +02:00
Timo Kreuzer
95c358ccdc [MSVCRT40] Build from msvcrt sources 2026-02-01 11:46:59 +02:00
Timo Kreuzer
7a88891ae8 [MSVCRT20] Build from msvcrt sources 2026-02-01 11:46:59 +02:00
Timo Kreuzer
dcca81a716 [UCRTBASE] Switch to msvcrt_shared 2026-02-01 11:46:59 +02:00
Timo Kreuzer
80cefb63b4 [MSVCRT_SHARED] Implement TLS support for ucrtbase 2026-02-01 11:46:59 +02:00
Timo Kreuzer
52870a61ea [MSVCRT_SHARED] Fix up for use with ucrtbase 2026-02-01 11:46:59 +02:00
Timo Kreuzer
b11532744d [MSVCRT] Fix _mbsnbcat_l parameter check 2026-02-01 11:46:59 +02:00
Timo Kreuzer
b9e38f04cd [MSVCRT] Build improvements for asm code
- Move call_copy_ctor and call_dtor asm functions into exception_ptr.s
- The code in exception_ptr.c isn't needed, only the asm functions, so remove the file from build and instead compile exception_ptr.s for both GCC and MSVC builds
2026-02-01 11:46:59 +02:00
Timo Kreuzer
06ed85e2c3 [MSVCRT] Fix use of __wine_RtlUnwind 2026-02-01 11:46:59 +02:00
Timo Kreuzer
1a42db50ad [MSVCRT] Remove custom _chkesp_failed 2026-02-01 11:46:59 +02:00
Timo Kreuzer
4c19b94ae9 [VCRUNTIME] Implement _chkesp / _chkesp_failed 2026-02-01 11:46:59 +02:00
Timo Kreuzer
89506818c4 [VCRUNTIME] Implement purecall handler support
Implements _get_purecall_handler, _set_purecall_handler and _purecall
2026-02-01 11:46:59 +02:00
Katayama Hirofumi MZ
abd201bfa2 [USER32][COMCTL32] ComboBox: Don't check owner window on creation (#8647)
Reduce imm32:himc failures.
JIRA issue: CORE-19268
- Don't check lphc->owner nor
  WS_VISIBLE on ComboBox creation.
2026-02-01 07:24:27 +09:00
Hermès Bélusca-Maïto
b5b9b5d169 [HALX86] Update the PCI hardware IDs database.
Extracted from the pci.ids database at https://pci-ids.ucw.cz/ from 2026-01-31 03:15:01.
Maintained by Albert Pool, Martin Mares, and other volunteers from the PCI ID Project.
2026-01-31 18:00:03 +01:00
Hermès Bélusca-Maïto
c2aaa52bf2 [BOOTVID] Implement a generic linear framebuffer boot video driver (#8618)
Its purpose is to offer an out-of-the-box generic framebuffer video
(a video miniport driver for win32k will be introduced in a future PR)
to ease ReactOS porting to other possibly non-PC-compatible systems,
where no VGA-compatible video is present and only linear framebuffers
are available; for example: XBOX, UEFI with GOP only, AppleTV, etc.

Of course, once ReactOS is ported, one can then (and should) write,
or use existing video drivers tailored to the system of interest.

Together with our FreeLoader, this driver could also be employed for
of porting/modding Windows 2000/XP/2003 attempts to other platforms,
as this has been done by external contributors.

Current limitations:
- Only supports 32 bits-per-pixel ARGB format. This limitation will be
  removed in subsequent PR(s).
- May be slow during rendering (region color filling and scrolling);
  I will try to improve this as time goes.

This driver's code is loosely based upon preliminary code by Justin Miller
and on the existing XBOX bootvid implementation.
Tested by Justin Miller (@TheDarkFire) for UEFI, and by Sylas Hollander
(@DistroHopper39B) with his AppleTV port.
It has also been tested with VESA linear modes on PC by myself.
2026-01-30 21:21:30 +01:00
Hermès Bélusca-Maïto
0dc78396f5 [SDK/INCLUDE] Introduce boot display discovery helper functions (#6661)
Their purpose is to simplify the way a compatible boot video driver
and a generic framebuffer miniport driver can retrieve this information.

In this iteration, the data is retrieved only from the kernel loader-block
ARC tree, via the `KeFind(Next)ConfigurationEntry()` routines.
As such it can be used only by the boot video driver (loaded early in the
boot process).
Other methods, suitable for retrieving this information later in the
boot process, will be added in the future.
2026-01-30 20:53:23 +01:00
Katayama Hirofumi MZ
85cdb75536 [SHELL32] SHOpenWithDialog: Write DefaultIcon registry key (#8634)
JIRA issue: CORE-19670
- Write DefaultIcon registry key
  when association changes.
- Call SHChangeNotify(
  SHCNE_ASSOCCHANGED, ...).
2026-01-31 02:23:41 +09:00
Hermès Bélusca-Maïto
00bbac600e [FREELDR:XBOX/UEFI] Enumerate video framebuffer information in the Hardware Configuration Tree (#8617)
- UEFI: Report GOP framebuffer information.
- UEFI: Update ARC versioning for configuration data.
- XBOX: Enumerate video display controller under the correct PCI bus.
- XBOX: Update ARC versioning for display controller configuration data.
2026-01-30 14:00:25 +01:00
Hermès Bélusca-Maïto
f21d692342 [SDK/INCLUDE] Define a structure describing boot-time framebuffer information (#6658)
This information is set up by the bootloader hardware detector and stored
into the system configuration tree for consumption by the NT OS loader and
other OS subsystems. This method doesn't require modifying the NT kernel
loader parameter block or extension(s), thus also allowing for a backward-
compatible usage when loading Windows OSes like 2000, XP/2003, or Vista/7.

The framebuffer information can then be retrieved by a supported bootvid
and a generic framebuffer win32k video driver.
2026-01-30 13:50:01 +01:00
Hermès Bélusca-Maïto
231de344d0 [FREELDR:ARCH] Improve configuration resource list size calculations (#8629)
Prefer using the syntax:
`FIELD_OFFSET(CM_PARTIAL_RESOURCE_LIST, PartialDescriptors[k]) + ...;`
which is in general clearer and explicitly specifies the actual
number of resource descriptors used, over the other one:
`sizeof(CM_PARTIAL_RESOURCE_LIST) + (k-1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR) + ...;`

Based on a suggestion by Dmitry Borisov.
2026-01-30 13:48:08 +01:00
Justin Miller
bc690cfe43 [VIDEOPRT] Allow later nvidia cards to load (#8646)
Clear out the miniport owned extension and assign the slot iD properly
2026-01-30 11:23:00 +00:00
Doug Lyons
076699bff6 [USER32] Fix GSView 5.0 "Espanol" background color (Retry of PR #4015) (#8588)
CORE-13935

Improve "is_dib_monochrome" function in win32ss/user/user32/windows/cursoricon.c
so that it returns TRUE on a monochrome color table with WHITE first and BLACK second.
2026-01-30 01:50:39 -06:00
Doug Lyons
3637fd8b1d [USER32_APITEST] New LoadImage 1bpp test for PR #4015 retry (#8522)
CORE-13935

* Make LoadImage1bpp.c a sub-test of LoadImage.c for apitest.

* Add broken() for Vista x64 Testbot regression test fix based on reviewer comments.
2026-01-29 22:06:57 -06:00
Justin Miller
a30ed15ceb [WIN32SS:NTGDI] Handle AMD GPUs being dumb when they do a double restore (#8644)
According to the kerestorefloatingpointstate msdn article shouldn't be on the kernel's responsibility to handle. for the life of me i couldn't figure out why this specific driver does this until finally I tried this on Windows and low and behold on checked builds of windows it actually tells you it does the exact same thing. Investigating deeper I realized win32k just has some extra handling for this dumb case.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2026-01-29 23:17:33 +00:00
Justin Miller
0203d1778a [WINED3D] FFS has to return correct values on both msvc and gcc (#8625)
accordingly to
https://www.man7.org/linux/man-pages/man3/ffs.3.html
we have been doing this wrong for awhile and it causes opengl to freeze
2026-01-29 22:30:34 +00:00
Hermès Bélusca-Maïto
8c9039bbd4 [WINLOGON] Workaround buggy 3rd-party DLLs that use a wrong notification handler calling convention (#8640)
CORE-20279

PRELIMINARY REMARK: The described bug and code workaround only applies
for x86 32-bit builds.

----

While the Winlogon notification handlers[^1] actually use a `STDCALL`
calling convention, which can be trivially verified by debugging the
official Windows <= 2003 winlogon.exe and its notification extensions,
there exist 3rd-party Winlogon notification DLLs, like the `Ati2evxx.dll`
one from AMD/ATI XP video drivers, that use a `CDECL` calling convention,
or an invalid number (zero) of parameters.

I think the reason why this happens is as follows.
The official documentation[^1] indicates that the handlers have the
following prototype:
```c
void Event_Handler_Function_Name(
  _In_ PWLX_NOTIFICATION_INFO pInfo
);
```
The documentation (and possibly the internal header Windows is using for
Winlogon) is sloppy, because it doesn't tell whether the convention is
`STDCALL` or `CDECL`. When compiling routines with such a signature, the
compiler will employ whatever default convention it is set to use.

Windows code is typically compiled with `STDCALL` convention as the default
(see e.g. how the Windows Development Kit is set up), thus, such a
function signature would default to `STDCALL`. Observation (with debugger)
shows that it is what Windows' winlogon.exe is indeed expecting.

However, 3rd-party code using a different development environment, could
set the compiler to use `CDECL` as the default calling convention. As a
result, the function signature from above would use `CDECL` instead.

The difference between the `STDCALL` and `CDECL` conventions is how the
function parameters are passed on the stack and how the stack is cleaned
at the end (`STDCALL`: the function unwinds the stack; `CDECL`: the caller
does it). A calling convention mismatch would therefore corrupt the stack,
and this is exactly what happens with the `Ati2evxx.dll` from the AMD/ATI
drivers, see CORE-20279.

The ReactOS Winlogon crashes from the `_RTC_Failure()` handler just after
the 3rd-party handler returns, since we compile our code with runtime checks
enabled. Windows' winlogon.exe doesn't apparently crash, because neither
in Release nor in Checked/Debug mode did they compile winlogon.exe with
RTC enabled. However, its stack would become more corrupt with time.

In order to alleviate this in ReactOS' winlogon.exe, I decided to use
a "generic" workaround, manually calling the handler with inline ASM
(which is OK since the problem and solution is x86-specific only).
It does something similar to what the RTC support does: it checks the
stack pointer after the call and restores it if needed.
An informative message is then emitted in the debugger telling which DLL
is buggy and needs to be fixed.

[^1]: https://learn.microsoft.com/en-us/windows/win32/secauthn/event-handler-function-prototype
2026-01-29 21:04:44 +01:00
Timo Kreuzer
62cc9c498e [CMAKE] Don't re-archive import libraries
Instead create an IMPORTED library from the output of dlltool.
This prevents binutils 2.40+ nested archive crash (bug #31614):
2026-01-29 17:13:40 +02:00
Timo Kreuzer
07de64139a [GCC_SSP] Turn the GCC stack protector lib into a normal library
Stop pointless target_sources(xxx PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>). The only effect it has is to force the object file into the target, which was already done by specifying the libraries as OBJECT libraries, which is also pointless, and only leads to problems.
2026-01-29 17:13:40 +02:00
Timo Kreuzer
f8278bd1ed [CRTDLL] Mark _onexit as extern
This is the same workaround already applied to msvcrt to prevent conflicts with msvcrtex.
2026-01-29 17:13:40 +02:00
Justin Miller
c990b725b4 [WIN32SS] Remove NATIVE_REACTX check - reenable Oleg's code (#8554)
* [REACTX] Simple Non-AGP ddraw allocator
* [WIN32SS] remove NATIVE_REACTX check - reenable oleg's code
JIRA issue: CORE-19142

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2026-01-29 06:28:43 +00:00
Justin Miller
a08d639b22 [WIN32SS:NTGDI][VIDEOPRT] Multimonitor on RealHW fixes (#8638)
This commit attempts to resolve two regressions and improve realhw behavior
A PNP_DETECTED_FATAL_ERROR bug check caused by the monitor device instance being duplicated.
https://jira.reactos.org/browse/CORE-20410
this is mostly due to ChildID being overwritten with the same bus/slot when 2 monitors are attached to one GPU
And video drivers failing to startup after calling VideoPortCreateSecondaryDisplay

Co-authored-by: Dmitry Borisov <di.sean@protonmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2026-01-29 04:29:55 +00:00
Katayama Hirofumi MZ
13c4ef9c40 [BOOTDATA][SHELL32][SHIMGVW] Populate HKCR\SystemFileAssociations (#8626)
JIRA issue: CORE-19355
- Modify boot/bootdata/hivecls.inf.
- Add dll/win32/shell32/res/rgs/
  systemfileassociations.rgs.
- Add dll/win32/shimgvw/res/
  systemfileassociations.rgs.
2026-01-29 07:13:30 +09:00
Timo Kreuzer
c57a471e1b [NTDLL_WINTEST] Improve NtMapViewOfSection test
- Fix ZeroBits test and remove some useless and confusing "tests"
- Add another ZeroBits test (use as a bitmask)
- Fix some status tests for Windows 10
2026-01-28 12:59:20 +02:00