Commit graph

87503 commits

Author SHA1 Message Date
Timo Kreuzer
48ec990a49 [KERNEL32_VISTA] Implement LCIDToLocaleName 2025-06-19 17:36:40 +00:00
Timo Kreuzer
7c1b7ee87d [KERNEL32_VISTA] Implement LocaleNameToLCID 2025-06-19 17:36:40 +00:00
Timo Kreuzer
fa79aaa0f3 [KERNEL32_APITEST] Add tests for LocaleNameToLCID 2025-06-19 17:36:40 +00:00
Timo Kreuzer
be1cd6987b [KERNEL32_APITEST] Add a test for LCMapString 2025-06-19 17:36:40 +00:00
Timo Kreuzer
e83eccee31 [KERNEL32] Zero out CPINFO in GetCPInfo 2025-06-19 17:36:40 +00:00
Timo Kreuzer
2bec8c9d4c [KERNEL32_APITEST] Add tests for GetCPInfo 2025-06-19 17:36:40 +00:00
Timo Kreuzer
c495e0d727 ]HIVESYS] Add missing NLS files to registry 2025-06-19 17:36:40 +00:00
Timo Kreuzer
189ce2a5a6 [KERNEL32_VISTA] Implement GetUserDefaultLocaleName 2025-06-19 17:36:40 +00:00
Timo Kreuzer
d5286af2e1 [NTDLL_VISTA] Export RtlLcidToLocaleName and RtlLocaleNameToLcid 2025-06-19 17:36:40 +00:00
Timo Kreuzer
942d362ff8 [NTDLL_APITEST] Add another test for RtlLocaleNameToLcid 2025-06-19 17:36:40 +00:00
Serge Gautherie
9832737843
[NTDLL_WINETEST][NTOS:PS] Fix a few NtQueryInformationProcess(Process*) handling cases (#8136)
* [NTDLL_WINETEST] `test_query_process_debug_object_handle()`: one WINESYNC

Cherry-pick WineTest part of:
52d733b5c4
server: Implement retrieving the debug object of a process.
by: Alexandre Julliard <julliard@winehq.org>

* [NTOS:PS] Fix `NtQueryInformationProcess(ProcessDebugObjectHandle)`

Close the retrieved `DebugPort` on failure.
Addendum to commit 1e172203a (r55734).

* [NTOS:PS] Optimize `NtQueryInformationProcess(ProcessWow64Information)` on 32-bit.

No need to do the ExAcquire/ReleaseRundownProtection rigamarole since
we aren't retrieving the `Process->Wow64Process` on 32-bit builds.
Addendum to commit 1e172203a (r55734).

* [NTOS:PS] Fix `NtQueryInformationProcess(ProcessExecuteFlags)`

s/return/break/ on a failure case.
Addendum to commit 1e172203a (r55734).

* [NTOS:PS] NtQueryInformationProcess(): Optimize `*ReturnLength` assignment

Enter the SEH block only if we know we'll have to set `*ReturnLength` on return.
Addendum to commit 2278c2914 (r23175).
2025-06-19 18:47:31 +02:00
Hermès Bélusca-Maïto
b8c5e9c209
[WINLOGON] Check whether error popups should be shown if loading user profile fails (#8139)
Respect the `"NoPopupsOnBoot"` REG_DWORD value in `HKLM\System\CurrentControlSet\Control\Windows`
https://www.visualautomation.com/comprod/secure6/nopopups.htm
2025-06-19 16:09:31 +02:00
Hermès Bélusca-Maïto
cbf3e61d63
[USERENV] Implement error reporting via error dialog (#8139)
This feature is used to report errors when `LoadUserProfile()` fails.
It is also meant to be used by other functions in the future.

The error dialog is shown only when the `PI_NOUI` flag is _NOT_ set
in `PROFILEINFO::dwFlags`.

- Add support for retrieving USERENV-specific registry policies,
  in a systematic way.

- Add support for "timed" dialogs that automatically close after
  a given timeout has elapsed.
  The default timeout is controlled by the `"ProfileDlgTimeOut"` policy:
  https://www.visualautomation.com/comprod/secure6/profile_.htm
  https://www.infania.net/misc/kbarchive/kb/196/Q196284/index.html

- TODO for the future: report the error in the event log.

- `LoadUserProfileW()`: Reset `ret` to `FALSE` after the call to
  `CreateUserProfileW()`; this allows to return failure in case
  any other function calls down the line fails. (`ret` is set to
  `TRUE` only when everything has succeeded.)
2025-06-19 16:09:30 +02:00
Katayama Hirofumi MZ
3a96c90c54
[NTUSER][USER32] Re-implement WM_POPUPSYSTEMMENU message (#8144)
This PR resolves a bug of #8094. #8094
correctly validates the flags. TPM_SYSTEM_MENU is an internal flag
and not a valid flag for TrackPopupMenu.
Thus, calling TrackPopupMenu.TPM_SYSTEM_MENU
in User32DefWindowProc was wrong.
This caused failure of taskbar context
menu.

JIRA issue: CORE-20238

- Move WM_POPUPSYSTEMMENU
  message handling of user32 into
  win32k.sys!IntDefWindowProc.
- Use win32k.sys!IntTrackPopupMenuEx
  instead of user32!TrackPopupMenu
  in handling of WM_POPUPSYSTEMMENU.
2025-06-19 22:59:27 +09:00
Eric Kohl
9853869a79 [SETUPAPI] Implement CM_Get_Device_Interface_Alias_ExA 2025-06-19 12:48:55 +02:00
Serge Gautherie
4f7e9dc2ed
[NTOS:PS] Fix NtQueryInformationProcess(ProcessImageInformation) (#8134)
Do not overwrite Status failure value.

Addendum to commit bf493b93a (r59859).
2025-06-19 12:23:32 +02:00
Eric Kohl
44da696ad7 [UMPNPMGR] Fix PNP_GetInterfaceDeviceAlias
Pass Parameters to NtPlugPlayControl.
2025-06-19 11:49:56 +02:00
Eric Kohl
0b1a448150 [NTOS:PNP] Implement NtPlugPlayControl.PlugPlayControlGetInterfaceDeviceAlias 2025-06-19 11:06:20 +02:00
Adam Słaboń
81a4d8344b
[NTOS:SE] SeValidSecurityDescriptor: Use relative security descriptor header size for length calculation (#8127)
Fixes Win2k3 ntfs.sys on x64
2025-06-18 23:55:27 +02:00
Dmitry Borisov
b5f763447c
[COMCTL32] Fix product verison (#7854)
Specify the correct comctl version to fix tooltips in SIV software.
2025-06-18 20:54:44 +02:00
Whindmar Saksit
8ff8f676b3
[SYSDM][BROWSEUI][SHELL32][SDK] Added Advanced Performance Options property sheets (#8029) 2025-06-18 17:46:38 +02:00
Carl J. Bialorucki
bf734eb002
[APPHELP_APITEST] Fix test failures on Vista, 7, 8.1 x86 and x64 (#8122)
* Disable most apphelp:env and some apphelp:db tests on x64 due to structure differences breaking these tests.
* Add new tag lists for Windows 8.1 and Windows 10 in apphelp:apphelp test.
* Make a few changes to accept either Windows 10 or Windows 8.1 and older behavior in apphelp:apphelp test.
* Create new shimdata structures for Windows 8 and Windows Vista.
* Add attribute size definitions for Vista, 8.1, and 10.
* Create new shim data validation functions for Vista and 8.1.
* Use local time instead of UTC time for shim db version. This fixes test failures when the day in local time and the day in UTC are different.
2025-06-17 11:18:32 -06:00
Mikhail Tyukin
ae4d4544d9
[MSWSOCK] Fix integer overflow (#8141)
Fix integer overflow in mswsock which could result in a crash in ws2_32.dll when using x64 builds.
2025-06-17 16:45:44 +02:00
Katayama Hirofumi MZ
13e7f56754
[INDICDLL] Don't use WH_KEYBOARD_LL but WH_KEYBOARD (#8142)
- Replace WH_KEYBOARD_LL hook and
  handler with WH_KEYBOARD and
  adapted KeyboardProc.
- Update key-state checks to use
  HIWORD(lParam) flags and
  GetKeyState.
2025-06-17 18:44:15 +09:00
Katayama Hirofumi MZ
e26ad0de12
[MSCTF] Translate ITfDocumentMgr into C++ (#8120)
Implementing missing features...
JIRA issue: CORE-19361
- Delete documentmgr.c and add
  documentmgr.cpp.
- Make ITfDocumentMgr and
  IEnumTfContexts C++ code.
2025-06-17 07:08:42 +09:00
Eric Kohl
44d99fa60f [UMPNPMGR][NDK] Implement PNP_GetInterfaceDeviceAlias 2025-06-16 23:51:12 +02:00
Vitaly Orekhov
26368a1ead
[PSDK] Enumerate WPA3 algorithms in DOT11_AUTH_ALGORITHM (#8129)
Reference: https://learn.microsoft.com/en-us/windows/win32/nativewifi/dot11-auth-algorithm

CORE-6905
2025-06-16 21:57:48 +02:00
Serge Gautherie
824fae4cb1
[SYSSETUP] wizard.c!UnattendSetup: Fix Theme page order (#8098)
Especially, unskip DateTime page.

Addendum to commit fc1f0c2088 (r75495).
CORE-15848
2025-06-16 21:55:57 +02:00
Whindmar Saksit
a3b032b118
[SHELL32] Fix IShellExecuteHookW (#8097) 2025-06-16 21:47:45 +02:00
Timo Kreuzer
c0b4a2cab0 [NTDLL_APITEST] Fix unreliable test for NtContinue
Some EFLAGS bits depend on the hardware / OS environments.
2025-06-16 16:47:41 +00:00
Hermès Bélusca-Maïto
82a57e41e1
[WINLOGON] Correctly reset LogonState in case logon or shutdown fails (#8133)
CORE-18351 CORE-18237 CORE-17137 CORE-16567
CORE-15360 CORE-5071 CORE-3804

Reset `LogonState` back to `STATE_LOGGED_OFF` before invoking
`WlxDisplaySASNotice()` when:
- in `STATE_LOGGED_OFF_SAS` state, `HandleLogon()` failed;
- or when an attempted shutdown operation failed.

This fixes the resulting inconsistent `LogonState` that happened if
any of these operations failed due to legitimate reasons. For example,
a corrupted user profile that caused the login attempt to abort, or,
an ongoing shutdown attempt being aborted as well.

One of the user-visible effects of this inconsistency, was the inability
to access the familiar Logged-Out SAS dialog by pressing Ctrl-Alt-Del at
the invite (SAS notice) dialog, because the `LogonState` was incorrectly
left into the `STATE_LOGGED_OFF_SAS` state, instead of being reset to
`STATE_LOGGED_OFF`.

----

Typical scenario:
The "Administrator" user, who is auto-logged-in by default after the
installation, gets a corrupted ntuser.dat profile registry hive if the
2nd-stage installation is aborted at the end by force-restarting ReactOS.
After reboot, ReactOS tries to log into the account, but fails, and goes
back to the Ctrl-Alt-Del invite dialog.
Before this fix, the user couldn't go into the Logged-Out SAS dialog to
enter new login credentials and attempt login to another account.
This is now fixed.
2025-06-16 14:16:47 +02:00
Hermès Bélusca-Maïto
545f9cebb2
[WINLOGON] Allow workstation (un)locking only if we are in the correct LogonState (#8132)
- Locking (`WLX_SAS_ACTION_LOCK_WKSTA`) is allowed only if `LogonState`
  is either `STATE_LOGGED_ON` or `STATE_LOGGED_ON_SAS`, i.e., either the
  user invokes the `user32:LockWorkStation()` API or presses Win-L, or,
  opens the Logged-On SAS dialog then clicks on the "Lock Workstation" button.

- Unlocking (`WLX_SAS_ACTION_UNLOCK_WKSTA`) is allowed only if
  `LogonState` is either `STATE_LOCKED` or `STATE_LOCKED_SAS`,
  i.e., the workstation is locked and we are either on the Locked-
  notice or on the SAS dialog that asks for the user credentials.

Additionally:

- Fix the invocation order of `LockHandler`/`UnlockHandler` notifications:
  * the `LockHandler` is invoked on the Winlogon desktop, just before
    displaying the Locked-notice dialog;
  * the `UnlockHandler` is invoked on the Winlogon desktop, just before
    switching back to the user's desktop.

- If we are on the Logged-On SAS dialog and the user presses Win-L to
  lock the workstation (instead of pressing the corresponding dialog
  button), the `DoGenericAction(WLX_SAS_ACTION_LOCK_WKSTA)` handler is
  invoked asynchronously while the SAS dialog is still being displayed.
  We thus need to ensure all the existing dialogs are closed before
  displaying the Locked-notice dialog, in order to avoid stray dialogs
  being shown concurrently.
2025-06-16 14:11:42 +02:00
Hermès Bélusca-Maïto
b0fbeb6801
[WINLOGON][MSGINA] Improve WLX_SAS_ACTION_TASKLIST handling in logged-on/logged-on SAS states (#8131)
CORE-13478
Addendum to commit 46dcab7ab.

The `WLX_SAS_ACTION_TASKLIST` action can be invoked in three scenarii to
open the Task-Manager:

1. from the logged-on state (`LogonState == STATE_LOGGED_ON`), when the
   user presses Ctrl-Shift-Esc while being on its own desktop (usual case);

2. from the Logged-On SAS dialog (`LogonState == STATE_LOGGED_ON_SAS`),
   when the user presses the "Task-Manager" button: here Winlogon should
   switch back to the user's desktop, restoring `STATE_LOGGED_ON` and
   start the TaskMgr;

3. or when the user presses Ctrl-Shift-Esc **while being on the Logged-On
   SAS dialog**: in this case, the Task-Manager is started on the
   currently-hidden user's desktop (and so, will be hidden), but the SAS
   dialog stays open. The user will see the opened TaskMgr once (s)he
   closes the SAS dialog and Winlogon switches back to the user's desktop.

In order to support these scenarii, the `WLX_SAS_ACTION_TASKLIST` action
handling is reworked:

- `SASWindowProc(WM_HOTKEY, IDHK_CTRL_SHIFT_ESC)` always invokes the
  `DoGenericAction(WLX_SAS_ACTION_TASKLIST)`: this allows centralizing
  inside `DoGenericAction()` the condition checks for starting TaskMgr.

- `DoGenericAction(WLX_SAS_ACTION_TASKLIST)` just starts the Task-Manager
  only if the Winlogon's `LogonState` is either `STATE_LOGGED_ON` or
  `STATE_LOGGED_ON_SAS`. It doesn't attempt there to switch desktops nor
  change the `LogonState` value, in order to support scenarii 2 and 3.

- The switch from/to Winlogon/user's desktops when going to the
  `LogonState: STATE_LOGGED_ON -> STATE_LOGGED_ON_SAS` change is done
  in `DispatchSAS()`, just before invoking the GINA's `WlxLoggedOnSAS()`
  (see below for more details) and just after it returns, only in the
  necessary cases.

----

[MSGINA] The WlxLoggedOnSAS() dialog shouldn't switch the desktops itself.

This behaviour can be observed on Windows with Winlogon debugging + tracing
enabled. It is Winlogon instead that does the desktop switch itself, as for
all the other SAS dialogs, in addition to changing its internal `LogonState`.

Fix for commit 7aecedf79 (r58785).
2025-06-16 14:04:33 +02:00
Hermès Bélusca-Maïto
a8c5f55315
[WINLOGON] Invoke NtShutdownSystem() with an adequate shutdown action (#8130)
Specify a shutdown action value corresponding to the
`WLX_SAS_ACTION_SHUTDOWN_*` ones.
2025-06-16 14:02:55 +02:00
Hermès Bélusca-Maïto
b3e56c95ef
[WINLOGON] WlxSwitchDesktopToUser/Winlogon(): ensure the calling thread is assigned the specified desktop (#8130)
Invoke SetThreadDesktop() after a successful SwitchDesktop() call.
2025-06-16 14:02:55 +02:00
Hermès Bélusca-Maïto
14894f2e27
[WINLOGON] DefaultWlxWindowProc(WLX_WM_SAS): return an adequate WLX_DLG_* value (#8130)
For more details, see:
https://learn.microsoft.com/en-us/windows/win32/api/winwlx/nc-winwlx-pwlx_dialog_box_indirect_param#return-value
2025-06-16 14:02:49 +02:00
Katayama Hirofumi MZ
24b2c4be8c
[INF] intl.inf: Add [KbdLayoutIds] section (#8115)
Win2K internat.exe uses this section.
WinXP and Win2k3 have this section.
JIRA issue: CORE-19268
- Add [KbdLayoutIds] section and add values to intl.inf.
- Add some missing "Layout Id" for "SYSTEM\
  CurrentControlSet\Control\Keyboard Layouts" of
  hivesys.inf.
2025-06-16 17:16:19 +09:00
Katayama Hirofumi MZ
1ece139178
[SHLWAPI][SHLWAPI_APITEST][SDK] Support MayExecForward + MayQSForward (#8125)
Follow-up of #8124. Implementing missing features...
JIRA issue: CORE-19278
- Implement MayExecForward and MayQSForward
  functions.
- Modify these prototypes in <shlwapi_undoc.h>.
- Add tests to shlwapi_apitest IsQSForward.
2025-06-16 07:31:47 +09:00
Eric Kohl
37cc1e2fd6 [NTOS:IO] Move location paths code because they are not stored in the registry 2025-06-15 23:36:53 +02:00
Oleg Dubinskiy
42aaad43db
[OLEAUT32][OLEAUT32_WINETEST] Import LPSAFEARRAY user marshal interface marshaling support from Wine (#8121)
Import the following Wine commits:
oleaut32: Implement LPSAFEARRAY user marshal interface marshaling.
a1f2b44a1b
oleaut32/tests: Add tests for LPSAFEARRAY user marshal interface marshaling.
b2574278f7
containing the implementation itself and a test for it.
Fixes:
1) improperly displayed comboboxes with OS type and version selection,
2) failure to save/load virtual machine settings in/from XML file
in VirtualBox 3.0.0 - 4.0.36 versions and
3) improperly displayed comboboxes in 3DMark2001.
As result, this also allows to create and start a virtual machine(s) in VirtualBox up to 3.0.8 version. For newer VirtualBox versions, another fix is required.
CORE-8418, CORE-11254, CORE-14507, CORE-17980, CORE-18496, CORE-20015
2025-06-15 16:08:51 +02:00
Katayama Hirofumi MZ
4e7702a6a9
[EXPLORER] Add fullscreen handling (#8105)
Adds support for handling fullscreen
applications (a.k.a. “rude apps”) so
the taskbar can hide or show
appropriately.

JIRA issue: CORE-11242, CORE-15681,
CORE-16056, CORE-16063, CORE-16131,
CORE-16132, CORE-16192, CORE-16196,
CORE-16249, CORE-16290, CORE-16313,
CORE-16320, CORE-16322, CORE-16347,
CORE-16584, CORE-19795, CORE-9862,
CORE-16230, CORE-10738, 
and CORE-12263.

- Removes legacy pulse/timer logic in
  the tray window and adds a fullscreen
  notification workflow.
- Implements fullscreen detection
  across monitors in the task switcher,
  using a sequence of validation timers.
- Defines a new ITrayWindow::
  NotifyFullScreenToAppBars interface
  method to broadcast fullscreen state
  to appbars.
2025-06-15 21:20:45 +09:00
Ethan Rodensky
7ec3a7e98b [UXTHEME] Implement various Vista+ functions, mostly from WINE 2025-06-14 18:33:39 -07:00
Katayama Hirofumi MZ
01a6c4874a
[MSCTF] CRange: Follow-up of #8096; Fix crash on tests (#8126)
Fix CRASH of msctf:inputprocessor tests.
JIRA issue: CORE-19361
- Implement Range_Constructor and
  TF_SELECTION_to_TS_SELECTION_ACP functions.
- Adapt CRange to these changes.
2025-06-15 09:26:30 +09:00
Katayama Hirofumi MZ
3b73f625b8 [SHLWAPI_APITEST] Follow-up of #8124; Fix IsQSForward testcase
JIRA issue: CORE-19278
2025-06-15 08:14:35 +09:00
Katayama Hirofumi MZ
80381b0578
[SHLWAPI][SHLWAPI_APITEST][SDK] Implement IsQSForward (#8124)
Implementing missing features...
JIRA issue: CORE-19278
- Implement IsQSForward function.
- Modify IsQSForward prototype in <shlwapi_undoc.h>
- Add IsQSForward testcase to shlwapi_apitest.
2025-06-14 20:57:33 +09:00
Katayama Hirofumi MZ
b39cb1229a
[SHLWAPI] Implement SHCreateShellPalette (#8123)
Implementing missing features...
JIRA issue: CORE-19278
Implement SHCreateShellPalette function.
2025-06-14 20:27:23 +09:00
Katayama Hirofumi MZ
62ad2403a0
[USER32][COMCTL32] Edit: Optimize EDIT_SetCaretPos for speed (#8113)
The caret move on IME was slow until this PR.
JIRA issue: CORE-19268
- Don't use ImmIsIME but use IS_IME_HKL(hKL) in
  EDIT_SetCaretPos function. This change improves
  the caret speed.
- Prohibit display of composition window for Korean
  in the handling of WM_IME_SETCONTEXT and
  WM_IME_STARTCOMPOSITION, because Korean
  doesn't want it.
2025-06-14 20:26:05 +09:00
Timo Kreuzer
d0ca0f41f7 [MSVCRT_WINETEST] Skip 2 hanging pipe tests on ReactOS 2025-06-14 10:48:15 +00:00
Timo Kreuzer
1fef0ce8de [MSVCRT_WINETEST] Improve msvcrt_winetest
- Reduce diff to wine
- Enable todo_wine
2025-06-14 10:48:15 +00:00
Timo Kreuzer
17289faf7f [WINETEST] Allow to use USE_WINE_TODOS with win_skip 2025-06-14 10:48:15 +00:00