Commit graph

3273 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
bb881021ce
[WINLOGON] Move logoff/shutdown thread handling code into a helper function (#8222)
This code was in common between HandleLogoff() and HandleShutdown().
2025-07-04 17:07:03 +02:00
Piotr Hetnarowicz
5cbfa17321
[TASKKILL] Update Polish (pl-PL) translation (#8189)
Addendum to 97e7efc020 and 1519a676bd.
2025-07-04 08:44:40 +03:00
Piotr Hetnarowicz
ba326df6d9
[W32TIME] Update Polish (pl-PL) translation (#8199)
Addendum to e4898e6e0b and 2a616b0a14.
2025-07-03 14:36:22 +03:00
Piotr Hetnarowicz
eb0e645def
[CMD] Update Polish (pl-PL) translation (#8193)
Addendum to 736d81938a and 18acf79551.
2025-07-03 14:26:23 +03:00
Piotr Hetnarowicz
8eb8919ce0
[TRACERT] Update Polish (pl-PL) translation (#8187)
Addendum to be56c5c328.
2025-07-03 14:19:04 +03:00
Katayama Hirofumi MZ
02ea0aaa93
[MSCTF] Make compartment manager C++ (#8218)
Implementing missing features...
JIRA issue: CORE-19361
- Delete compartmentmgr.c and
  add compartmentmgr.cpp.
- Make ITfCompartmentMgr
  implementation C++.
2025-07-03 06:48:16 +09:00
Hermès Bélusca-Maïto
2e4cdd4c23
[WINLOGON] Improve EWX_* flags to WLX_* actions mapping in WM_LOGONNOTIFY:LN_LOGOFF
CORE-8322 CORE-11550
2025-07-02 22:44:28 +02:00
Katayama Hirofumi MZ
06343fa9a5
[MSCTF] Make category manager C++ (#8210)
Implementing missing features...
JIRA issue: CORE-19361
- Delete categorymgr.c and add
  categorymgr.cpp.
- Make category manager
  implementation C++.
2025-07-01 21:39:26 +09:00
Hermès Bélusca-Maïto
3f73319068
[WINLOGON] Cleanup user login information when logon fails and at logoff (#8182) 2025-06-30 14:02:34 +02:00
Katayama Hirofumi MZ
4866a25a8f
[EXPLORER] Fix Taskbar context menu Z-order bug (#8186)
Taskbar task button context menu was wrongly
overlapped by Taskbar. #8105 introduced this bug.
JIRA issue: CORE-20260
- Don't bring the taskbar to top on no rude app.
- Check the target window by FindTaskItem in
  OnWindowActivated and OnWindowDestroyed.
2025-06-30 10:55:15 +09:00
Hermès Bélusca-Maïto
488db450b8
[IPCONFIG] Update Russian (ru-RU) and Ukrainian (uk-UA) translations (#8165)
Co-authored-by: Oleg Dubinskiy <oleg.dubinskij30@gmail.com>
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2025-06-29 16:33:58 +02:00
Hermès Bélusca-Maïto
3ea9bab324
[IPCONFIG] Review translations (#8165)
- Improve help/usage display formatting for all languages.

- Change "IP" to "IPv4" where applicable (our IPCONFIG doesn't support
  IPv6 yet, but prepare the terrain in the translations :)

- Fix and finish French (fr-FR) translation.
2025-06-29 16:33:57 +02:00
Hermès Bélusca-Maïto
af96e9f353
[TRANSLATIONS] Fix some typos in French translations (#8164) 2025-06-29 16:31:39 +02:00
Eric Kohl
71b6fab74b [UMPNPMGR] PNP_AddEmptyLogConf: Add resource list to an existing requirements list 2025-06-28 15:58:11 +02:00
Katayama Hirofumi MZ
bc64f3aee1
[INDICDLL] Don't use user32 in DLL_PROCESS_ATTACH (#8179)
Related to #8145. We shouldn't use
user32 functions in
DllMain.DLL_PROCESS_ATTACH.
This bug affects Global Hook. See
DllMain and "Dynamic-Link Library
Best Practices" on MS Learn.
JIRA issue: CORE-20242
Don't use user32!FindWindow in
DllMain.DLL_PROCESS_ATTACH,
but in KbSwitchSetHooks function.
2025-06-28 04:59:08 +09:00
Hermès Bélusca-Maïto
f60be66d1f
[MSGINA][WINLOGON] Carefully zero password memory buffers before freeing them (#8172)
Including variables containing pointers to a password buffer and its lengths.
2025-06-27 16:45:12 +02:00
Whindmar Saksit
b087c08d76
[MSCONFIG] Disable actions that are not implemented (#8178) 2025-06-27 13:53:09 +02:00
Eric Kohl
4afb871782 [UMPNPMGR] Implement PNP_UnregisterDeviceClassAssociation 2025-06-26 22:13:59 +02:00
Eric Kohl
f1332c7722 [UMPNPMGR] Implement PNP_RegisterDeviceClassAssociation 2025-06-25 21:39:51 +02:00
Hermès Bélusca-Maïto
b254ea8274
[MSGINA][WINLOGON] Perform thorough memory cleanup after user logging (#8155)
- MSGINA: The `pMprNotifyInfo` and `pProfile` structures returned by
  `WlxLoggedOutSAS()`, as well as all of their pointer fields, are
  allocated by `LocalAlloc()`[^1][^2]. This is what Windows' Winlogon
  expects (and ours too, for interoperability with GINA dlls written
  for Windows), as it then frees them using `LocalFree()`.

- WINLOGON: In `HandleLogon()`, free the cached `MprNotifyInfo` and
  `Profile` buffers (and all their members) obtained from a previous
  call to `WlxLoggedOutSAS()`.

[^1]: https://learn.microsoft.com/en-us/windows/win32/api/winwlx/nf-winwlx-wlxloggedoutsas
[^2]: 3rd-party GINAs rely on this as well. One example can be found at:
      https://www.codeproject.com/Articles/20656/Winlogon-using-Mobile-Disk
2025-06-24 20:30:34 +02:00
Piotr Hetnarowicz
64d1301b5a
[EXPLORER] Update Polish (pl-PL) translation (#8160) 2025-06-24 16:59:32 +02:00
Hermès Bélusca-Maïto
b401f547ae
[NDK][ROSLOAD][ROSTESTS][SDK][WINE] Fix and use standard 'ReactOS' casing (#8163) 2025-06-22 22:49:54 +02:00
Eric Kohl
8bf9b670ed [DHCPCSVC] Enable DHCP for wired Ethernet and wireless IEEE802.11 network interfaces
Fixes CORE-20244
2025-06-22 10:57:50 +02:00
Katayama Hirofumi MZ
66b782da3c
[KBSWITCH][INDICDLL] Fix initialization bug (#8135)
There was a bug that hKbSwitchWnd was not correctly initialized.
JIRA issue: N/A
- Check if hKbSwitchWnd is initialized or not.
- When hKbSwitchWnd was not initialized, initialize it on DllMain.
- Enable trace in indicdll.dll.
2025-06-22 10:52:58 +09: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
Eric Kohl
44da696ad7 [UMPNPMGR] Fix PNP_GetInterfaceDeviceAlias
Pass Parameters to NtPlugPlayControl.
2025-06-19 11:49:56 +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
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
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
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
c894716295
[MSCTF][SDK] Add CDisplayAttributeMgr stubs (#8116)
Implementing missing features...
JIRA issue: CORE-19361
- Delete displayattributemgr.c and
  add displayattributemgr.cpp.
- Add CDisplayAttributeMgr class
  as stubs.
2025-06-13 05:31:01 +09:00
Katayama Hirofumi MZ
474212939d
[KBSWITCH] Handle IME Menu default items (#8101)
Finishing IME menu work. The IME menu of the system
pen icon has to append the default items if DMI_LEFT and
RDMI_RIGHT are not specified.
JIRA issue: CORE-20142
- Add IsRegImeToolbarShown and ShowImeToolbar
  helper functions.
- Add more code into KbSwitch_OnPenIconMsg function
  to handle IME menu default items.
- Add some resource strings.
2025-06-12 09:33:23 +09:00
Doug Lyons
70732b0ca4
[TASKMGR] Work around memory leak in performance tab of taskmgr (#8017)
* [TASKMGR] Work around Taskmgr memory leak by changing heap allocation methodology.
CORE-18014
2025-06-10 18:04:11 -05:00
Katayama Hirofumi MZ
5b94656442
[MSCTF][SDK] Add stubs for CRange (#8096)
This PR is just a step, but a slightly
great one for OS development history.
JIRA issue: CORE-19361
- Add IAnchor interface into textstor.idl.
- Fix ITfRangeAnchor interface (that
  was wrong).
- Delete range.c.
- Add range.cpp.
- Add CRange class as stubs.
2025-06-09 23:51:17 +09:00
Katayama Hirofumi MZ
2c124893ec [KBSWITCH] Update indicdll/res/*.ico
CORE-20142
2025-06-09 08:39:55 +09:00
Katayama Hirofumi MZ
6128c20937
[EXPLORER] Set MINMAXINFO correctly (#8100)
JIRA issue: CORE-20219
Set MINMAXINFO data in WM_GETMINMAXINFO
message handling.
2025-06-08 19:49:45 +09:00
Katayama Hirofumi MZ
586989350b
[KBSWITCH] Support System Pen Icon (#8080)
## Purpose
Supporting System Pen icon and IME menus for
East-Asian users.
JIRA issue: CORE-20142

## Overview
The East-Asian system has the system pen icon
in taskbar additionally. The system pen icon
shows the current IME status.

If the user clicked the IME system pen icon,
the IME menu will open. The IME system pen icon
can be customized by the IME module by posting
indicator messages.

## Proposed changes
- Add default pen icon resources.
- Add base/applications/kbswitch/imemenu.c to
  handle IME menus.
- Add code for adding, modifying and deleting
  the System Pen icon.
- Modify indicdll.spec.
- Fix popup menu alignment.
2025-06-08 17:21:24 +09:00
Hervé Poussineau
85cde17c46 [DISKPART] Fix wrong '\n' in Italian translation
This fixes some warnings:
- it-IT.rc:115: unrecognized escape sequence
- it-IT.rc:160: unrecognized escape sequence
2025-06-08 08:58:59 +02:00
Katayama Hirofumi MZ
7cf1e01cd4
[SDK][MSUTB] Move WM_IME_SYSTEM to <imm32_undoc.h> (#8093)
Defining macros in proper place will improve header
compatibility.
JIRA issue: CORE-19268
- Move WM_IME_SYSTEM macro in <undocuser.h>
  into <imm32_undoc.h>.
- Move IMS_... macros in <immdev.h> into
  <imm32_undoc.h>.
- Include <imm32_undoc.h> in base/ctf/msutb.
2025-06-07 07:52:05 +09:00
Katayama Hirofumi MZ
6dd04063ba
[KBSWITCH] Rename kbsdll.dll as indicdll.dll (#8087)
Splitted from #8080. We have confirmed usage of the
name of "indicdll.dll" in user32.dll, in #8080. So, we
have to rename kbsdll.dll as "indicdll.dll".
JIRA issue: CORE-20142
2025-06-05 07:24:19 +09:00
Hermès Bélusca-Maïto
fbd676f4c9
[WINLOGON] Register hotkeys for 'Lock Workstation' and 'Accessibility' (UtilMan) (#8083)
- The hotkeys are respectively: Win+L and Win+U .
- Use instead the hotkey IDs in the WM_HOTKEY handler.
2025-06-04 16:44:44 +02:00
Katayama Hirofumi MZ
18290a7b6b [KBSWITCH] Follow-up of #8039
JIRA issue: CORE-18546
2025-06-04 15:13:15 +09:00
Hervé Poussineau
aa0089a3ec [DXDIAG] Rework display enumeration, to use DirectDrawEnumerateEx
We can now get a device GUID by display, which is given to DirectDrawCreate.
2025-06-03 21:35:59 +02:00