Commit Graph

476 Commits

Author SHA1 Message Date
Katayama Hirofumi MZ
c33672648f [CONIME] Follow-up of #8678 (#8692)
Follow-up of #8678.
JIRA issue: CORE-20243
- Rename conime_res.rc as conime.rc.
- Rename Icon_2.ico as conime.ico.
2026-03-01 10:21:35 +09:00
Katayama Hirofumi MZ
80bd460836 [SDK][KBSWITCH][CONIME][IMM32][NTUSER][MSCTFIME][MSUTB] Define LANGID_... (#8691)
Follow-up of #8678. Commonize the definition of
LANGID_... values.
JIRA issue: CORE-20243
- Define LANGID_... values for CJK in <cjkcode.h> and
  use it.
2026-02-27 10:02:23 +09:00
Katayama Hirofumi MZ
423d7031fe [CONIME][BOOTDATA][GITHUB][SDK] Add conime.exe (#8678)
Prepare for Console IME Input for East Asian.
JIRA issue: CORE-20243
- Modify .github/labeler.yml.
- Add base/system/conime/ .
- Modify boot/bootdata/hivesft.inf for Console
  settings.
- Add imm32!ImmCallImeConsoleIME prototype
  into <imm32_undoc.h>.
- Add IMS_CONSOLEIME_1A and IMS_CONSOLEIME_1B
  values into <imm32_undoc.h>, for WM_IME_SYSTEM
  message.
2026-02-26 09:28:22 +09:00
Eric Kohl
d144fe350a [DISKPART] Refactor the GPT partition creation code
- Move common partition creation code to a separate function.
2026-02-15 16:26:08 +01: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
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
Eric Kohl
5fd860b383 [DISKPART] Print proper success message in the assign command 2026-02-01 23:53:41 +01: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
Hermès Bélusca-Maïto
9c0efba4b3 [USERINIT] Hide install option on LiveCD when no installer is available (#8614)
RELEASE-8
2026-01-22 21:48:32 +01:00
Hermès Bélusca-Maïto
d46372ef1a [USERINIT] Cleanup some traces and some code 2026-01-22 21:48:16 +01:00
Eric Kohl
e7de59ba45 [DISKPART] Add missing trailing CRLF 2026-01-18 09:12:12 +01:00
Eric Kohl
6da5483392 [DISKPART] Make size units translatable 2026-01-18 01:23:20 +01:00
Eric Kohl
df01aa6241 [DISKPART] Replace the hardcoded volume type strings 2026-01-13 23:30:42 +01:00
Eric Kohl
b5097211c8 [DISKPART] Replace hardcoded strings and fix typos 2026-01-13 21:16:37 +01:00
Eric Kohl
702f9c6f77 [DISKPART] Prevent drive letter changes on boot or system volumes 2026-01-12 19:35:38 +01:00
Eric Kohl
a40bd103fc [DISKPART] Prevent deletion of boot and system partitions 2026-01-12 15:30:19 +01:00
Eric Kohl
ced7700392 [DISKPART] Fix volume info retrieval
- Pass boot volume info to the (boot) disk.
- Replace some hard coded strings.
2026-01-11 17:36:55 +01:00
Eric Kohl
41d6aeb72a [DISKPART] Identify system and boot volumes 2026-01-10 17:54:55 +01:00
Eric Kohl
b84fa499e7 [DISKPART] Implement the format command
- A lot of volume manager and mount manager related stuff is still missing.
- The label is not set yet.
2026-01-05 23:15:05 +01:00
Eric Kohl
4cf877796b [DISKPART] Improve 'list volume' command
Add output formats for the status and info columns.
2026-01-04 21:34:59 +01:00
Eric Kohl
9f69e8cfab [DISKPART] Initialize unrecognized volumes as partitions 2026-01-01 22:59:35 +01:00
Eric Kohl
d2ae286c6b [DISKPART] Command function return EXIT_CODE instead of BOOL
This simplifies the implementation of the NOERR option.
2026-01-01 13:46:34 +01:00
Eric Kohl
e2c3a6e624 [DISKPART] Move mount manager functions into a separate file
- Move the existing function from automount.c
- Implement required function for the assign and remove commands.

Deleting a drive letter works, until the next reboot.
Assigning a new drive letter fails.
2025-12-31 15:24:27 +01:00
Eric Kohl
f6a86c1ab3 [DISKPART] Implement the assign command
- Also improve the parameter checks of the remove command.

The assign command does not work, because the SetVolumeMountPointW function is not implemented yet.
2025-12-28 20:35:27 +01:00
Eric Kohl
31b091cbd6 [DISKPART] Improve the drive letter query
And disable some debug output
2025-12-27 21:47:38 +01:00
Eric Kohl
7675b0e62a [DISKPART] Implement the remove command
The remove command does not work, because the DeleteVolumeMountPointW function is not implemented yet.
2025-12-27 19:11:06 +01:00
Copilot
d6f68397cf [WINLOGON] Fix memory and handle leaks (#8514)
JIRA issue: CORE-13213
2025-12-27 22:10:44 +09:00
Eric Kohl
abc2acf5a7 [DISKPART] Implement the filesystems command
Limitations with respect to available file systems and cluster sizes are not implemented yet.
2025-12-26 13:32:03 +01:00
Eric Kohl
cb8278b5f3 [DISKPART] Add help text for the gpt command 2025-12-21 12:26:35 +01:00
Eric Kohl
c4c8e5ef3f [DISKPART] Check for the noerr option first 2025-12-21 11:47:05 +01:00
Eric Kohl
86ec64b2b1 [DISKPART] Implement the automount command 2025-12-21 09:33:59 +01:00
Eric Kohl
8e952f1510 [DISKPART] Show more disk details
- Show device description, status and bus type in the 'detail disk' command.
2025-12-20 16:26:15 +01:00
Eric Kohl
3f96772154 [DISKPART] Use the PSDK diskguid.h instead of our own guid.h 2025-12-19 22:39:34 +01:00
Eric Kohl
5047e62e3d [DISKPART] Implement the gpt command keep the partition number up to date 2025-12-16 23:55:20 +01:00
Eric Kohl
ccfb061a2b [DISKPART] list partition: Show a message when there are no partitions on a disk 2025-12-15 20:36:51 +01:00
Eric Kohl
182715ed50 [DISKPART] Prevent EFI- and MSR-Partitions from accidental deletion 2025-12-15 20:11:59 +01:00
Eric Kohl
bf8741d208 [DISKPART] Implement the 'create partition efi' and 'create partition msr' commands 2025-12-14 20:23:03 +01:00
Eric Kohl
74999e6670 [DISKPART] Replace some magic values and enter the Terabyte era 2025-12-14 18:19:26 +01:00
Eric Kohl
48fbf273fb [DISKPART] Calculate the free disk space for the 'list disk' command 2025-12-14 13:00:53 +01:00
Eric Kohl
f206063280 [DISKPART] Implement creation and deletion of GPT partitions
- Implement creation and deletion of GPT partitions.
- Adjust the active, clean, detail, inactive, list, select, setid and uniqueid
  commands as needed.
- Add a 2^32 sector count limit for MBR partition tables.
2025-12-13 18:42:00 +01:00
Eric Kohl
b05a983f0c [DISKPART] The active and inactive commands do not work on GPT disks 2025-12-08 00:44:25 +01:00
Eric Kohl
dd74eaf8cf [DISKPART] Fix message IDs 2025-12-07 13:35:53 +01:00
Eric Kohl
5a224e277d [DISKPART] GUID partition preparations
- Improve parameter handling in the setid and uniqueid commands.
- Improve error messages.
2025-12-07 12:25:25 +01:00
Eric Kohl
920153534b [DISKPART] Implement the 'convert mbr' and 'convert gpt' commands
- Show Disk UUIDs in the 'detail disk' and 'uniqueid disk' commands.
2025-12-07 10:10:10 +01:00
Stanislav Motylkov
1f3f733f6e [DISKPART] Fix copypasta. Addendum to c197e7c080 2025-12-06 17:16:55 +01:00
Eric Kohl
c197e7c080 [DISKPART] Prepare for GPT support
- Use DRIVE_LAYOUT_INFORMATION_EX instead of DRIVE_LAYOUT_INFORMATION.
- Show GPT disks in the 'list disk' command.
2025-12-06 16:41:29 +01:00
Serge Gautherie
d1b1292429 [FMIFS][FORMAT][SDK] Improve/Fix QueryDeviceInformation() and related code (#7475)
- FMIFS: QueryDeviceInformation(): Use more specific types and improve documentation.
  Follow-up to commit 4838d7bd56.

- FORMAT: wmain():
  * Zero the correct variable. Addendum to commit c5a9f22d4e.
  * No need to zero the whole volumeName array. Follow-up to commit 358fecdcf0.
2025-10-26 16:42:01 +01:00
Hermès Bélusca-Maïto
8f3ac7ef58 [ADVAPI32][RPCRT4][UMPNPMGR][WINLOGON] Fix buffer size retrieval for MakeSelfRelativeSD() (#8395)
Based on Timo's observation in PR #8387.

And improve debug ERR strings for last-error values.
2025-10-08 15:45:36 +02:00