Compare commits

...

1136 Commits

Author SHA1 Message Date
Karol Gocłowski
a1a440b96d [WHERE] Add Polish (pl-PL) translation (#8397) 2025-10-06 00:59:27 +03:00
Stanislav Motylkov
b9a500cf32 [INPUT] Update Russian (ru-RU) translation
Addendum to 5a86857637.
2025-10-05 23:48:07 +02:00
Stanislav Motylkov
584f8679c4 [KBDGRE1] Fix build by converting file to UTF-8 w/ BOM
https://stackoverflow.com/a/27713211
Addendum to 127b363692.
2025-10-05 23:20:02 +02:00
Hermès Bélusca-Maïto
51d7aeb3ea [SDK] crt/sys/stat.h: Import MinGW-w64 patch "Change _S_IFBLK from 0x3000 to 0x6000"
Mingw-w64 commit id 850703ae46e1971c5789fa1bdd802fb9692c41c9 by Daniel Starke via Mingw-w64-public <mingw-w64-public@lists.sourceforge.net>

headers: Change _S_IFBLK from 0x3000 to 0x6000

The _S_IFBLK macro, used to identify block special files in file systems, is
being updated from 0x3000 to 0x6000. This change aligns mingw-w64 with the more
commonly used value across Unix-like systems and other C libraries.

The old value of 0x3000 may have caused compatibility issues when working with
code that assumes the standard 0x6000 value for S_IFBLK.

This update improves cross-platform compatibility and consistency with other
systems, making it easier to write portable code that deals with file type
identification. It also reduces potential confusion and errors that might arise
from the non-standard value.

One of these is for example python. This is only an example. It does not change
the fact that python should be more careful about actual value implementation.

Note that the current value implies character device + FIFO instead of
character device + directory.

Link: f819900245/Python/fileutils.c (L1197)
Link: 81e4f8d68c/include/uapi/linux/stat.h (L13)
Signed-off-by: Daniel Starke <daniel-email@gmx.net>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2025-10-05 20:38:41 +02:00
Eric Kohl
127b363692 [KBDGRE1] Improve the German Extended 1 keyboard layout
- This layout is Work In Progress
- Add characters to the fist row including the acute and grave dead key characters
2025-10-05 16:00:50 +02:00
Eric Kohl
88ec843e02 [KBD] Add German Extended 1 keyboard layout 2025-10-05 11:39:26 +02:00
Hermès Bélusca-Maïto
3598ae9fbb [SDK] arc.h: Isolate the ARC-specific definitions from those specific to the NT OS Loader Parameter Block 2025-10-04 19:49:56 +02:00
Adam Słaboń
5187834463 [SDK] Update loader parameter block structure definitions to Windows 10 RTM (#8236)
Mostly based on the information on Geoff Chappell's website, Vergilius Project and WDK 10.0.10586.0
2025-10-04 07:11:00 -07:00
Eric Kohl
5a86857637 [INPUT] Add string resources for the German Extended keyboard layouts E1 and E2 2025-10-04 10:12:41 +02:00
Justin Miller
094b7d9c79 [FORMATTING] Start Kernel Arbiter with clean instance 2025-10-03 07:32:33 -07:00
Eric Kohl
b37aafeed6 [NETSH] Sort the help command list alphabetically 2025-09-30 21:37:39 +02:00
Mohammed al-Ramadany
2a0acdbadc [KMTESTS] Kmtest fixes (#8308)
- [KMTEST:IOFILESYSTEM] Add support for NTFS
- [KMTEST:IODEVICEOBJECT] Work around a Windows 7 bug, account for struct size changes on x64, accept Vista+ behavior
- [KMTEST:EXPOOLS] Accept pool being promoted to NonPaged on Vista+, accept 2GB allocation on x64, guard an undocumented behavior
- [KMTEST:CMSECURITY] Add tests for Vista-Win8.1
2025-09-30 10:57:23 -05:00
Justin Miller
b19eba558c [SDK] Sign all reactos drivers with the testbot (#8404)
This allows if the directory with the tools exists to trigger sign tool on all MSVC builds.
2025-09-30 02:18:08 +00:00
Hermès Bélusca-Maïto
a0c427319f [FREELDR] Improve DiskGetExtendedDriveParameters()
- Move BIOS-specific `EXTENDED_GEOMETRY` structure to pcdisk.c

- Zero out the transfer buffer for INT 13h, function 48h before
  invocation. This ensures that any random data is removed and
  that some broken BIOSes behave better.

- Use a more suitable type for the pointer to the transfer buffer,
  so that we can use more human-manageable member names in TRACEs
  instead of magic buffer offsets.
2025-09-29 20:48:19 +02:00
Hermès Bélusca-Maïto
1375320ac4 [FREELDR] pc98disk.c: Simplify disk read checks in loops 2025-09-29 20:27:04 +02:00
Hermès Bélusca-Maïto
10b7a85991 [FREELDR] Fix the DPTE validity check, addendum to commit 4190b48924
Which is also an addendum to commit b3f11cfb38 (r17484).

The Enhanced Disk Drive Specification tells us that if the (far) pointer
to the Device Parameter Table Extension is set to FFFF:FFFF, the pointer
is invalid.

However there are some BIOSes, incl UEFI ones when running in Legacy
mode (e.g. GIGABYTE UEFI DualBIOS), that set this pointer to 0000:0000
instead, which is also an invalid value.
2025-09-29 20:13:30 +02:00
Hermès Bélusca-Maïto
4ffe8e86f0 [FREELDR] disk/fs: Improve some TRACEs and comments (#8400)
- Enhance some TRACEs.
- Improve printf formatters.
- Checking for success is part of the operation, no need to comment on that.
2025-09-29 20:09:44 +02:00
Carl J. Bialorucki
5f243e66b6 [COM_APITEST][INCLUDE/REACTOS][PSDK] Fix com tests for WS03, Vista+ (#8343)
[COM_APITEST]
- Add NTDDI version gating to classes and interfaces in tests
- Remove rigid offset tests. Instead, offsets to known interfaces can be logged by defining LOG_COM_INTERFACE_OFFSETS.
- Replace the noreg member of the known interfaces array with a function pointer that can be used to determine if a com test should be globally registered depending on the current NTDDI version. I could probably replace this with a min and max registered NTDDI value, but I thought this was confusing for interfaces that are never globally registered.

[INCLUDE/REACTOS]
- Rename the existing interface definition for IShellBrowserService to IShellBrowserService_XP at {1307EE17-EA83-49EB-96B2-3A28E2D7048A}. This only exists on XP and Server 2003, no earlier or later versions.
- Rename IID_IShellBrowserServce to IID_IShellBrowserService since this definition is correct for Windows 7+ at {DFBC7E30-F9E5-455F-88F8-FA98C1E494CA}
- Add an interface definition for IShellBrowserService4 at {F5A24314-5B8B-44FA-BC2E-31285544B520}. This definition for IShellBrowserService exists for Vista only and no other version.

[PSDK]
- Add a define for NTDDI_WIN7SP1. While this isn't defined in the public Windows headers, it clearly exists in private headers because it is referenced in the public WinBase.h header.
2025-09-29 08:33:38 -05:00
Eric Kohl
98a8996954 [NETSH][IFMON] Make output windows compatible
- Help text string resources must be newline terminated.
- Format strings must not be newline terminated.
- Tested with WinXP ifmon.dll.
2025-09-28 23:23:46 +02:00
Eric Kohl
f5204f85b1 [PSDK] Fixes for _IP_ADAPTER_ANYCAST_ADDRESS_XP and _IP_ADAPTER_MULTICAST_ADDRESS_XP
Addendum to 43548291.
2025-09-27 23:23:05 +02:00
Doug Lyons
34fce8a997 [NTGDI][GDI32] SAI Paint Tool regression fix (#8383)
CORE-20336
Move some code in win32ss/gdi/ntgdi/dibobj.c into win32ss/gdi/gdi32/objects/bitmap.c.
Condition "YSrc = 0;" on "if (Height + YDest + 1 < ScanLines)" which fixes some gdi32:bitmap regressions.
2025-09-27 02:01:57 -05:00
Carl J. Bialorucki
435482912c [PSDK][INCLUDE/WINE] Header changes needed for iphlpapi, shlwapi, advapi32, and kernel32 winetest syncs (#8317)
- [INCLUDE/WINE] Add synced Wine headers for the iphlpapi winetest to use. This helps us slowly decouple our headers and wine's headers.
- [PSDK] Add definitions we are missing for other winetest syncs.
- [WINETESTS][APITESTS] Fix breaking changes, remove duplicate definitions for debugstr_guid.
2025-09-25 17:54:18 -05:00
Carl J. Bialorucki
4fafe46fc9 Add tristate option to fix cmd:attrib test (#8344)
- Add a tristate option to accept either true or false for the bStdOutput and bStdError tests
- Use this new option on the four tests that are inconsistent.
2025-09-25 15:18:24 -05:00
Hermès Bélusca-Maïto
c687f6e146 [MSGINA] Don't depend on powrprof.dll; fix shutdown from fancy dialog (#8391)
CORE-19104

- Use `NtPowerInformation()` and the `IS_PWR_*` macros instead.

- Fancy shutdown dialog:

  * Enable or disable the hibernate/sleep buttons depending on
    the previously-determined available shutdown options.

  * Don't invoke `ExitWindowsEx()` or `SetSuspendState()` directly
    within Msgina, but return a suitable `WLX_SAS_ACTION_SHUTDOWN_*`
    value, like what's done by the classic dialog. The power action
    proper is then performed by the caller of the shutdown dialog:
    either Shell32 or Winlogon.
2025-09-22 13:05:13 +02:00
Hermès Bélusca-Maïto
ecf718e48d [POWRPROF] Fix how & when the global registry semaphore is initialized (#8387)
CORE-19104

This fixes failure to create or open the `PowerProfileRegistrySemaphore`,
when it has been first created by a Process1 using powrprof from a "User1",
and while this process stays running, the semaphore is attempted to be
re-created (or opened) by another Process2 using powrprof from a different
"User2".

For example, this happens when "User1" is either the LocalSystem account
with the Process1 being Winlogon.exe (via the msgina.dll -> powrprof.dll
dependency), or, "Administrator" with the explorer.exe process when opening
the "Shutdown" dialog (via the shell32.dll -> runtime-loading of msgina.dll
-> powrprof.dll dependency),
AND,
"User2" being a non-administrator user and Process2 being explorer.exe,
again when opening the "Shutdown" dialog. In this situation, msgina.dll
fails to be loaded, because powrprof.dll fails in its `DllMain()` routine
-- see log excerpt below --, and the shell falls back to a minimal shutdown
confirmation dialog.

```
err:(dll\win32\powrprof\powrprof.c:1420) Couldn't create Semaphore: 5
(dll\ntdll\ldr\ldrinit.c:879) LDR: DLL_PROCESS_ATTACH for dll "powrprof.dll" (InitRoutine: 7ADC6DB0) failed
(dll\win32\kernel32\client\loader.c:386) LoadLibraryExW(msgina.dll) failing with status c0000142
err:(dll\win32\powrprof\powrprof.c:1420) Couldn't create Semaphore: 5
(dll\ntdll\ldr\ldrinit.c:879) LDR: DLL_PROCESS_ATTACH for dll "powrprof.dll" (InitRoutine: 7ADC6DB0) failed
(dll\win32\kernel32\client\loader.c:386) LoadLibraryExW(msgina.dll) failing with status c0000142
(dll\ntdll\ldr\ldrutils.c:2340) Image explorer.exe has no exports, but were trying to get procedure (null). BaseAddress asked 0x00400000, got entry BA 0x00400000
err:(win32ss\user\user32\windows\messagebox.c:1048) MessageBox: L"Do you want to shutdown?"
```
2025-09-22 13:03:21 +02:00
Eric Kohl
918bc859a9 [NETSH] Create a root helper object
The root helper object is required to load ifmon.dll from WinXP.
2025-09-21 23:55:18 +02:00
Hermès Bélusca-Maïto
b6e732ec71 [NTDLL_APITEST] Add simple tests for RtlUnhandledExceptionFilter(2) (#8353)
Based on an example from Whindmar Saksit.
2025-09-21 18:17:27 +02:00
Hermès Bélusca-Maïto
fa7eca6cd9 [NDK] Expose RtlUnhandledExceptionFilter2() (#8353) 2025-09-21 15:18:15 +02:00
Hermès Bélusca-Maïto
db69a9a7e1 [RTL][NDK] Improve RtlUnhandledExceptionFilter(2) (#8353)
- Reimplement `RtlUnhandledExceptionFilter()` by just calling
  `RtlUnhandledExceptionFilter2()`.

- Return an adequate exception filter value `EXCEPTION_CONTINUE_SEARCH`
  from `RtlUnhandledExceptionFilter2()`, instead of some random error.
  If `ExceptionCode` is `STATUS_POSSIBLE_DEADLOCK` however, return
  `EXCEPTION_CONTINUE_EXECUTION` instead, as shown by a test from Whindmar Saksit.

- The second parameter of `RtlUnhandledExceptionFilter2()` is not
  a flag, but a pointer to string `PCSTR` !
  See https://skanthak.hier-im-netz.de/download/NTDLL.H
  who is the only one online who has the correct definition,
  whose usage I've double-checked on Win7 ntdll.dll.

  This is used in the `<function_name>` slot in the displayed
  debugger message:
  ```
  *** An Access Violation occurred in <program_command_line>:<function_name>
  The instruction at <address> tried to write to a NULL pointer
  ```
  For example, see: https://community.osr.com/t/access-violation/33435
2025-09-21 15:18:14 +02:00
Hermès Bélusca-Maïto
92f680dddb [NDK] Fix the RTLP_UNHANDLED_EXCEPTION_FILTER type (#8353)
Confirmed with the System Informer phnt headers.
2025-09-21 15:18:13 +02:00
Eric Kohl
f0a29c9e9c [NETSH] Improve MatchToken and implement MatchEnumTag 2025-09-21 14:00:00 +02:00
Hermès Bélusca-Maïto
13d70840ff [CTFMON] Some fixes for event handles management (#8392)
- Validate the opened `WinSta0_DesktopSwitch` handle;

- Don't pass the `ahEvents` array containing a NULL pointer to
  `MsgWaitForMultipleObjects()`, but provide the correct number
  of non-NULL handles, otherwise the function fails and the code
  ends up busy-looping.

- Validate the `MsgWaitForMultipleObjects()` result: bail out if
  `WAIT_FAILED` is returned.

- Validate the event index passed to `CRegWatcher::InitEvent()`
  and `CRegWatcher::OnEvent()`.

- Rename `WATCHENTRY_MAX` to `WI_REGEVTS_MAX` and add it in the
  `WATCH_INDEX` enumeration.

- Fix some code comments.
2025-09-20 22:01:34 +02:00
Hermès Bélusca-Maïto
d524fd8e4b [POWERCFG] Various enhancements (#8389)
- Don't hardcode buffer sizes.
- `ShowWindow()` 2nd parameter is an `SW_*` flag, not `TRUE`/`FALSE`.
- The "FIXME: Add battery page" comment is outdated since commit 4bdbb3092c
- Use standard `IDC_STATIC` instead of `-1` for resource control IDs.
- `AUTOCHECKBOX` already contains `WS_TABSTOP`, no need to add it explicitly.
- Reformat file headers.
2025-09-20 18:28:21 +02:00
Eric Kohl
f9458d9e40 [NETSH] Add stubs for undocumented exported functions 2025-09-20 11:10:52 +02:00
Timo Kreuzer
9ab8761f2c [NTDLL] Improve x64 KiUserExceptionDispatcher
Add Wow64PrepareForException handler, which is well documented as a hook for KiUserExceptionDispatcher (see e.g. https://github.com/brew02/KiUserExceptionDispatcherHook) and used by ntdll_winetest.
This also reloads rcx and rdx for the call to RtlDispatchException from the stack instead of relying on the registers to be set up by the kernel, which again is a feature used by ntdll_winetest, which calls this function from a hook with zeroed registers.
2025-09-17 15:48:26 +03:00
Justin Miller
9f78833b4a [OPENGL32] Fix GL_GETINFO ExtEscape call based on mesa MR (#8351)
Just pulls some information from:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305

Fixes AMD's OpenGL loading when the ctl is made for pulling this information.
2025-09-16 13:39:05 +00:00
Timo Kreuzer
11bb8e4ed0 [RTL] Fix dynamic function tables 2025-09-16 16:23:37 +03:00
Serge Gautherie
9aaa898319 [GITHUB] build-msvc-arm: Limit ARM to windows-2022 (#8363)
Needed SDK support is not available on windows-2025.
Also, tweak toolset line.

CORE-20325 CORE-17604
2025-09-16 13:04:28 +03:00
Eric Kohl
e5b2d5c51e [IFMON] Add option to select an interface to the show commands 2025-09-15 22:59:34 +02:00
Eric Kohl
b6c202c4c8 [NETSH] Set proper error code for internal commands 2025-09-15 22:37:22 +02:00
Hermès Bélusca-Maïto
0f105936cb [POWERCFG] Use the IS_PWR_* macros (#8386) 2025-09-15 16:41:00 +02:00
Hermès Bélusca-Maïto
103c81849f [POWRPROF] Use the IS_PWR_* macros (#8386) 2025-09-15 16:40:59 +02:00
Hermès Bélusca-Maïto
ae4c5b9a8d [NDK] potypes.h: Add useful macros for SYSTEM_POWER_CAPABILITIES (#8386)
Add useful macros, similar to the powrprof.dll `IsPwr*()` functions,
but that are suitable when one has a `SYSTEM_POWER_CAPABILITIES`
structure initialized from `NtPowerInformation(SystemPowerCapabilities)`.

- `IS_PWR_SUSPEND_ALLOWED()`, equivalent to `IsPwrSuspendAllowed()`,
  indicating whether any of the S1, S2, S3 sleep states are supported.

- `IS_PWR_HIBERNATE_ALLOWED()`, equivalent to `IsPwrHibernateAllowed()`,
  indicating whether the S4 sleep state is supported and the
  hibernation file is present.

- `IS_PWR_POWEROFF_ALLOWED()`, equivalent to `IsPwrShutdownAllowed()`,
  indicating whether the S5 "soft-off" state is supported.
2025-09-15 16:40:49 +02:00
Hermès Bélusca-Maïto
1af29a66ca [CMBATT] Inform when a discovered battery doesn't support the _BTP trip-point method (#8384) 2025-09-15 16:26:06 +02:00
Hermès Bélusca-Maïto
b73159fecf [BATTC][COMPBATT] Move the IOCTL_BATTERY_QUERY_STATUS wait hack to BATTC (#8384)
CORE-20343

The 3-second timeout FIXME (instead of waiting indefinitely), made in the
COMPBATT worker thread for the `IOCTL_BATTERY_QUERY_STATUS` case, was done
because _*our*_ BATTC handler expects the batteries to always support the
BTP (Battery Trip Point) feature for signaling a change of battery status,
but in the cases where it isn't supported, any waits it tried for the
battery to notify about a status change would never happen.

Furthermore, following commit 3a6e0d4b65, the `SetStatusNotify()` call
(_which always fails if the battery doesn't support the BTP feature_)
would now always exit the `IOCTL_BATTERY_QUERY_STATUS` handling without
any waiting nor battery polling [^1], and this would cause the COMPBATT
worker thread to busy-poll again forever.

The timeout FIXME is now moved to BATTC, instead of COMPBATT, since the
actual fixes should be in BATTC. In particular, it should queue all the
query IOCTLs and then serve them, either using the StatusNotify (BTP)
functionality if the battery supports it, or if not, do a very-slow
battery polling.

I've also increased the timeout a little bit more (5 seconds and not 3).

[^1]: Per the ACPI specification, it is expected that the operating system
  performs battery polling if the battery doesn't support BTP, see:
  https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/10_Power_Source_and_Power_Meter_Devices/Power_Source_and_Power_Meter_Devices.html#btp-battery-trip-point
2025-09-15 16:25:14 +02:00
Hermès Bélusca-Maïto
54489d6cce [CMBATT] Fix a debug print 2025-09-15 16:25:13 +02:00
Eric Kohl
9e22156c50 [NETSH] Pass correct dwCurrentIndex parameter to context and group commands 2025-09-15 01:27:15 +02:00
Eric Kohl
3f4cee1790 [NETSH] Fix MatchToken to test for a real prefix 2025-09-14 22:33:00 +02:00
Eric Kohl
245bc3f44a [NETSH] Simplify the code by naming the root context 'netsh'
-
2025-09-14 22:14:21 +02:00
Hermès Bélusca-Maïto
20d7fd78ae [CMBATT] Fix "TripPpoint" typo 2025-09-13 21:34:18 +02:00
Hermès Bélusca-Maïto
13dc901d8c [KERNEL32][SVCHOST] LoadLibraryEx 2nd parameter is a handle, so, 0 -> NULL 2025-09-13 21:34:10 +02:00
Timo Kreuzer
571ac5e608 [NTOS:PO] Implement SystemBatteryState in NtPowerInformation
This should get us proper battery status display.
2025-09-13 11:38:38 +03:00
Timo Kreuzer
3a6e0d4b65 [BATTC] Fix IOCTL_BATTERY_QUERY_STATUS
Previously the function waited for the conditions *after* querying the status, and then returned the old status. Also, if querying failed, it waited and when the wait timed out it returned STATUS_SUCCESS without returning any data. If the call to SetStatusNotify failed and there was no timeout, it would wait forever.
This is all fixed now.
2025-09-13 11:38:38 +03:00
Eric Kohl
ae23b4dc8f [NETSH] Add the PreprocessCommand stub 2025-09-13 09:53:46 +02:00
Hermès Bélusca-Maïto
e92be1ede2 [MSGINA] Simplify GetRegistrySettings() (#8381) 2025-09-12 13:53:58 +02:00
Hermès Bélusca-Maïto
27db7ece88 [MSGINA] ReadRegDwordValue(): Support interpreting REG_SZ values as DWORDs when possible (#8381)
This is useful for numerical values that are documented as being stored
in string format as `REG_SZ` in the registry; the reason being that they
are still read or written via `GetProfileIntW()`/`WriteProfileStringW()`
by Windows' Winlogon, and these functions store `REG_SZ` values because
of the INI <-> Registry mapping mechanism.
2025-09-11 16:31:47 +02:00
Timo Kreuzer
01872b8495 [NPFS] Fix dereference of uninitialized variable
- Avoid uninitialized return variables
- Fix a parameter check
2025-09-11 12:31:14 +03:00
Timo Kreuzer
0b18dfe924 [WINETESTS] Move definition of __ROS_LONG64__ to individual tests
This is more explicit than defining it for all wine tests and it directly shows us which tests need to be synced to get rid of the hack.

Addendum to 381e224 (PR #7576)
2025-09-11 09:17:13 +03:00
Timo Kreuzer
570354e984 [ROSTESTS] Remove definitions of __ROS_LONG64__ in testlist.c 2025-09-11 09:17:13 +03:00
Timo Kreuzer
5a8c36d9a1 [SDK] Remove header definitions of __ROS_LONG64__
These were totally pointless, because the condition was never true.
2025-09-11 09:17:13 +03:00
Timo Kreuzer
fff6d96000 [WIN32K:NTGDI] Check for failure of PATH_CreatePath
Also use common cleanup path.
2025-09-10 16:39:22 +03:00
Timo Kreuzer
8a2a587e57 [WIN32K:NTGDI] Save and restore FP state in IntGdiWidenPath 2025-09-10 16:39:22 +03:00
Whindmar Saksit
3d70478560 [SHELL32] Implement the RunAs dialog and verb (#5787)
Implements the "run as another user" part.
2025-09-10 15:21:04 +02:00
Whindmar Saksit
69df57245c [SHELL32] Fix CompareIDs DISK_CAPACITY (#8376)
Addendum to PR #8361

CORE-20286
2025-09-09 17:52:40 +02:00
Eric Kohl
0793006523 [IFMON] Add first netsh helper dll
Run 'add helper ifmon.dll' in netsh to load the ifmon helper.
2025-09-08 02:00:34 +02:00
Eric Kohl
df01941faf [NETSH] Fix helper and context issues 2025-09-08 01:55:04 +02:00
Eric Kohl
1c1b8a2260 [NETSH] Print proper prompt 2025-09-08 01:11:22 +02:00
Doug Lyons
5d5e5d1a46 [NTGDI] Fix SAI Paint Tool Initial Graphics Display (#8348)
CORE-15002
2025-09-06 19:20:44 -05:00
Hermès Bélusca-Maïto
38398fbaf3 [MSGINA] Fix gcc x86 build
Addendum to commit 1499e7ef53.

Poor thing was crying that it was ignoring trigraph `??)`, even
though this whole thing was inside an `#if 0`-commented block...
Use something else instead.

```
msgina/shutdown.c: In function 'ShutdownDialog':
msgina/shutdown.c:1217:56: error: trigraph ??) ignored, use -trigraphs to enable [-Werror=trigraphs]
     pgContext->nShutdownAction = LoadShutdownSelState(???);

msgina/shutdown.c: At top level:
cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
```
2025-09-05 11:55:40 +02:00
Hermès Bélusca-Maïto
a1bbcee5e8 [MSCOREE] Show a user popup if .NET is missing (#8374)
Otherwise, you wouldn't see anything at all when opening a .NET app, and
the only hint that a .NET runtime is needed would be to see the message
in the debug log, provided a debugger is connected to ReactOS ...

NOTE: `shell32!ShellMessageBoxA()` is used instead of
`user32!MessageBoxA`, because it turns out mscoree isn't importing
from user32 but from shell32 instead (as in Wine's), and I don't want
to modify the list of imported modules.

NOTE 2: This warning function has been gradually removed with Wine commits:
  c99754ef15
  6b889fe918
  5cd6db0349
  26c9bd9f15
Now, a mere `ERR("Wine Mono is not installed\n");` is emitted.
2025-09-04 23:02:20 +02:00
Hermès Bélusca-Maïto
9d3809febd [BOOTDATA] Disable logoff/password-change/workstation-lock in the LiveCD (#8373)
- Disable "Log Off" from the Start Menu and the C-A-D Security dialog;

- Disable the "Lock Workstation" and "Change Password" buttons in the
  Security dialog.

These are only "UI"-usability features to prevent the user from
logging off when running the LiveCD. (Logging off from the SYSTEM
account, and changing its password, don't make much sense.)

CORE-11397
2025-09-04 22:58:48 +02:00
Hermès Bélusca-Maïto
1499e7ef53 [MSGINA] Improve Security and Shutdown dialog features (#8372)
- Respect system policies for showing or hiding:

  * Security dialog "Lock Workstation", "Log Off", "Shut Down",
    "Change Password", "Task Manager" buttons;

  * "Log Off" entry in the Shutdown dialog;

- Disable the "Shut Down" Security dialog button, and the "Stand by",
  "Shut down" entries in the Shutdown dialog, if the logged user
  doesn't have the SeShutdownPrivilege.

- Add other missing `WLX_SHUTDOWN_STATE_*` shutdown flags that are
  supported by Windows.

- Improve the retrieval of shutdown options to be displayed in the
  "Shut Down" dialog. In particular, don't hardcode any sort of
  defaults, but let them come from what the user can do (Is logoff
  allowed? Does (s)he have the rights to shutdown/reboot? etc.).
  If no shutdown options are available, then simply don't display
  the dialog!

- Don't hardcode the default selected shutdown option. Either it comes
  from the user's registry and is valid (i.e. corresponds to an existing
  shutdown option in the dialog), otherwise, fall back to the first
  option in the dialog.

  In particular this means:
  * when opening the "Shut Down" dialog from the C-A-D Security
    dialog, by default we will select the "Log Off" option, or
    whatever the user last selected;
  * when opening the dialog from the "Turn Off" Start Menu item, default
    to the "Shut down" option, or whatever the user last selected.
  * when opening the dialog from the C-A-D "Log On" dialog (no user
    is logged in), the "Shut down" option will also be selected, or
    whatever the system operator last selected.

- For the shell-invokable `ShellShutdownDialog()` function, implement
  support for using a custom display user name, or the one in the
  `"Logon User Name"` registry value saved by `WlxActivateUserShell()`.
  Plus, the 3rd parameter specifies the list of shutdown options to
  *exclude* from the options list.
2025-09-04 22:57:23 +02:00
Whindmar Saksit
87df3ea3e1 [SHLWAPI][EXPLORER] Implement OS_SERVERADMINUI (#7051)
OS_SERVERADMINUI changes minor things in Explorer, the most visible is that the default folder view mode changes from large icons to details
2025-09-04 19:25:43 +02:00
Mark Jansen
db57e02d6b [APPCOMPAT] Add RendererFull3D flag
This flag will be used for DDraw experiments.
CORE-20322
2025-09-04 15:23:48 +02:00
Hermès Bélusca-Maïto
0b43959beb [MSGINA] OnInitSecurityDlg(): Remove unnecessary code (#8371)
The Security dialog can be displayed only when a user is logged.
When this is so, the `pgContext->bAutoAdminLogon` has already been
reset to `FALSE`, see `gui.c!DoLogon()`. Thus there is really no
reason to disable the "Log Off" button in that case.

Addendum to commit c633b79451 (r61622)
2025-09-04 11:55:07 +02:00
Hermès Bélusca-Maïto
b306f46e5b [MSGINA] Revisit WlxActivateUserShell(), add support for "Logon User Name" (#8370)
- Add SAL annotations;
- Avoid using hardcoded buffer sizes in function calls.

- If the start-application (Userinit) launched successfully, store
  in the logged-in user's Explorer key, value `"Logon User Name"`,
  the user name that was entered verbatim in the "Log On" dialog
  to log into the system. This value is used as a "convenience" to
  display the `"Log Off <username>"` item in the explorer's Start menu
  (see `explorer!util.cpp:GetCurrentLoggedOnUserName()`), and the
  corresponding item in the "Shut Down" dialog.

- utils.c: Introduce the `RegOpenLoggedOnHKCU()` helper, for opening
  the current logged-in user HKCU key.

  NOTE: Regarding the `.Default` registry key, see:
  https://devblogs.microsoft.com/oldnewthing/20070302-00/?p=27783
2025-09-04 11:47:01 +02:00
Hermès Bélusca-Maïto
55ed59c379 [MSGINA] ReadRegDwordValue(): Return valid errors on data validation (#8370) 2025-09-04 11:47:00 +02:00
Hermès Bélusca-Maïto
e7073d2639 [MSGINA] Move some utility functions to a separate utils.c file (#8370)
- Registry-value getters; string copy functions.

- ReadRegSzValue(): Use a meaningful error value
  when the value type isn't the expected one.

- Rename `DuplicationString` -> `DuplicateString`
2025-09-04 11:46:59 +02:00
Hermès Bélusca-Maïto
c6fecdda65 [NTUSER] NtUserSetLogonNotifyWindow(): Lock-protect access to global data (#8369)
Like with all the other win32k NtUser* functions, acquire on entry and
release on exit the global lock, since the function is reading/writing
to global variables.

Also, set the last-error to ERROR_ACCESS_DENIED if the caller isn't the
registered logon process.
2025-09-04 11:43:30 +02:00
Hermès Bélusca-Maïto
10d57cb8b2 [NTUSER] IntLanguageToggle(): Guard against NULL pFocusQueue (#8368)
Addendum to commit 25b7447818 (PR #5839)
2025-09-04 11:42:06 +02:00
Hermès Bélusca-Maïto
6a6ed54495 [NTUSER] Some lifting for the Int/UserGet[Active|Capture|Foreground|ThreadFocus]Window() functions 2025-09-04 11:41:57 +02:00
Eric Kohl
999502cfc4 [NETSH] Improve PrintMessageFromModule
Thanks a lot for the hint, Hermès!
2025-09-02 00:31:47 +02:00
Whindmar Saksit
4dc61a2518 [SHELL32] Computer folder sorting must handle mixed drives and regitems (#8361)
CORE-20286
2025-09-01 17:38:36 +02:00
Eric Kohl
bb57f63a26 [NETCFGX] Store network interface settings in the correct location 2025-08-31 17:14:41 +02:00
Eric Kohl
2840fdcfe3 [NETCFGX] Handle the interface metric value correctly 2025-08-31 16:45:39 +02:00
Hermès Bélusca-Maïto
c1921754aa Revert "[WINLOGON] Temporarily hack around a bug in PSEH for GCC"
This reverts commit ddbe9719c9, now that PSEH has been fixed
in commit d50b8c93fb (PR #8350).

CORE-20307 CORE-20309 CORE-20316
2025-08-30 17:10:07 +02:00
Timo Kreuzer
d50b8c93fb [PSEH] Fix a bug with try inside except
PSEH has 2 scopes: an outer scope, that starts with _SEH3_TRY and ends with _SEH3_END, and an inner scope that goes around the try block only. PSEH tracks try-levels by using an enum, which increments at every new TRY scrope, and which needs to be accessible in the outer scope for all registration and cleanup to work. But it should only increment when nested within the inner try scope, not from the except scope. This is fixed by adding an additional _SEH3$_InnerTryLevel, which increments only within the try block, but resets to the parent-value outside of it.

Should fix CORE-20316.
2025-08-30 17:09:02 +03:00
Timo Kreuzer
194be7a2e0 [COMPILER_APITEST] Add another SEH test
See CORE-20316
2025-08-30 17:09:02 +03:00
Mark Jansen
0d11eb1e23 [APPHELP] Add noisy stub for SdbGetDatabaseInformationByName 2025-08-29 21:55:40 +02:00
Hermès Bélusca-Maïto
b3a0b4124a [MSGINA] Zero out and don't return old user login info on aborted logon attempts
- WlxLogoff(): Zero out cached Winlogon buffer pointers and some more
  user login info.

- WlxLoggedOutSAS(): Return the logged-in user token handle *ONLY* if
  the user is actually logging into the system.
  If (s)he doesn't log in, but instead cancels the Log-On dialog, or
  chooses to Shutdown/Reboot the computer from that dialog, do *NOT*
  return any previous logged-in user token handle.

  For example, in the case of a previously failed logon attempt due
  to a wrong or corrupted user profile, shutting down the computer
  from the Log-On dialog would show the following errors in the debugger:
  ```
  err:(.../winlogon/sas.c:757) ImpersonateLoggedOnUser() failed with error 6
  err:(.../winlogon/sas.c:859) Shutdown thread returned failure
  err:(.../winlogon/sas.c:1182) Failed to start the Shutdown thread, Status 0xc0000001
  ```
2025-08-29 18:23:55 +02:00
Whindmar Saksit
8ce870d87b [RAPPS] Added /S switch for silent installs (#8241)
MSI, Inno and NSIS installers are automatically detected (also if they are nested by ExeInZip). Others can specify command line switches in the rapps-db package.
2025-08-29 15:18:55 +02:00
Justin Miller
47d6b3ae12 [CMAKE] Globally add -Wno-format (#8352)
We've talked about doing this, We thought about doing this,
we do it for half the modules when we sync them anyway.

Let's just do it.
2025-08-28 13:18:35 -07:00
Piotr Hetnarowicz
50d761b492 [SAMSRV] Update Polish (pl-PL) translation (#8195)
* Update pl-PL.rc

* Fix header

* Update dll/win32/samsrv/lang/pl-PL.rc

Co-authored-by: Adam Słaboń <asaillen@protonmail.com>

---------

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
2025-08-27 12:32:15 +02:00
Serge Gautherie
c3bb9d6ca9 [UNIATA] UniataChipDetect(): Workaround AHCI detection (#8184)
Fix AHCI support regression.
Disable a "new" code block, which is broken.

Reverts a part of commit 1afae58191 (r69699).
CORE-13346
2025-08-26 22:50:22 +02:00
Hermès Bélusca-Maïto
ddbe9719c9 [WINLOGON] Temporarily hack around a bug in PSEH for GCC
Commit 51ee32f5f8 moved the `WNetClearConnections()` in the main
Winlogon thread, where it now runs.

`WNetClearConnections()` calls a 3rd-party module (nfs41_np.dll)
that invokes `kernel32!OutputDebugStringA()`.
The SEH usage pattern in `OutputDebugStringA()`, when compiled with
GCC and PSEH, generates an erroneous chain of exception handlers, that,
when running in an execution environment like that of winlogon.exe,
triggers a crash. See CORE-20316 for more details and testing.

As a temporary measure, hackfix away the problem by surrounding the
`WNetClearConnections()` call in a `_SEH2_TRY/_SEH2_EXCEPT` block
(the net effect is to "add" the missing exception handler entry).

Hack for commit 51ee32f5f8
CORE-20307 CORE-20309 CORE-20316
2025-08-26 22:40:42 +02:00
Justin Miller
6a06b0a05a [ROSTESTS][SHELL32] The shellexec(n) tests are broken on Windows (#8349)
They leave a bunch of processes spawned forever preventing the system from shutting down
2025-08-25 15:11:55 -07:00
Hermès Bélusca-Maïto
320bc52fb4 [NDK][RTL] Use LOGICAL also for RtlIsCriticalSectionLocked(ByThread)
This change has been validated with the System Informer phnt headers.
2025-08-25 23:11:57 +02:00
Hermès Bélusca-Maïto
ef5eadafb1 [NDK][RTL] Fix RtlTryEnterCriticalSection() return type
The Win32 TryEnterCriticalSection(), which returns a 32-bit BOOL,
directly redirects to NTDLL!RtlTryEnterCriticalSection().

The latter should therefore return a 32-bit boolean as well:
use the LOGICAL type for this purpose. This change has been
validated with the System Informer phnt headers.

This mismatch was caught by Marcin Jabłoński (TheNNX).
2025-08-25 23:11:56 +02:00
Hermès Bélusca-Maïto
e250b3fd01 [NDK][KMTESTS] Move the LOGICAL type definition to NDK
The LOGICAL (32-bit boolean) type is already defined for kernel-mode
in the XDK/DDK ntdef.h header. Add the type in the NDK for usage in
user-mode NT code also.

The definition present in kmt_platform.h can now be removed, since
it can now use the one from the NDK.
2025-08-25 23:11:45 +02:00
Hermès Bélusca-Maïto
186404274c [NTOS:EX] Fix trivial typos in comments 2025-08-25 22:53:47 +02:00
Hermès Bélusca-Maïto
2164b35683 [NTOS:PS] Implement NtQueryInformationThread(ThreadBreakOnTermination)
Invoked by `RtlSetThreadIsCritical()` for returning the previous flag value,
and fixes the following error:
```
(ntoskrnl/ps/query.c:3155) Not implemented: 18
```

The implementation is "identical" to that of NtQueryInformationProcess()
`ProcessBreakOnTermination`, with the necessary adaptations, of course.
2025-08-25 21:00:41 +02:00
Hermès Bélusca-Maïto
47b92973a9 [NTOS:PS] query.c: Improve some DPRINTs and comments 2025-08-25 21:00:40 +02:00
Hermès Bélusca-Maïto
991c57a93b [NFS] Improve NFS41DbgPrint() a _little_ bit 2025-08-25 21:00:39 +02:00
Hermès Bélusca-Maïto
a449eb3e0e [NTOS:PS] Improve some PspCatchCriticalBreak() messages 2025-08-25 21:00:38 +02:00
Hermès Bélusca-Maïto
99c4f7c95a [FREETYPE] Fix 2nd parameter of FT_Library_SetLcdGeometry()
2nd parameter of FT_Library_SetLcdGeometry() is `FT_Vector sub[3]`,
as specified in the header, and not `FT_Vector* sub`

Fixes compilation error when compiling with i686-w64-mingw32-g++
version 13-win32:
```
sdk/.../freetype/src/base/ftlcdfil.c:361:42: error: argument 2 of type ‘FT_Vector *’ {aka ‘struct FT_Vector_ *’} declared as a pointer [-Werror=array-parameter=]
  361 |                              FT_Vector*  sub )
      |                              ~~~~~~~~~~~~^~~
In file included from sdk/.../freetype/include/freetype/internal/ftobjs.h:32,
                 from sdk/.../freetype/src/base/ftadvanc.c:23,
                 from sdk/.../freetype/src/base/ftbase.c:22:
sdk/.../freetype/include/freetype/ftlcdfil.h:318:42: note: previously declared as an array ‘FT_Vector[3]’ {aka ‘struct FT_Vector_[3]’}
  318 |                              FT_Vector   sub[3] );
      |                              ~~~~~~~~~~~~^~~~~~
cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
cc1: all warnings being treated as errors
```
2025-08-25 21:00:36 +02:00
Eric Kohl
8c871fb268 [NETSH] Implement PrintMessageFromModule 2025-08-24 13:38:18 +02:00
Eric Kohl
da720b864e [UMPNPMGR] PNP_ReportLogOn must not fail on a LiveCD
Fixes CORE-19050
2025-08-24 13:30:32 +02:00
Eric Kohl
3f6639031c [NETSH] Context stack and helper improvements
- Add the context stack including the PUSHD and POPD commands.
- Add the required changes to the HELP command and command execution to support the context stack.
- Add support for sub helpers.
2025-08-23 11:06:19 +02:00
Eric Kohl
359205bccc [CRT] wctomb must return 0 if the destination pointer is NULL
This fixes 3 test failures.
2025-08-22 16:48:06 +02:00
Timo Kreuzer
330fda8b6d [CRT_APITEST] Fix some tests for Vista+ 2025-08-22 15:51:11 +03:00
Timo Kreuzer
f18ebe2b73 [CRT] Cleanup old setjmp 2025-08-22 09:12:51 +03:00
Timo Kreuzer
6d321562c9 [NTOS][NTDLL][UCRTBASE] Use new setjmp/longjmp
This fixes 2 todo tests
2025-08-22 09:12:51 +03:00
Timo Kreuzer
011ce7088c [PSEH] Use _setjmp3 with custom unwind function 2025-08-22 09:12:51 +03:00
Timo Kreuzer
e8d190a29e [VCRUNTIME] Implement _seh_longjmp_unwind 2025-08-22 09:12:51 +03:00
Timo Kreuzer
a5448b04c6 [VCRUNTIME] Properly implement setjmp/longjmp 2025-08-22 09:12:51 +03:00
Timo Kreuzer
0e0852e1da [ASM] Add some asm constants for x86 2025-08-22 09:12:51 +03:00
Timo Kreuzer
3dc1c5039d [RTL/x64] Implement support for STATUS_LONGJUMP in RtlRestoreContext
Also change license to MIT (this is all my own code)
2025-08-22 09:12:51 +03:00
Timo Kreuzer
f709f6f22f [NTOS:KE/x64] Initialize FP control word to INITIAL_FPCSR 2025-08-22 09:12:51 +03:00
Timo Kreuzer
80bef4fe40 [XDK][NTOS:KE] Update XSAVE_AREA 2025-08-22 09:12:51 +03:00
Timo Kreuzer
5b2091e37c [CRT_APITEST] Add more tests for _setjmp 2025-08-22 09:12:51 +03:00
Timo Kreuzer
d7761b1296 [VCRUNTIME][ASM] Fix definition of x64 _JUMP_BUFFER 2025-08-22 09:12:51 +03:00
Timo Kreuzer
d3a744a1ad [PSEH] Remove x64/ARM asm stubs
These are all x86 specific.
2025-08-22 09:12:51 +03:00
Timo Kreuzer
1694901961 [MSVCRT20][MSVCRT40] Only build for x86
These are legacy DLLs and only exist on x86.
2025-08-22 09:12:51 +03:00
Timo Kreuzer
cdfae35256 [NTOS:KDBG] Set default disassembly style to Intel
Seriously!
2025-08-22 09:12:51 +03:00
Eric Kohl
61ff1117ee [IPHLPAPI] More fixes for GetAdapterAddresses
- Fix the reversed DNS server ip addresses.
- Return the ip addresses and network prefix lengths in the prefix list.
2025-08-21 17:18:48 +02:00
Eric Kohl
fc84d6860a [ROUTE] Sort network interfaces by index 2025-08-20 21:41:51 +02:00
Doug Lyons
05caf99940 [NTOS:MM] Fix Lazarus hang when closing running project with "X" (#8331)
CORE-20172
Make DbgkUnMapViewOfSection in function MiRosUnmapViewOfSection contingent on MapCount being 0.
2025-08-20 14:18:25 -05:00
Carl J. Bialorucki
693e1ebc4c [APITESTS] Add GetNTDDIVersion() for NTDDI version detection at runtime (#8340)
- Introduce GetNTDDIVersion() to get NTDDI version at runtime for apitests.
- Introduce GetMajorNTVersion() and GetMinorNTVersion() macros and use them for GetNTVersion()
- Introduce GENERATE_NTDDI() macro to construct NTDDI values from major, minor, service pack, and subversion values.
- Introduce NTDDI_MIN and NTDDI_MAX macros for tests that use NTDDI ranges.

Note: the build number in KUSER_SHARED_DATA is only populated on Windows 10 RTM and later. On older Windows versions, this field is reserved and is usually 0. For this reason, I chose not to expose it as a macro.
2025-08-20 12:54:46 -06:00
Hervé Poussineau
4da4648092 [WIN32SS:USER] Add 'DISPLAY' as an alternate name for global display
CORE-20303
2025-08-20 19:33:17 +02:00
Hervé Poussineau
45c8cf7efd [WIN32SS:USER] UserEnumDisplayDevices: correctly report monitor device ids
desk.cpl can now open Monitor properties.
2025-08-20 19:33:17 +02:00
Doug Lyons
8e6fbe0c90 [NTUSER][COMCTL32] Fix garbage displayed at bottom of listbox.c (#8316)
CORE-20062
@I_Kill_Bugs fix for rect.bottom in LISTBOX_Paint function.
2025-08-20 11:34:44 -05:00
Eric Kohl
1a61f50ddd [ROUTE] Map interface index to ip address in the active routes list 2025-08-20 13:31:41 +02:00
Eric Kohl
f0ba72616d [ROUTE] Add improve the the delete command
- Add wildcard support to the delete command
- Add code to delete persistent routes
- Improve command line and registry value name parsing code
2025-08-19 16:23:01 +02:00
Eric Kohl
714dfdc29a [ROUTE] Add /f option to the add and delete command 2025-08-19 10:59:02 +02:00
Eric Kohl
2cba5b772d [ROUTE] Add missing advapi32 2025-08-18 22:26:59 +02:00
Eric Kohl
e0bdfb04f1 [ROUTE] Add support for persistent routes to the add and print command 2025-08-18 22:09:27 +02:00
Eric Kohl
4ddebadc7e [ROUTE] Support the -f and -p options and and improve the help text 2025-08-18 11:33:21 +02:00
Eric Kohl
46c2a3cd09 [ROUTE] Some improvements
- Improvements to the usage text
- Use GetAdapterAdresses instead of GetAdaperInfo
- Show the physical address for ethernet adapters
2025-08-17 21:02:00 +02:00
Eric Kohl
36533549a2 [IPHLPAPI] GetAdapterAddresses: Retrieve DnsSuffix 2025-08-17 14:45:19 +02:00
Eric Kohl
0502e33ae4 [IPHLPAPI] Improve GetAdapterAddresses
- Return the adapter name, friendly name and description for the loopback adapter.
- Return the description for network adapters.
2025-08-17 01:37:14 +02:00
Serge Gautherie
a871ff1763 [SDK] ntddndis.h: Add/Update 3 NDIS typedefs (#8319) 2025-08-16 19:05:42 +02:00
Serge Gautherie
d68a9d7aa4 [KMTESTS] KmtAreInterruptsEnabled(): Be explicit about architectures (#8295)
Let this function compile/run on other architectures, like ARM*.
And improve code a bit.

ROSTESTS-363
2025-08-16 19:03:17 +02:00
Serge Gautherie
5ae1c72395 [NDIS] NDIS_TAG: Fix definition and usages (#8243)
- Let it be `"NDIS"`, instead of variations of `"SIMN"`.
- Use matching `ExFreePoolWithTag()`.
- Remove a redundant `KeyInformation = NULL;`.

Addendum to commits e8861acfb2 (r12196) and 5658b2154c (r53045).
CORE-18791
2025-08-16 19:01:55 +02:00
Serge Gautherie
7e294faff4 [UNIATA] Upgrade to v0.47b from v0.47a (#8177)
- Remove unused idedma.def
  Addendum to commit 1daf74908e (r29256).

- Convert a few files to UTF-8 from ANSI
  Plus, 2 tiny formatting fixes.

- id_ata.cpp: Unmark a ReactOS own diff
  Addendum to commit 7fdf078134.

- id_init.cpp: Mark a diff
  Addendum to commit 09dde2cff9.

- Upgrade to v0.47b from v0.47a

CORE-17876
2025-08-16 18:56:58 +02:00
Serge Gautherie
f100d34638 [NDIS][PSDK] Define IOCTL_NDIS_RESERVED7 and add a stub (#8240)
Another small step, until further investigation and implementation.

CORE-13831
2025-08-16 19:54:21 +03:00
Serge Gautherie
513e977fbc [INTL] "sLanguage" actually relates to LOCALE_SABBREVLANGNAME, not LOCALE_SLANGUAGE (#8089)
Similar to commit ba507ba439 (PR #62)
CORE-13128 CORE-15848
2025-08-16 18:52:00 +02:00
Eric Kohl
7432f4e9d9 [ROUTE] Improvements to the ROUTE command
- Show the physical address for ethernet interfaces.
- Implement wildcard support for the print command (e.g. route print 192.168.*).
2025-08-16 15:55:54 +02:00
Eric Kohl
559a4ec918 [ROUTE] Convert ROUTE to UNICODE only 2025-08-16 11:35:26 +02:00
Eric Kohl
050d8a8d65 [ROUTE] Make ROUTE translatable
- English text only
2025-08-15 19:22:15 +02:00
Hermès Bélusca-Maïto
752f6b5591 [MSGINA] Erase passwords & set focus back to the password field, in failure cases (#8337)
Do this in the "Logon", "Unlock Computer", and "Change Password" dialogs.
2025-08-14 23:28:25 +02:00
Hermès Bélusca-Maïto
bded90874e [WINLOGON] Let the dialog manager manage the default focus (#8337)
- The single default button in the "Shutdown Computer" and "GINA failed
  to load" dialogs will be automatically focused by the dialog manager,
  so there is no need to invoke `SetFocus()` in their `WM_INITDIALOG`
  handler -- which also erroneously returned `TRUE`, thus ignoring any
  focus set by the caller :D

- Use `DeleteMenu()` instead of `RemoveMenu()` so that it'll free any
  memory resources.
2025-08-14 23:28:08 +02:00
Hermès Bélusca-Maïto
35ecbde693 [WINLOGON] *.rc: Fix dialog controls IDs; adjust few translations (#8337)
- "1" == `IDOK`; "-1" == `IDC_STATIC`
- Use the same translation for "Restart" between the two
  "GINA failed to load" and "Shutdown Computer" dialogs.
2025-08-14 23:28:08 +02:00
Hermès Bélusca-Maïto
20b3673aab [MSGINA] Fix default focus to dialog controls (#8337)
Fix some erroneous `SetFocus()` invocations in dialog procedures:

- In `WM_INITDIALOG`, don't return `TRUE` if focus is changed to a
  control, otherwise any focus set by the caller would be ignored;

- In other handlers, `SetFocus()` would generate an inconsistent
  behaviour with the dialog push-buttons, as mentioned in:
  https://devblogs.microsoft.com/oldnewthing/20040802-00/?p=38283
2025-08-14 23:28:02 +02:00
Hermès Bélusca-Maïto
d537052196 [MSGINA][SHELL32] Make the minimal shutdown and logoff dialogs handle WM_ACTIVATE similarly (#8334)
Fix also the `LOGOFF_DLG_CONTEXT Context` in `shell32!LogoffWindowsDialog()`
not being initialized to default values.
2025-08-14 17:56:43 +02:00
Hermès Bélusca-Maïto
61623ab497 [MSGINA] Use IDOK/IDCANCEL for the "Log Off ReactOS" Yes/No buttons (#8334)
This allows pressing ENTER or ESC on the keyboard and have the correct
action done. The equivalent dialog in shell32.dll was already using that.
Simplify the associated code as well.

Also: remove the unused `", 400, 0, 1"` `FONT` resource specification info.
2025-08-14 17:56:42 +02:00
Hermès Bélusca-Maïto
10b0101cc5 [MSGINA] *.rc: Default to "Lock Computer" in the "Security" dialog (#8334)
And add missing keyboard accelerators to the dialog buttons
(except for Hebrew where it's not clear what the preferred way
of specifying accelerators is).
2025-08-14 17:56:42 +02:00
Hermès Bélusca-Maïto
dc43104a70 [MSGINA] *.rc: Simplify BS_DEFPUSHBUTTON style (#8334)
Indeed, `DEFPUSHBUTTON` == `PUSHBUTTON ..., BS_DEFPUSHBUTTON` with
also the `WS_TABSTOP` style that is needed for keyboard navigation.
2025-08-14 17:56:22 +02:00
Adam Słaboń
8ecfbb3a8c [SETUPLIB] Fix system partition selection DPRINTs (#8336)
Some partition entries (such as those added by the CreateInsertBlankRegion function) may not have their Volume member allocated. This fixes the USETUP crash when such partitions are handled.
2025-08-14 17:40:52 +02:00
Eric Kohl
dc97a4d380 [DHCPCSVC][IDL] Implement DhcpRemoveDNSRegistrations()
The dnsapi.dll part is still missing.
2025-08-14 14:44:04 +02:00
Hermès Bélusca-Maïto
c29e4eb944 [WINLOGON] Move WlxShutdown() GINA notification in HandleShutdown() (#8329)
- Both 3rd-party modules and GINA shutdown notifications should be
  called just when shutdown is being started.

  Addendum to commit d3b9c68d22 (r66252)
  CORE-8322

- Factor the two `DisplayStatusMessage()` calls for shutdown vs. reboot.
2025-08-13 16:31:45 +02:00
Hermès Bélusca-Maïto
27e147a8ce [WINLOGON] Fixes for logon/logoff steps and notifications (#8325)
- The `LogonHandler` notification should be invoked only once for a
  given logon operation. It is invoked in `HandleLogon()` after access
  to the window station (and desktop) is allowed for the user logging in.
  And so, it must not be invoked elsewhere, when no user is logged in
  (or a logon failure happened), like after a call to `WlxDisplaySASNotice()`...

- Invoke the `StartShellHandler` notification **before** starting the
  shell, and the `PostShellHandler` notification **after** the shell
  started.

- Invoke the `LogoffHandler` notification on the application desktop,
  just after having terminated all the user's programs, and before
  switching back to Winlogon's desktop.

- Add and show the 'Logging off' status message.

- When performing the following actions:
  `WLX_SAS_ACTION_LOGOFF`, `WLX_SAS_ACTION_FORCE_LOGOFF`,
  as well as:
  `WLX_SAS_ACTION_SHUTDOWN`, `WLX_SAS_ACTION_SHUTDOWN_POWER_OFF`,
  `WLX_SAS_ACTION_SHUTDOWN_REBOOT`,
  ensure that Winlogon is in a correct LogonState for doing the logoff
  sequence.

----

Test results for Winlogon notifications, after fix:

- `Asynchronous: FALSE, Impersonation: FALSE`

  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventStartShell: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventPostShell: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLock: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventUnlock: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 0 skipped.
  WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 5 failures), 0 skipped.
  WLEventLogoff: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```

- `Asynchronous: FALSE, Impersonation: TRUE`

  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventStartShell: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventPostShell: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventLock: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventUnlock: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventStartScreenSaver: 34 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventStopScreenSaver: 34 tests executed (0 marked as todo, 2 failures), 0 skipped.
  WLEventLogoff: 34 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```
2025-08-13 16:26:59 +02:00
Eric Kohl
0bd6b3dd58 [DHCPCSVC][PSDK] Clean up, add some documentation and missing declarations 2025-08-13 14:58:27 +02:00
Serge Gautherie
f6346c6228 [NTOS:KE] Fix X86_FEATURE_MTTR typo (#8330)
"MTTR" should read: "MTRR".
2025-08-13 12:25:43 +02:00
Eric Kohl
0f4e223ce7 [DHCPCSVC] Implement the dhcp release message and fix the dhcp registry values
- Do not modify the EnableDHCP value as it should not be changed by the service.
2025-08-12 23:25:38 +02:00
Hermès Bélusca-Maïto
51ee32f5f8 [WINLOGON] Close all the user network connections only at logoff (#8324)
Per-user network connections (to shared drives...) are restored at user
logon: `HandleLogon() -> RestoreAllConnections()`.
These connections should be closed only at user logoff, in `HandleLogoff()`,
instead of inside the common logoff/shutdown thread, which is also invoked
at... shutdown!

- Isolate the network connections closing inside a `CloseAllConnections()`
  helper (which also performs the necessary user thread impersonation).

- Invoke this helper directly inside `HandleLogoff()`, and also re-enable
  the `IDS_CLOSINGNETWORKCONNECTIONS` message display.
2025-08-12 23:01:47 +02:00
Mohammed al-Ramadany
4f61d2ea04 [KERNEL32] Fix use-after-free in GetStartupInfoA (#8282)
- Set StartupInfo to point to the global BaseAnsiStartupInfo only after the local data has been freed.
2025-08-11 17:17:29 -06:00
Hermès Bélusca-Maïto
78ce856564 [WINLOGON] Duplicate the logged-in user/domain names and give them to the notifications (#8322)
Test results:

- Test 1a: `Asynchronous: FALSE, Impersonation: FALSE`
  BEFORE the fix:

  OK, the thread isn't impersonated:
  ```
  Thread Token   : 0x00000000 - User: '(null)\(null)'
  ```
  BUT these two WLX notify info fields aren't set when the user is logged in:
  ```
  Info.UserName       : '(null)'
  Info.Domain         : '(null)'
  ```

  Results:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  WLEventStartShell: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventUnlock: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 2 skipped.
  WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 7 failures), 2 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```

- Test 1b: `Asynchronous: FALSE, Impersonation: FALSE`
  AFTER the fix:

  OK, the thread isn't impersonated:
  ```
  Thread Token   : 0x00000000 - User: '(null)\(null)'
  ```
  OK, these two WLX notify info fields are now set when the user is logged in:
  ```
  Info.UserName       : 'Administrator'
  Info.Domain         : 'MYCOMPUTERNAME'
  ```

  Results:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventStartShell: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 32 tests executed (0 marked as todo, 2 failures), 0 skipped.
  WLEventUnlock: 32 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 7 failures), 0 skipped.
  WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 5 failures), 0 skipped.
  WLEventLogoff: 32 tests executed (0 marked as todo, 2 failures), 0 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```
  Less failed tests and none skipped anymore.

- Test 2a: `Asynchronous: FALSE, Impersonation: TRUE`
  BEFORE the fix:

  OK, the thread impersonates the user when (s)he is logged in:
  ```
  Thread Token   : 0x00000360 - User: 'MYCOMPUTERNAME\Administrator'
  ```
  BUT these two WLX notify info fields aren't set when the user is logged in:
  ```
  Info.UserName       : '(null)'
  Info.Domain         : '(null)'
  ```

  Results:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventStartShell: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 31 tests executed (0 marked as todo, 6 failures), 2 skipped.
  WLEventUnlock: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 2 skipped.
  WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventLogoff: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```

- Test 2b: `Asynchronous: FALSE, Impersonation: TRUE`
  AFTER the fix:

  OK, the thread impersonates the user when (s)he is logged in:
  ```
  Thread Token   : 0x00000360 - User: 'MYCOMPUTERNAME\Administrator'
  ```
  OK, these two WLX notify info fields are now set when the user is logged in:
  ```
  Info.UserName       : 'Administrator'
  Info.Domain         : 'MYCOMPUTERNAME'
  ```

  Results:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventStartShell: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 33 tests executed (0 marked as todo, 4 failures), 0 skipped.
  WLEventUnlock: 33 tests executed (0 marked as todo, 3 failures), 0 skipped.
  WLEventStartScreenSaver: 34 tests executed (0 marked as todo, 4 failures), 0 skipped.
  WLEventStopScreenSaver: 34 tests executed (0 marked as todo, 2 failures), 0 skipped.
  WLEventLogoff: 34 tests executed (0 marked as todo, 2 failures), 0 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```
  As well, less failed tests and none skipped anymore.
2025-08-11 22:00:23 +02:00
Hermès Bélusca-Maïto
b1322d43b2 [USERENV] LoadUserProfileW(): Improve handling of lpProfileInfo->lpProfilePath (#8321)
- As mentioned in the previous MSGINA commit aa67222595,
  `lpProfilePath` specifies the path to a *roaming* user profile,
  for example on a domain server, if any. It is then used to create
  a local image (copy) of the profile on the local computer.

  HOWEVER (ReactOS HACK):
  We currently don't implement this in ReactOS; instead, we use it
  directly as *the* user's profile path, without doing any copy...

- Yes, MS Windows allows `lpProfileInfo->lpProfilePath` to be NULL :)
2025-08-11 21:57:58 +02:00
Hermès Bélusca-Maïto
aa67222595 [MSGINA] CreateProfile(): Fix initialization of some WLX_PROFILE_V2_0 members (#8321)
The following members of the returned `WLX_PROFILE_V2_0` structure:
`pszProfile`, `pszPolicy`, `pszNetworkDefaultUserProfile`, and
`pszServerName`, have a specific meaning and are used when logging
to (NT4, Active Directory...) domains.
See the added code comments for details.

In particular, `pszProfile` specifies the path to a *roaming* user
profile[^1] on a domain server, if any. It **DOES NOT** specify the local
`"C:\Documents and Settings"` path (got via `GetProfilesDirectoryW()`).

Since we don't really support user login on domains, set these pointers to NULL.

----

Enabling UserEnv debug logging[^2] on Windows 2003, one can observe such
following traces, for a `TestUser` roaming user profile:
```
USERENV(148.14c) 20:24:59:821 LoadUserProfile: Entering, hToken = <0x8bc>, lpProfileInfo = 0x6e5d8
USERENV(148.14c) 20:24:59:875 LoadUserProfile: lpProfileInfo->dwFlags = <0x0>
USERENV(148.14c) 20:24:59:912 LoadUserProfile: lpProfileInfo->lpUserName = <TestUser>
USERENV(148.14c) 20:24:59:966 LoadUserProfile: lpProfileInfo->lpProfilePath = <C:\Documents and Settings\TestUser_Roaming>
USERENV(148.14c) 20:25:00:021 LoadUserProfile: lpProfileInfo->lpDefaultPath = <\\PC-H\netlogon\Default User>
USERENV(148.14c) 20:25:00:075 LoadUserProfile: NULL server name
...
USERENV(148.14c) 20:25:06:177 CopyProfileDirectoryEx: Found hive file NTUSER.DAT
USERENV(148.14c) 20:25:06:395 ReconcileFile: C:\Documents and Settings\TestUser_Roaming\NTUSER.DAT ==> C:\Documents and Settings\TestUser\NTUSER.DAT  [OK]
...
```
The `lpProfilePath` specifies a roaming profile directory (`"TestUser_Roaming"`)
for a user named named `TestUser`, and UserEnv proceeds to image the roaming
profile into the directory (`"TestUser"`) in the local computer.

However, when the user has a local profile, the `lpProfilePath` is set to
NULL in this case, and one observes instead:
```
USERENV(148.14c) 20:21:22:644 LoadUserProfile: NULL central profile path
```

----

[^1]: The following links explain this, also demonstrating UserEnv debug logging:
    - https://web.archive.org/web/20130319204738/http://blogs.technet.com/b/askds/archive/2008/11/11/understanding-how-to-read-a-userenv-log-part-2.aspx
    - https://web.archive.org/web/20150405040409/http://blogs.technet.com/b/ad/archive/2007/08/20/tracking-user-environment-creation.aspx

[^2]: For more details, see:
  https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/221833
  (archived from: http://support.microsoft.com/kb/221833)
  UserEnv debug logging is achieved by adding a `REG_DWORD` value named
  `UserEnvDebugLevel` in the following registry sub-key:
  `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon`
  with a non-zero value.
  To view the output in a debugger (e.g. WinDbg when kernel-debugging
  Windows), set the value to `0x00020002`.
2025-08-11 21:55:43 +02:00
Hermès Bélusca-Maïto
96249c12d9 [WINLOGON] Implement support for user impersonation when calling notification handlers (#8320)
Also, capture in `CallNotificationDll()` the notify info structure template
before invoking each DLL handler: a malicious caller might modify its contents,
and so we need to re-initialize its contents for each call.

Test results:

- Test 1: `Asynchronous: FALSE, Impersonation: FALSE`
  Before & After the fix, give the same results:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  WLEventStartShell: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventUnlock: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 2 skipped.
  WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 7 failures), 2 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```

  * The current notification thread doesn't impersonate any user, the
    dumped thread token shows:
    `Thread Token   : 0x00000000 - User: '(null)\(null)'`
    (except for `WLEventStartScreenSaver` and `WLEventStopScreenSaver`
    which currently in ReactOS, impersonate the logged user and shows e.g.,
    `Thread Token   : 0x00000250 - User: 'MYCOMPUTERNAME\Administrator' ).

- Test 2: `Asynchronous: FALSE, Impersonation: TRUE`
  Before the fix:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 29 tests executed (0 marked as todo, 8 failures), 4 skipped.
  WLEventStartShell: 29 tests executed (0 marked as todo, 8 failures), 4 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 29 tests executed (0 marked as todo, 9 failures), 4 skipped.
  WLEventUnlock: 29 tests executed (0 marked as todo, 8 failures), 4 skipped.
  WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 2 skipped.
  WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 7 failures), 4 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```

  * There are more failures (and skipped tests), because in impersonation
    mode, the tests expect that the current thread is impersonating the
    logged-on user, and validate whether this impersonated user matches
    what the WLX notification `Domain` and `UserName` information structure
    members are. However, these two fields aren't set yet, and the thread
    isn't impersonating any user yet.

  * The dumped thread token shows the same information as in Test 1.

- Test 3: `Asynchronous: FALSE, Impersonation: TRUE`
  After the fix:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventStartShell: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 31 tests executed (0 marked as todo, 6 failures), 2 skipped.
  WLEventUnlock: 31 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventStartScreenSaver: 32 tests executed (0 marked as todo, 6 failures), 2 skipped.
  WLEventStopScreenSaver: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventLogoff: 32 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```

  * There are now less skipped tests than in Test 2, as much as in Test 1.

  * There are also less failed tests than in Test 2; however, there are
    few more failed tests than in Test 1, but this is balanced by new
    tests being executed.

  The reason is that now, compared to Test 2 in impersonation mode, the
  current thread is correctly impersonating the logged-on user, if any.
  However, the WLX notification `Domain` and `UserName` information
  structure members still aren't set yet, thus some of the tests fail.

  * The dumped thread token for all notifications now show e.g.,
    `Thread Token   : 0x00000360 - User: 'MYCOMPUTERNAME\Administrator'`
    (`WLEventStartup`, `WLEventShutdown` don't show any, since no user
    is logged-in at these stages.)
2025-08-11 18:43:58 +02:00
Eric Kohl
7dd18589a5 [IDL] Do not use the browser service interface GUID for the DHCP client service 2025-08-10 21:17:06 +02:00
Hermès Bélusca-Maïto
4d85dd4f97 [MSGINA] gui.c: Simplify 'wcslen(string) != 0' tests 2025-08-10 20:56:41 +02:00
Eric Kohl
88325f637b [BROWSER][BOOTDATA] Make the Browser service start properly
- Implement SvchostPushServiceGlobals() to make svchost happy.
- Add the Browser service to the netsvcs group.

CORE-18262
2025-08-10 10:47:03 +02:00
Serge Gautherie
d4d52e1529 [KERNEL32][KERNEL32_VISTA] .spec: Fix QueryFullProcessImageName*() param type (#8294)
"Out"-only parameters are only annotated as ptr.
2025-08-08 23:37:35 +02:00
Serge Gautherie
ea41cfe290 [USER32] .spec: Fix GetDpiForMonitorInternal() param type (#8302)
Use ptr for handles.
2025-08-08 23:36:35 +02:00
Serge Gautherie
f24b57378e [PSDK][KS] IKsProcessingObject_fnProcessingObjectWork(): Fix mutex copypastas (#8288)
- ks.h: Add KsFilterReleaseProcessingMutex() declaration

- `IKsProcessingObject_fnProcessingObjectWork()`: Fix mutex copypastas

Addendum to commit c6b26fa452 (r50531).
CORE-19511
2025-08-08 23:35:56 +02:00
Carl J. Bialorucki
57092f4990 [CRYPT32_WINETEST] Sync crypt32 winetest to wine-10.0 (#8058)
- Sync crypt32 winetest to Wine 10.0.
- Guard tests we can't compile yet.
- Conditionally skip tests that crash on different Windows versions.
2025-08-08 11:28:10 -06:00
Hermès Bélusca-Maïto
2cf3f14c50 [WINLOGON] Delay notification DLL loading until the very first notification (#8285)
And retrieve all its exported notification handlers.
This reverts parts of commit 5d4f69bf35.

Because notification DLLs can keep internal state between successive
notifications, they are kept loaded until Winlogon termination.

The SFC notification DLL is also loaded. Because sfc.dll redirects to
sfc_os.dll, the latter is then automatically loaded. This allows doing
what commit 88ee639b06 (r68615) was aiming at, in a less hackish manner.

CORE-9598

Test results:

- Before:

  We observe the repeated loading/unloading of the DLL at each
  notification call:
  ```
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
  ...
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x0, pReserved: 0x00000000)
  ```

  The global state of the notification DLL is lost between each
  notification, and such testing errors happen:
  ```
  modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:786: Test failed: **** WLEventLogon: ERROR: Wrong state NON-INITIALIZED, expected Startup or Logoff
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1034) **** WLEventLogon: Changing state NON-INITIALIZED to Logon
  ```
  The previous notification state is always reset to `NON-INITIALIZED` (its initial value).

  Test results for all the notifications:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventStartShell: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventUnlock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 10 failures), 0 skipped.
  WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 0 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 5 failures), 0 skipped.
  ```

- After:

  The DLL is loaded only once, at the first notification, then stays
  loaded for the whole life of winlogon.exe:
  ```
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
  ```
  and the global state of the notification DLL is now kept between each
  notification, there are no `ERROR: Wrong state NON-INITIALIZED, expected ...`
  errors anymore.

  Test results for all the notifications:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  WLEventStartShell: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  (NOTE: WLEventPostShell isn't yet implemented in ReactOS)
  WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventUnlock: 30 tests executed (0 marked as todo, 3 failures), 2 skipped.
  WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 2 skipped.
  WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 7 failures), 2 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 3 failures), 0 skipped.
  ```
2025-08-08 16:37:44 +02:00
Oleg Dubinskiy
62f9d1ad46 [TCPIP] Return MIB_IF_TYPE_ETHERNET for WLAN adapter types when compiling ReactOS as NT 5.2 (#8300)
Split Windows Server 2003 and Windows Vista behaviour in two different cases and make them used separately: when ReactOS target version is NT 5.2, use the 1st case, otherwise use the 2nd one instead.
Also, handle NdisPhysicalMediumNative802_11 case only for NT 6.0 and newer, since that's actually supported starting from NDIS 6.0, according to MSDN:
https://learn.microsoft.com/en-us/windows-hardware/drivers/network/oid-gen-physical-medium
while for NDIS 5.1 and newer it's:
https://learn.microsoft.com/en-us/previous-versions/windows/hardware/network/ff560255(v=vs.85)
This fixes:
1. A critical regression with unavailable networking in ReactOS when 3rd-party NT5-compatible Ethernet/Wi-Fi drivers are used (both in VM and on real hardware) caused by commit 3842b59f75 from @EricKohl.
2. Failure to open Network Properties and Network Status from the Network tray icon (caused by the same commit too).
MSDN tells us this is done so for Windows XP and Server 2003 as well, and IF_TYPE_IEEE80211 is returned only in Windows Vista and newer, so the following Microsoft documentation is actually correct in this case:
https://learn.microsoft.com/en-us/windows/win32/api/iptypes/ns-iptypes-ip_adapter_info
(see the information about "IP_ADAPTER_INFO.Type" member below on that page)
!!!Please note that the behaviour of Vista+ case (e. g., when compiling ReactOS targeted as NT 6.0 and newer) remains unchanged after this fix (networking still may not work), so it still requires the proper support of 3rd-party NT6+ compatible network miniport drivers (by handling this case via the Vista/NDIS6-style way) for NT6 target!!!
CORE-20244
2025-08-08 16:10:50 +02:00
Hermès Bélusca-Maïto
7b1c15f182 [WINLOGON] AddNotificationDll(): Expand the "DllName" path if needed (#8283)
Expand the "DllName" notification DLL path string, independently of
whether it is REG_SZ or REG_EXPAND_SZ, before loading it, similarly
to Windows' winlogon.exe.

Validate also the type/size of the retrieved registry value.
2025-08-08 13:53:18 +02:00
Timo Kreuzer
6acb13c903 [RTL] Fix RtlpGetRegistryHandle 2025-08-07 11:59:38 +03:00
Timo Kreuzer
b8abfb1392 [RTL] Fix random functions 2025-08-07 11:59:38 +03:00
Timo Kreuzer
5c1c28109f [WIN32KNT_APITEST] Add a delay-import hooks
This will change the dll name to the one appropriate for the current Windows version and report import failures.
2025-08-06 17:48:37 +03:00
Timo Kreuzer
844adc86c6 [WIN32U] Add win32u_2k3sp2 and win32u_xpsp2 as rostest files 2025-08-06 17:48:37 +03:00
Timo Kreuzer
5840b212a8 [DELAYIMP] Separate hook symbols from library code
This allows to define these functions in the importing module.
2025-08-06 17:48:37 +03:00
Timo Kreuzer
85aff698ca [DELAYIMP] Switch license to MIT
Agreed upon by Mark Jansen. Also update header to new format.
2025-08-06 17:48:37 +03:00
Timo Kreuzer
dda1cb9346 [PSDK] Avoid NDK include in versionhelpers.h 2025-08-06 17:48:37 +03:00
Timo Kreuzer
6ad06fc731 [KERNEL32_APITEST] Fix SystemFirmware test 2025-08-05 16:20:02 +03:00
Timo Kreuzer
64701d0798 [NTOS:EX] Fix query of SystemFirmwareTableInformation 2025-08-05 16:20:02 +03:00
Timo Kreuzer
3a0f9f2fa0 [NTOS:EX] Fix query of SystemLookasideInformation
Prevents a failed ASSSERT
2025-08-05 16:20:02 +03:00
Timo Kreuzer
b7066b9232 [TCPIP] Fix "mbox" queue synchronization
Use a KSEMAPHORE instead of a NotificationEvent to signal availability. This is to prevent satisfying the wait for multiple waiters, when only a single entry is on the list.
Fixes crashes on SMP builds.
2025-08-05 09:15:07 +03:00
Timo Kreuzer
069fc049db [TCPIP] Fix global synchronization on SMP
We cannot just raise IRQL! Instead use a global ERESOURCE, which allows to be acquired recursively, as required by LWIP.
2025-08-05 09:15:07 +03:00
Pierce Andjelkovic
b4731b7f8f [NEWDEV] Correct typo in en-us locale (#8270)
Change "removeable" (uncommon British English spelling) to "removable" (standard US spelling) in the en-US locale.
2025-08-04 21:00:53 -06:00
Doug Lyons
9d325e6c46 [NET] Fix 'net use' command random fails (#8298)
CORE-20287

* Address reviewer comment by zeroing 'NETRESOURCE lpNet' in define.
2025-08-04 20:55:16 -05:00
Whindmar Saksit
58276e81ee [COMCTL32] ListView must update header font if it deletes the old font (#8287)
A bug fix for PR #7783
2025-08-03 23:33:00 +02:00
Eric Kohl
94a6102cd2 [DHCPCSVC] Convert the pipe based client-server interface to RPC 2025-08-03 22:39:36 +02:00
Eric Kohl
a6d3787507 [DHCPCSVC] Remove obsolete functions
DhcpLeaseIpAddress, DhcpReleaseIpAddressLease and DhcpRenewIpAddressLease have been replaced by DhcpAcquireParameters and DhcpReleaseParameters
2025-08-03 14:14:18 +02:00
Eric Kohl
33696393e7 [IPHLPAPI] Update IpRenewAddress and IpReleaseAddress
IpReleaseAddress: Use DhcpReleaseParameters instead of DhcpReleaseIpAddressLease.
IpRenewAddress: Use DhcpAcquireParameters instead of DhcpRenewIpAddressLease.
2025-08-03 13:01:04 +02:00
Eric Kohl
959d3b9604 [CMAKE] Add add_rpc_file macro
The add_rpc_file macro enables us to use ACF files or set prefixes.
2025-08-03 11:06:32 +02:00
Timo Kreuzer
73b54ce2a6 [PSDK] Improve some headers 2025-08-03 10:37:24 +03:00
Timo Kreuzer
d6cfd00ae2 [XDK] Add Read/Write helper functions 2025-08-03 10:37:24 +03:00
Timo Kreuzer
c70f741627 [VCRUNTIME] Add initial intrin0.inl.h 2025-08-03 10:37:24 +03:00
Timo Kreuzer
41478e978c [VCRUNTIME] Add initial arm64intr.h 2025-08-03 10:37:24 +03:00
Timo Kreuzer
2d43fd458c [WINE] Header improvement
Add some sdk/ddk headers that contain wine specific definitions.
2025-08-03 10:37:24 +03:00
Mark Jansen
dfc05a68a5 [APPHELP] Make some more tests pass 2025-08-01 21:53:38 +02:00
Mark Jansen
411b92440f [APPHELP_APITEST] Fix tests for Win10 + restore some tests for x64 2025-08-01 21:53:38 +02:00
Mark Jansen
552f858018 [ROSAUTOTEST] Add option to use libcurl 2025-08-01 20:49:29 +02:00
Doug Lyons
d413de1b19 [WIN32K:ENG] Fix CyberBoard BSOD: Use 'MAXLONG' instead of 'MAX_COORD' in lStyleMax (#8279)
CORE-20209

* Add ASSERT's as suggested by @HBelusca.
2025-07-31 16:14:21 -05:00
Timo Kreuzer
f5612437ee [PSDK] Update ntstatus.h 2025-07-31 16:00:13 +03:00
Timo Kreuzer
e195303889 [PSDK][XDK] Update some definitions 2025-07-31 16:00:13 +03:00
Timo Kreuzer
05dc65bd17 [PSDK] Add ioapiset.h 2025-07-31 16:00:13 +03:00
Timo Kreuzer
76ef3c45a5 [PSDK] Add minwinbase.h 2025-07-31 16:00:13 +03:00
Timo Kreuzer
db2889a983 [PSDK] Add minwindef.h 2025-07-31 16:00:13 +03:00
Hermès Bélusca-Maïto
4de70afa22 [THEMES][LUNAR] Fix German typo in translation 2025-07-31 13:35:29 +02:00
Hermès Bélusca-Maïto
ba36b907ad [WINLOGON][WLNTFYTESTS] Implement loading notification DLLs in safe-boot mode (#8278)
Historical note:
Investigation shows that this functionality, introduced between builds
1902 and 1906 of Windows NT 5.0 (future 2000) Beta 3, has always been
"nop-ed" and has remained this way till Windows Server 2003.
The value read from the "SafeMode" registry value is unconditionally
overridden afterwards, causing the notification DLLs to always be loaded.

In ReactOS, this functionality is restored, and only the notifications
tagged as such are loaded in SafeMode.

Furthermore:
Analysis of strings in Win2000 and WinXP/2003 winlogon.exe, show that
the "Safe" registry value doesn't exist for notifications; instead,
it is named "SafeMode".
The "Safe" value appears only for the SensLogn (SENS Winlogon Event) handler
registry entry. My hypothesis is that the value name is a typo for the
"SafeMode" value. It has been introduced in the `\Winlogon\Notify\SensLogn`
registry entry for SensLogn around Windows NT 5.0 build 1946.
2025-07-30 17:46:54 +02:00
Hermès Bélusca-Maïto
96711c6c59 [WINLOGON] AddNotificationDll(): Validate the registry retrieved DWORDs (#8277)
Validate the DWORDs, instead of accepting any sort of value.

+ Add SAL2 annotations and improve a TRACE.
2025-07-30 12:42:31 +02:00
Hermès Bélusca-Maïto
b74e243579 [WINLOGON][WLNTFYTESTS] The "Enabled" registry value doesn't exist for notifications (#8276)
Analysis of strings in Win2000 and WinXP/2003 winlogon.exe, show that
the "Enabled" registry value doesn't exist for notifications.

This value is actually only used by the ScCertProp (Smart Card Certificate
Propagation) notifications, in wlnotify.dll, to enable or disable certificate
progagation.[^1]

Note that whatever the "Enabled" registry value is, the notification DLL
is still loaded within winlogon.exe.

We however keep the `bEnabled` internal flag, so as to be able to disable
at runtime notifications that could not be delay-loaded, or that behave
erratically, etc.

[WLNOTIFY] Add a comment about the "Enabled" value in scard.c!SCardStartCertProp()

[^1]: For more information, see:
https://www.microfocus.com/documentation/securelogin/9.0/administration_guide/blm54qb.html?view=print
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/925884
2025-07-30 12:37:23 +02:00
Eric Kohl
67e47135da [BOOTDATA] Revert unintended change and fix more keyboard layout IDs 2025-07-29 23:25:31 +02:00
Carl J. Bialorucki
b86422cd4b [SHELL32_APITEST] Several fixes (#8266)
Fix the shell32 apitests so that they pass on Windows Server 2003 - Windows 10. Many of these fixes are for Vista+, but the most important fixes are for ShellExecCmdLine and FindExecutable which had issues closing windows after tests and deleting test files. Failing to delete these files breaks the other test (i.e. running ShellExecCmdLine would break FindExecutable and vis-versa.)
2025-07-29 14:06:13 -06:00
Carl J. Bialorucki
c9842e5aad Move /sdk/include/reactos/wine to /sdk/include/wine, reorder global includes, remove unneeded includes (#8258)
- Move sdk\include\reactos\wine to sdk\include\wine
- Reorder the directories in include_directories() to be closer to alphabetical. This should make it easier to determine what global include directories can be removed in the future.
2025-07-29 13:57:12 -06:00
Eric Kohl
f02ac8bc1e [BOOTDATA][KEYBOARDS] Add the German (IBM) keyboard layout 2025-07-29 21:52:20 +02:00
Eric Kohl
d908ad026d [BOOTDATA] Change the keyboard IDs of the Ristome, Ergo and Neo keyboard layouts.
Windows uses the keyboard layout IDs of the Ristome, Ergo and Neo layouts for the German(IBM), German Extended 1 and German Extended 2 keyboard layouts.
2025-07-29 21:42:26 +02:00
Timo Kreuzer
719ea022ec [UCRT] Fix GCC/Clang SIMD compilation
GCC and Clang need to mark functions that use SSE/AVX etc, either with a function attribute or a pragma around the function. strlen uses a template function that either uses SSE2 or AVX2. Previously the template was surrounded with pragmas to allow both SSE2 and AVX2, but that makes GCC assume that it can use AVX2 instructions even in the SSE2 version. To fix this the template instances are now build in individual compilation units for SSE2 and AVX, separate from the "dispatcher" function.
Now ucrtbase doesn't crash anymore on GCC build.

Another issue was the namespace around strnlen_mode, which has confused clang so much, that it forgot to instantiate the template code.
2025-07-29 09:22:15 +03:00
Timo Kreuzer
e2deec8235 [UCRT] Fix __crt_fast_encode_pointer
GCC was optimizing away the xor with __security_cookie when passing nullptr_t, because the return value was also nullptr_t, assuming it must be nullptr.
2025-07-29 09:22:15 +03:00
Justin Miller
6891f03119 [SHELL32_WINETEST] Disable GetDisplayName test which is acting weird on Windows (#8273)
Disable GetDisplayName test which is acting weird on Windows
2025-07-28 22:39:04 -07:00
Doug Lyons
10bc0d4660 [WIN32K:ENG] Fix triangle gradient fill solid color versus gradient color selection logic (#8269)
CORE-13532
* Fix macros VCMPCLR and VCMPCLRS to correctly select between gradient color or solid color triangles.
* Remove hack from commit 1c0aedc and replace it with 'if' test before STEPCOL in 'while' test.
* Other assorted fixes for FILLLIINE macro starting position to completely fill triangles.
* Remove warning/FIXME: about IntEngGradientFillTriangle being broken.
* Precede some 'while' loops by 'if' tests to exclude possible loops.
2025-07-28 22:00:35 -05:00
Hermès Bélusca-Maïto
50b1242e99 [WLNTFYTESTS] Add extended tests for the Winlogon notifications
Introduce and use a minimal testing framework (minitest.h) based on
an updated version of `wine/test.h`.

Each notification handler becomes its own test. Useful macro and
function helpers have been introduced to simplify the code that is
duplicated for each handler.

See commit 38d07d3a24 (PR #8234) for the details of how to install
and use the notification dll.

These tests can exercise the notifications in the four cases, where
asynchronous events and user impersonation can be independently
enabled or disabled. To do this, the `Asynchronous` and `Impersonate`
registry `REG_DWORD` values, inside the `WLNotifyTests` subkey of:
  `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Notify`
must be set to their intended values[^1].

----

[^1]: https://learn.microsoft.com/en-us/windows/win32/secauthn/registry-entries

----

Current test results:

- When each notification is emitted, the DLL is loaded then unloaded:
  ```
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1307)
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x1, pReserved: 0x00000000)
  ...
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1307)
  WLNOTIFY(ac.b0):  Entering `DllMain`(hInst: 0x10000000, dwReason: 0x0, pReserved: 0x00000000)
  ```
  This doesn't happen on Windows. And indeed, it should _not_ happen,
  because otherwise the DLL would loose any of its internal global state
  between consecutive notification calls. This currently happens in
  ReactOS, where we can observe the following:
  ```
  modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:788: Test failed: **** WLEventLogon: ERROR: Wrong state NON-INITIALIZED, expected Startup or Logoff
  ...
  err:(modules\rostests\win32\winlogon\wlntfytests\wlntfytests.c:1036) **** WLEventLogon: Changing state NON-INITIALIZED to Logon
  ```
  and similar for every other notification.

- Test results for each notification:
  ```
  WLEventStartup: 30 tests executed (0 marked as todo, 1 failure), 0 skipped.
  WLEventLogon: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventStartShell: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  -- Note: missing WLEventPostShell --
  WLEventLock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventUnlock: 30 tests executed (0 marked as todo, 4 failures), 2 skipped.
  WLEventStartScreenSaver: 30 tests executed (0 marked as todo, 10 failures), 0 skipped.
  WLEventStopScreenSaver: 30 tests executed (0 marked as todo, 9 failures), 0 skipped.
  WLEventLogoff: 30 tests executed (0 marked as todo, 5 failures), 2 skipped.
  WLEventShutdown: 31 tests executed (0 marked as todo, 5 failures), 0 skipped.
  ```
2025-07-28 22:04:05 +02:00
Hermès Bélusca-Maïto
46e0fffb54 [WINLOGON] Cleanup code in InitNotifications() and CallNotificationDlls()
- `KEY_ENUMERATE_SUB_KEYS` is redundant with `KEY_READ`;
- Simplify the `dwIndex` loop in `InitNotifications()`.
2025-07-28 22:04:04 +02:00
Hermès Bélusca-Maïto
1f7d34ec5b [WINLOGON] Simplify notification structure cleanup code
- Add DeleteNotification() helper;
- Invoke it in failure path in AddNotificationDll(), and in
  CleanupNotifications().
- Simplify iteration loops in CallNotificationDlls() and in
  CleanupNotifications().

Side-note: When doing `Notification = CONTAINING_RECORD(ListEntry, ...);`
where `ListEntry` iterates over a well-formed linked-list, the `Notification`
pointer can **NEVER** be NULL!
2025-07-28 22:04:03 +02:00
Hermès Bélusca-Maïto
627f8da3cd [WINLOGON] SASWindowProc(): Call PostQuitMessage(0) on WM_DESTROY
Now the WinMain() message loop correctly exits and we get to perform
last-time cleanup. However, the main thread must not exit (except under
certain conditions, not yet implemented), so we Sleep for an infinite
amount of time.
2025-07-28 22:04:02 +02:00
Eric Kohl
0e6c0af354 [KBDGRIST] Commit the proper files 2025-07-28 21:35:34 +02:00
Eric Kohl
c62ef77697 [KEYBOARD] Rename kbdgr1.dll to kbdgrist.dll
kbdgr1.dll is reserved for the German (IBM) keyboard layout but it is currently used by the German (RISTOME) keyboard layout.
2025-07-28 21:20:40 +02:00
Katayama Hirofumi MZ
915b771037 [EXPLORER][NTUSER] Notify ABN_FULLSCREENAPP and fix monitor code (#8254)
Enable ABN_FULLSCREENAPP notification.
Fix some monitor functions.
JIRA issue: CORE-7237
- Improve NtUserMonitorFromRect and
  NtUserMonitorFromWindow functions.
- Remove if-statement in
  OnWindowActivated function.
- Don't check WS_EX_TOOLWINDOW in
  IntIsWindowFullscreen function.
- Add IntGetMonitorFromRect helper
  function to commonize some code in
  monitor functions.
2025-07-28 17:58:59 +09:00
Eric Kohl
fade0c3b89 [BOOTDATA] Fix resource id of Malayalam keyboard layout display name 2025-07-27 13:58:02 +02:00
Eric Kohl
7e1d9ef9bf [DHCPCSVC] Add DhcpEnumClasses and DhcpHandlePnpEvent stubs 2025-07-26 19:00:04 +02:00
Eric Kohl
76e5143e42 [IPCONFIG] Print proper error messages and more TCHAR fixes 2025-07-26 15:50:16 +02:00
Eric Kohl
e5b35337fd [IPCONFIG] Get rid of tchar.h 2025-07-26 15:25:08 +02:00
Eric Kohl
4b53972724 [IPCONFIG] Print an error message on unrecognized or incomplete command line 2025-07-26 12:35:40 +02:00
Eric Kohl
4e425b54b6 [BOOTDATA] Add missing Locale for Bengali (Bangaldesh)
This should fix CORE-20213. Please test again.
2025-07-23 22:25:46 +02:00
Doug Lyons
996bde80a9 [WIN32K] Fix gdi/dib horizontal line draw function crashes (#8263)
* [WIN32K] Fix gdi/dib assembly code and 'C' code horizontal line draw function crashes.
Do not do subtracts that cause a wrap to a negative value when determining length.
This affects bit depths of 8, 16, 24, and 32 Bits per Plane.

CORE-19634
CORE-13532
2025-07-22 13:09:53 -05:00
Eric Kohl
ea189a3048 [IPCONFIG] Implement the /setclassid option
The current implementation does not notify the dhcp client of the changed registry setting. Windows IPCONFIG calls DhcpHandlePnpEvent after setting the DhcpClassId registry value.
2025-07-20 13:59:39 +02:00
Timo Kreuzer
9750f6decd [RTL/x64] Improve RtlUnwindInternal
- Implement RtlpExecuteHandlerForUnwind in asm
- Implement RtlpExecuteHandlerForUnwindHandler
- Use the correct context in DISPATCHER_CONTEXT when unwinding
- Handle collided unwinds
2025-07-20 10:42:26 +03:00
Timo Kreuzer
4d21384d8f [COMPILER_APITEST] Add a test for collided unwind 2025-07-20 10:42:26 +03:00
Timo Kreuzer
6334168bf5 [COMPILER_APITEST] Enable some SEH tests for MSVC builds 2025-07-20 10:42:26 +03:00
Katayama Hirofumi MZ
d958a24678 [NTUSER][USER32_APITEST] Support ShowWindow.SW_FORCEMINIMIZE (#8261)
One more step to support ghost windows.
JIRA issue: CORE-19671
- Add IntForceMinimizeWindow helper
  function.
- Use IntForceMinimizeWindow in
  co_WinPosShowWindow function.
- Enhance ShowWindow testcase in
  user32_apitest.
- Add mask to the return value of
  GetWindowLong.
2025-07-20 13:14:01 +09:00
Eric Kohl
6ebf15d838 [IPCONFIG] Call DHCP functions directly
Use DhcpAcquireParameters and DhcpReleaseParameters instead of iphlpapi functions.
2025-07-19 13:31:25 +02:00
Eric Kohl
cb0c31945e [DHCPCSVC] DSAcquireParams and DSReleaseParams must return an error code 2025-07-19 10:52:46 +02:00
Eric Kohl
28b35625dd [DHCPCSVC] Change AdapterName parameter to UNICODE
DhcpAcquireParameters and DhcpReleaseParameters use a UNICODE AdapterName parameter.
2025-07-18 23:31:21 +02:00
Ratin Gao
49e652b7b7 [NTOS:PS] Implement ProcessImageFileNameWin32 information class 2025-07-17 18:18:47 +03:00
Whindmar Saksit
805d4c7eea [RAPPS] Added LnkParameters Generate field to set the shortcut parameters (#8262) 2025-07-17 16:28:34 +02:00
Katayama Hirofumi MZ
519232df78 [MSCTF] Support TF_CreateCategoryMgr etc. (#8260)
Implementing missing features...
JIRA issue: CORE-19361
- Implement TF_CreateCategoryMgr
  and TF_CreateDisplayAttributeMgr.
- Rename g_tlsIndex as g_dwTLSIndex.
- Use ProcessAttach and
  ProcessDetach in DllMain.
2025-07-17 21:17:28 +09:00
George Bișoc
a5ab400689 [SDK] Swap initguid and wdm headers
The WDM header contains power manager related GUIDs that were declared but never initialized properly due to the fact the initguid.h header wasn't at the top.
This patch fixes a linker error in the kernel where GUIDs like GUID_LIDSWITCH_STATE_CHANGE are used.
It's a hotfix for 624c3fd.
2025-07-16 22:08:55 +02:00
George Bișoc
624c3fd847 [SDK] Introduce the PO GUID library
This library aims to include all the public and global power manager related GUID identifiers into one shared library, of which they can be accessed across multiple modules of ReactOS, e.g. the kernel, ACPI, PCI, et al.

This patch is needed for the development of the Power Manager (#5719) to continue.

CORE-18969
2025-07-16 20:15:15 +02:00
Whindmar Saksit
c40624ae2a [SHELL32] Only set state flag if state is set on items in DefView list (#8259)
CORE-20273
2025-07-16 13:36:02 +02:00
Justin Miller
b8f1da6483 [BOOT] Make ACPI always copy on amd64 (#8238)
This just makes it so ACPI.sys is always loaded and copied by the bootcd no matter what on amd64.
On x86 it can depend on whether we're using an ACPI hal but is set up to never boot with ACPI on the bootcd.
2025-07-14 22:51:15 -07:00
Dmitry Borisov
b558596409 [SPTILIB] Introduce SPTI static library for storage drivers (#8209)
Add a SCSI and ATA passthrough support helper library for direct use
from low-level storage drivers.

Tested with: CDRoller, CloneCD, Magic ISO
NOTE: Vbox seems to lack support for CD/DVD burning; tested on real hardware.

CORE-10191 CORE-16452
CORE-14788 CORE-18241
CORE-17256 CORE-13866
2025-07-13 22:49:51 +02:00
Piotr Hetnarowicz
5bd84f6f71 [NETSHELL] Update Polish (pl-PL) translation (#8208) 2025-07-13 19:35:07 +02:00
Piotr Hetnarowicz
2d886daabd [POWERCFG] Update Polish (pl-PL) translation (#8206) 2025-07-13 19:34:51 +02:00
Hermès Bélusca-Maïto
9b7c788cd0 [SETUPLDR] Add support for architecture-specific "SourceDisksNames" section (#8249)
Will be used for installing specific drivers on x64
(e.g. the ACPI driver, see PR #8238).

Add also the ARM64 define in the SETUPLIB spapisup.h header.
2025-07-13 19:23:06 +02:00
Katayama Hirofumi MZ
a18a5734ac [MSCTF][CICERO][DOC] Fork MSCTF from Wine (#8245)
JIRA issue: CORE-19361
- Delete msctf.c and add msctf.cpp.
- Modify precomp.h and enable precompiled header.
- Modify media/doc/WINESYNC.txt.
- Add cicMemReCalloc function to cicero.
2025-07-13 18:30:42 +09:00
Matisse Rüdiger
853b446e38 [ACPPAGE] Update French (fr-FR) translation (#8248)
The word "colours" was left untranslated.
2025-07-12 22:06:15 +02:00
Piotr Hetnarowicz
92c399e0d8 [DEVMGR] Update Polish (pl-PL) translation (#8207) 2025-07-12 20:34:31 +02:00
Piotr Hetnarowicz
0459e0daff [STOBJECT] Update Polish (pl-PL) translation (#8198) 2025-07-12 20:33:36 +02:00
Piotr Hetnarowicz
be032857f7 [HOTPLUG] Update Polish (pl-PL) translation (#8197) 2025-07-12 20:32:59 +02:00
Piotr Hetnarowicz
d0aeaab947 [TASKMGR] Update Polish (pl-PL) translation (#8188) 2025-07-12 20:30:08 +02:00
Eric Kohl
0e5df9c51c [DHCPCSVC] Fix the options request list and add the class identifier to requests 2025-07-12 18:57:28 +02:00
Whindmar Saksit
8edf4f0926 [SHELL32][NTOBJSHEX] CDefaultContextMenu cannot close keys it does not own (#8233) 2025-07-12 15:18:39 +02:00
Whindmar Saksit
3fb2905c37 [SHELL32] Don't get icon and label from AutoRun.inf on floppy drives (#7953)
CORE-9881 (partial)
2025-07-12 15:16:38 +02:00
Mas Ahmad Muhammad
a56e47fe60 [SETUP:REACTOS] Fix warning RC4206 in Indonesian (id-ID) translation (#8220)
Noticed by Katayama's comment from chat.reactos.org:

> Indonesian translation warning: base\setup\reactos\lang/id-ID(15): warning RC4206: title string too long; trunctated at 256

Fix problem by making the string length shorter, it's 245 chars now.
Addendum to 0.4.16-dev-862-g 7b5e004dd6.
2025-07-12 14:32:21 +03:00
Carl J. Bialorucki
117cd33b49 [PSDK] Sync winerror.h with wine-10.0 (#8244)
- Sync winerror.h to wine-10.0
- Fix a couple hacks that existed because we didn't do this sooner
- Fix an instance where Wine compares a pointer to S_OK to see if it's null
2025-07-11 14:12:09 -06:00
Katayama Hirofumi MZ
12fa72a06d [MSCTF] Make thread manager C++ (#8239)
Implemeting missing features...
JIRA issue: CORE-19361
- Delete threadmgr.c and add threadmgr.cpp.
- Make ITfThreadMgr implementation C++.
2025-07-11 09:35:18 +09:00
Oleg Dubinskiy
206b52833f [MMIXER] HACK: Decrease SteppingDelta for each volume value by 1
This workarounds broken changing volume level for left and right volume controls separately ("Speakers Volume" button in "Sound" tab of mmsys.cpl).
CORE-19190
2025-07-10 14:02:23 +02:00
Oleg Dubinskiy
376708b586 [MMIXER] Fix improperly working volume control
Fix broken volume level changing and left/right speakers balance level changing.
Get and set volume level value for all available output channels instead of only the 1st channel (available in MIXERCONTROLDETAILS.cChannels member), so other channels don't have a non-set volume values now. This allows to control the volume for all channels.
So now the volume control works correctly and hence, the volume level can be properly changed from Sound Properties (mmsys.cpl) and Volume Mixer (sndvol32.exe) as well.
Note that the volume level settings changed by user are not saved after reboot yet. We need to save (write) and then load (read) them at next boot from HKLM/System/CurrentControlSet/Control/DeviceClasses/KSCATEGORY_AUDIO/.../DeviceParameters/Mixer/.../* keys inside wdmaud.sys, similarly to as it's done in Windows XP/2003. It can be tested (and is tested sveral times by me and is confirmed) by using MS wdmaud.sys in ReactOS. It writes the values in that key, so the actual volume values are stored there.
Another key, HKCU/SOFTWARE/Microsoft/Windows/Applets/Volume Control/, is created and managed by sndvol32.exe instead, so it does not contain the actual values of volume levels.
CORE-17976
2025-07-10 14:02:23 +02:00
Timo Kreuzer
7e4f12743f [NTOS:PS/x64] Use KiGetTrapContext from PspGetOrSetContextKernelRoutine 2025-07-10 14:57:09 +03:00
Timo Kreuzer
61b6cd9d28 [NTOS:KE] Implement KiGetTrapContextInternal 2025-07-10 14:57:09 +03:00
Timo Kreuzer
f026550f89 [RTL] Implement RtlGetUnwindContext 2025-07-10 14:57:09 +03:00
Timo Kreuzer
98ed87b556 [RTL] Fix RtlSetUnwindContext
Only set the registers requested by ContextFlags
2025-07-10 14:57:09 +03:00
Timo Kreuzer
d23ee5f365 [PSEH] Make structures more SEH3 compatible 2025-07-10 11:15:23 +03:00
Timo Kreuzer
6d2eb03402 [COMPILER_APITEST] More SEH tests 2025-07-10 11:15:23 +03:00
Timo Kreuzer
cfb579dd67 [PSEH3] Fix unlinking of EH frames during unwind.
On Windows the function that calls the language specific exception handler function registers it's own exception handler, so the top of the exception chain does not point to our own handler. We need to take that into account when unwinding the stack and removing each handler as we go.
2025-07-10 11:15:23 +03:00
Timo Kreuzer
ff8d24cabb [PSEH3] Fix _SEH3_LEAVE
Previously, when leave was used in the except or finally block of a nested try block, it would jump back to the start of the except/finally block, resulting in an endless loop. This is fixed by jumping back to a label at the beginning of the try block, which is only visible from within the try block itself and from there to the end of the SEH block.
Fixes seh0055 testcase of MS SEH tests.
2025-07-10 11:15:23 +03:00
Justin Miller
d054f63e68 [HALACPI] Initialize HalpPicVectorRedirect with the full 0-15 array
This probably seems a little silly that I'm making a change to an array
we don't really use but because of this little bug ACPI was getting
reported as 0xA which is incorrect! As we call IoConnectInterrupt with
0x9 later. This makes sure that the IRQ from FADT is correct.
2025-07-09 20:39:48 -07:00
Katayama Hirofumi MZ
e7358c5930 [NTUSER][USER32] Fix IME UI exception (#8227)
Fix BSoD when toggling visibility of the IME status
window (IME Toolbar).
JIRA issue: CORE-20261
- Add IntGetImeUIFromWnd helper function.
- Fix exception in IntNotifyImeShowStatus function.
- Fix initialization of IME UI in ImeWndProc_common
  function.
- Delete RegisterIMEClass function.
2025-07-09 08:16:26 +09:00
Hermès Bélusca-Maïto
38d07d3a24 [WINLOGON/WLNTFYTESTS] Add semi-"interactive" tests for Winlogon notifications (#8234)
Add a `wlntfytests.dll` in `ReactOS\bin\suppl`, containing tests for Winlogon notifications.

To use it:
- Register the dll with `regsvr32 <path_to>\wlntfytests.dll` and reboot
  the machine.
- With a debugger, observe the traces emitted by the dll, whenever any
  Winlogon notification is emitted. If Winlogon debugging is enabled,
  a debug-break is made everytime a notification is invoked.
- Once testing is done, unregister the dll with `regsvr32 /u <path_to>\wlntfytests.dll`
  and reboot the machine.

For each received notification, the handlers dump the contents of the
`WLX_NOTIFICATION_INFO` structure, and verify that the notifications
are received in the correct expected order. This is done by keeping
what the previous received notification was, before comparing it with
the expected one(s) that must precede the new notification being received.

References:
- https://learn.microsoft.com/en-us/windows/win32/secauthn/creating-a-winlogon-notification-package
- https://learn.microsoft.com/en-us/windows/win32/secauthn/winlogon-notification-events
- https://rsdn.org/article/baseserv/winlogon.xml
2025-07-08 21:21:11 +02:00
Justin Miller
02343c22f6 [RTL] Partial revert of Wine timer code in thread pooling (#8229)
* [SDK] Partial Revert of 0bf42067d2

It was found that the timer code from WINE doesn't work as well as ours,
This is a revert from that part of the PR as it doesn't change any of the real threadpool code in all reality. Thanks to the investigation of Julenuri and Simone
JIRA issue: CORE-20245
2025-07-08 12:05:53 -07:00
Katayama Hirofumi MZ
3917c60749 [MSCTF] Make input processor profiles C++ (#8232)
Implementing missing features...
JIRA issue: CORE-19361
- Delete inputprocessor.c and add
  inputprocessor.cpp.
- Make ITfInputProcessorProfiles
  implementation C++.
2025-07-08 21:20:57 +09:00
Eric Kohl
8fbbb41a19 [UMPNPMGR] Fix a typo in a DPRINT line 2025-07-07 20:07:28 +02:00
Eric Kohl
9d21d48cda [UMPNPMGR] PNP_FreeLogConf: Delete a resource configuration 2025-07-07 20:05:29 +02:00
Hermès Bélusca-Maïto
9c053ec989 [ROSTESTS] Add the interactive buttonvistest to the build 2025-07-07 19:28:14 +02:00
Vitaly Orekhov
5ffc6ceb55 [PSEH] Guard SEH2 macros for Clang on Linux x64 builders (#8194)
Hackfixing a corner case detected via broken entities of wlanwiz
due to its usage of STLport. This was already done to PSEH3 prior to me.

Corner case examples:
- broken: https://github.com/SigmaTel71/reactos/actions/runs/15911239148
- "fixed": https://github.com/SigmaTel71/reactos/actions/runs/15945705635

Guard SEH2 family macros behind #ifndef. CORE-6622 CORE-6905
2025-07-07 15:24:27 +03:00
Katayama Hirofumi MZ
3e427ad17e [KBSWITCH] Fix System Pen icon visibility (#8230)
Management of System Pen icon was
inconsistent.
JIRA issue: CORE-10667
- Add g_bSysPenNotifyAdded global
  variable.
- Add checking the result of
  Shell_NotifyIcon.
- Fix UpdateLanguageDisplayCurrent
  function.
- Add WM_INPUTLANGCHANGEREQUEST
  message handling.
Testbot runs (
2025-07-07 21:04:05 +09:00
Whindmar Saksit
212a1a5c74 [SDK][SHELL32_APITEST] Fix some warnings (#7031) 2025-07-06 21:12:37 +02:00
Whindmar Saksit
c0ea1c0e9f [USER32][APITESTS] Use the correct user32 icon resource ids (#7807) 2025-07-06 15:24:25 +02:00
Whindmar Saksit
2a901a72f3 [SHELL32_APITEST] Try to close windows opened by each test (#7861) 2025-07-06 13:47:12 +02:00
Carl J. Bialorucki
a753f34e30 [PSDK][XDK][NDK][INCLUDE/WINE] Make header changes to sync crypt32, kernel32, and user32 winetests (#8114)
- [PSDK] Sync wincrypt.h to Wine 10.0, keeping our SAL annotated function definitions behind an #ifdef guard
- [XDK] Add definitions to our winnt header that Wine 10.0's winternl.h depends on.
- [INCLUDE/WINE] Sync winternl.h to Wine 10.0
- [OTHER] Fix breaking changes with the synced winternl.h.
2025-07-05 15:14:31 -06:00
Carl J. Bialorucki
a993c589ae [SHLWAPI_APITEST] Fix heap assertion and test failures (#8217)
- Properly initialize a string in SHPropertyBag test. This prevents a heap assertion failure on Vista+ when freed and connected to a debugger.
- Adjust a value against Windows 8+ instead of Vista as originally assumed in the IsQSForward test.
- Use GetVersion() to check if we are running on NT6+ and test appropriately in the PathIsUNC and PathIsUNCServer tests.
2025-07-05 15:09:23 -06:00
Whindmar Saksit
375fca5058 [SHELL32] Implement SHSimulateDropOnClsid (#8223) 2025-07-05 18:18:51 +02:00
Serge Gautherie
2c0782d1e0 [SCSIPORT] Add explicit IOCTL_ATA_PASS_THROUGH* cases (#1969)
ATA passthrough IOCTLs not supported by MS scsiport.
The implementation is optional, especially in SCSI.

IOCTL_SCSI_PASS_THROUGH will be implemented in SPTI library.

CORE-16422
2025-07-05 18:20:42 +03:00
Katayama Hirofumi MZ
6ba2363bdb [CICERO][MSCTF] ITfContext: Follow-up of #8224 (#8231)
Follow-up of #8224.
JIRA issue: CORE-19361
- Add cicIsNullPtr function in Cicero <cicbase.h>.
- Reordering of CMakeLists.txt items.
- Minor refactoring.
2025-07-05 21:05:15 +09:00
Katayama Hirofumi MZ
93181db68b [MSCTF] Make ITfContext C++ (#8224)
Implementing missing features...
JIRA issue: CORE-19361
- Delete context.c and add context.cpp.
- Make ITfContext implementation C++.
2025-07-05 20:09:00 +09:00
Carl J. Bialorucki
410db43f20 [IPHLPAPI_APITEST] Test failure fixes (#8214)
- liCreateTimestamp isn't set in TCP tables on several Windows versions. If it isn't, then we can't compare it to the current system time; so don't.
- GetInterfaceName had some test failures unique to Vista, guard them.
- icmp: Accept either ERROR_INVALID_HANDLE  or ERROR_INVALID_PARAMETER as a last error in a couple tests.
2025-07-04 19:14:24 -06:00
Serge Gautherie
ea9e2812c6 [GITHUB] build.yml: Build some more ARM/ARM64 modules (#8215)
Another extension of ARM* builds.
I "randomly" tried some directories, these succeed.

Build 4+1 more directories.
2025-07-05 01:52:46 +03:00
Serge Gautherie
b0420ca511 [HALX86] HalpSetupAcpiPhase0(): Fix ACPI version reporting (#8211)
Use the correct structure and fields.
Based on ACPI v1.0-v6.6 documentation at https://uefi.org/acpi/specs

Addendum to c21792df52 (r53831).
2025-07-05 01:48:36 +03:00
Dmitry Borisov
0462ebf0d6 [COMCTL32_APITEST] Add a testcase for product version string (#8216)
Addendum to commit b5f763447c.

- KVM x86: https://reactos.org/testman/compare.php?ids=102897,102903
- KVM x64: https://reactos.org/testman/compare.php?ids=102898,102905

comctl32:tooltipv6: 1 tests executed (0 marked as todo, 0 failures), 0 skipped.
2025-07-04 21:26:37 +03:00
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
fbd70c81c3 [SHIMGVW] Update Polish (pl-PL) translation (#8201)
Addendum to 084fae1eb4.
2025-07-04 08:48:50 +03:00
Piotr Hetnarowicz
5cbfa17321 [TASKKILL] Update Polish (pl-PL) translation (#8189)
Addendum to 97e7efc020 and 1519a676bd.
2025-07-04 08:44:40 +03:00
Carl J. Bialorucki
33336d0369 [APITESTS] Add GetNTVersion() macro for version detection on Windows 8.x+ (#8225)
Grab the NT version from KUSER_SHARED_DATA and expose it in GetNTVersion().
2025-07-03 14:51:10 -06:00
Carl J. Bialorucki
19e8fbb20e [KMTESTS] Fixes for 2003, Vista, 7, 8, 10 x86 and x64 (#8175)
Fix several kmtests in preparation for testbots with newer versions of Windows. There's still more kmtests to fix, but this fixes all the kmtests that bugchecked during my testing.
2025-07-03 14:33:59 -06:00
Justin Miller
83faff8706 [FREELDR] Hack AMD64 so it can boot in high mem (#8226)
Hack ReactOS AMD64 so we can boot on systems with higher ram amounts tested up to 128gb

JIRA report: CORE-20265
2025-07-03 12:47:34 -07:00
Timo Kreuzer
24b0857a72 [NTOS:MM] Handle failure of MmSetPageEntrySectionSegment
This prevents a crash when paged pool is low.

No, I will not fix all other instances!
2025-07-03 22:38:50 +03:00
Timo Kreuzer
2cd05a3756 [NDK] Update SYSTEM_INFORMATION_CLASS
See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/api/ntexapi/system_information_class.htm and Windows 10/11 pdb files
2025-07-03 22:21:05 +03:00
Piotr Hetnarowicz
41e7aa19d5 [CABVIEW] Update Polish (pl-PL) translation (#8196)
Addendum to 63bb46a2fd.
2025-07-03 15:36:22 +03:00
Piotr Hetnarowicz
283e351724 [INPUT] Update Polish (pl-PL) translation (#8202)
Addendum to 0eadf4a00c + 17e1cf3127 and 80c4856bba.
2025-07-03 15:10:33 +03:00
Piotr Hetnarowicz
273642a8b3 [SHDOCVW] Update Polish (pl-PL) translation (#8200)
Addendum to 960a305e5c.
2025-07-03 14:54:41 +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
Stanislav Motylkov
52e02af86b [BOOTVID] Fix build for ARM port
- Move functions from header to main source, keeping their definitions
- Fix typo DefaultPalette -> VidpDefaultPalette
- Add missing PrepareForSetPixel() function

Addendum to 5f2ca473dc and cd91271796. CORE-17617 CORE-17604
2025-07-02 22:24:46 +02:00
Katayama Hirofumi MZ
0db7879a66 [CMAKE] msvc.cmake: Add /wd4819 for Far East Asian (#8219)
"Far East Asian" Visual Studio had
generated a lot of "warning C4819:
File contains characters that
cannot be displayed in the current
code page...".

JIRA issue: N/A
2025-07-02 22:10:54 +09: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
Timo Kreuzer
00f45a4a73 [KMTEST] Remove totally broken PoolsCorruption test
It was already disabled.
2025-07-01 10:50:48 +00:00
Serge Gautherie
671935f24b [KERNEL32] _dump_context(): Fix ARM case (#8185)
Match DbgPrint() parameters.
Addendum to commit 369786f126 (r67736).
2025-06-30 14:05:12 +02: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
Timo Kreuzer
c507b701ab [CRT:MATH] Import frexp from musl 2025-06-30 09:19:47 +00:00
Timo Kreuzer
b734e3ba63 [CRT:MATH] Move some math functions from ucrt to crt 2025-06-30 09:19:47 +00:00
Timo Kreuzer
a9ee20cb9a [CRT:MATH] Import nextafter, nextafterf and nexttowardf from musl
Note: On Windows, where a long double is the same as a double, nextafterl is the same as nextafter, nexttowardl is the same as nexttoward.
Also nexttoward is the same as nextafter.
2025-06-30 09:19:47 +00:00
Timo Kreuzer
5c26ccdb29 [CRT:MATH] Import scalbn/scalbnf from musl 2025-06-30 09:19:47 +00:00
Timo Kreuzer
3f71ab80ad [CRT:MATH] Implement _isnan and _isnanf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
e01231bd49 [CRT:MATH] Implement _finite, _finitef 2025-06-30 09:19:47 +00:00
Timo Kreuzer
50028685dc [CRT:MATH] Implement _dsign and _dsignf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
0e5d6af68e [CRT:MATH] Implement x86 sse2 math functions
These are just wrappers around the normal functions and lack any optimization.
2025-06-30 09:19:47 +00:00
Timo Kreuzer
5c6912f561 [CRT][UCRTBASE] Add round/roundf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
d736b55644 [CRT:MATH] Fix a bug in _handle_error 2025-06-30 09:19:47 +00:00
Timo Kreuzer
35bc1e1d9e [CRT] Add crtmath library 2025-06-30 09:19:47 +00: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
Eric Kohl
c720dd4960 [NTOS:IO] NtPlugPlayControl.PlugPlayControlUnlockDevice is not implemented
It was probably used in previous versions of Windows NT.
2025-06-29 23:43:09 +02:00
Hermès Bélusca-Maïto
12e01218ad [SYSTEMINFO] Do some code lift-up; use Conutils lib to be able to display localized unicode strings
In particular:
- unhardcode buffer sizes and API flags;
- add our standard file header in the .c file (I haven't done it for
  the other files);
- merge systeminfo.rc and rsrc.rc together.
2025-06-29 23:03:10 +02:00
Hermès Bélusca-Maïto
dc7c7fb9f5 [SYSTEMINFO] Review translations (#8169)
- Improve help/usage display formatting for all languages.

- Fix sk-SK Slovak typos and file encoding.
  With Notepad++:
  * "Encoding->Convert to ANSI", then Save;
  * "Encoding->Character encoding->Central Europe Languages->OEM 852", then Save;
  * "Encoding->Convert to UTF-8 (without BOM)"

- Fix and finish French (fr-FR) translation.
2025-06-29 21:04:23 +02:00
Eric Kohl
b364fee806 [NTOS:IO] Implement NtPlugPlayControl.PlugPlayControlDeviceClassAssociation
The unregistration part is not implemented yet.
2025-06-29 17:34:27 +02:00
Hermès Bélusca-Maïto
92fd611209 [SYSSETUP] Improve French (fr-FR) translation (#8167) 2025-06-29 16:48:44 +02:00
Hermès Bélusca-Maïto
9cb76114c6 [NETSHELL][SAMSRV] Fix "reqired" -> "required" typo
3rd-party code (drivers/filesystems/fastfat/dirsup.c) left untouched.

Caught by Serge Gautherie.
2025-06-29 16:42:35 +02:00
Hermès Bélusca-Maïto
2a91e496ee [NETSHELL] Improve French (fr-FR) translation (#8166) 2025-06-29 16:36:53 +02: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
Katayama Hirofumi MZ
76daabf6d1 [CYLFRAC] Fix build; Japanese (ja-JP) translation
Fix mistake in:
4ac1aacc17

CORE-18706
2025-06-29 22:06:05 +09:00
Katayama Hirofumi MZ
3120d985ff [VCDCONTROLTOOL] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 22:02:00 +09:00
Oleg Dubinskiy
63ca8c414e [NTOS:EX] Implement NtSetSystemInformation().SystemLoadGdiDriverInSystemSpaceInformation (#8180)
Implement SystemLoadGdiDriverInSystemSpaceInformation case of NtSetSystemInformation() function.
According to https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/gdi_driver.htm, it does the similar thing to SystemLoadGdiDriverInformation (these two cases even have the same shared SYSTEM_GDI_DRIVER_INFORMATION structure).
The only difference is, SystemLoadGdiDriverInSystemSpaceInformation uses the global system space (without passing an additional flag to MmLoadSystemImage()), while SystemLoadGdiDriverInformation uses the session space instead.
Since the session space is not supported yet, for now simply redirect SystemLoadGdiDriverInSystemSpaceInformation to SystemLoadGdiDriverInformation case, which we have already implemented. However, this code needs to be updated appropriately (an additional flag should be passed to MmLoadSystemImage() call for SystemGdiDriverInformation as well) once a support for session space is implemented.
This fixes VM starting failure for VirtualBox 3.1.0 - 4.0.24 and 4.3.0 - 4.3.12 versions. Newer versions of VirtualBox still don't work because of another blocking bugs.
CORE-20257
2025-06-29 15:00:41 +02:00
Katayama Hirofumi MZ
056bfd312e [SYSTEMINFO] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:53:24 +09:00
Katayama Hirofumi MZ
30dad221ed [STARFIELD] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:38:29 +09:00
Katayama Hirofumi MZ
0fc26352d8 [SSSTARS] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:36:14 +09:00
Katayama Hirofumi MZ
672fc60b5a [MAZESCR] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:31:10 +09:00
Katayama Hirofumi MZ
bc79a9a2cf [MATRIX] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:23:41 +09:00
Katayama Hirofumi MZ
4ac1aacc17 [CYLFRAC] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:17:48 +09:00
Katayama Hirofumi MZ
4642da06e1 [CIRCLES] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:15:11 +09:00
Katayama Hirofumi MZ
046679ddf3 [BUTTERFLIES] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:12:01 +09:00
Katayama Hirofumi MZ
5cd0ec8575 [BLANKSCR] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 21:05:33 +09:00
Katayama Hirofumi MZ
8c2a6aae31 [VGAFONTEDIT] Add Japanese (ja-JP) translation
CORE-18706
2025-06-29 20:59:33 +09:00
Timo Kreuzer
5549fbd6a4 [NTDLL_APITEST] Remove unused / broken definitions 2025-06-29 09:31:14 +00:00
Hervé Poussineau
7b9ef6b390 [NDIS] NdisOpenFile: close file locally, as we don't need it later
Remove now unused field FileHandle in NDIS_HANDLE_OBJECT structure.
2025-06-29 08:23:33 +02:00
Hervé Poussineau
e2904d3baf [NDIS] NdisOpenFile: read file contents into buffer when opening it
NdisMapFile now returns a non-null buffer.

CORE-20259
2025-06-29 08:23:33 +02:00
Hervé Poussineau
d72bcb149f [NDIS] NdisOpenFile: retrieve and return file length in *FileLength
CORE-20259
2025-06-29 08:23:32 +02:00
Hervé Poussineau
07f305cd59 [NDIS] NdisOpenFile: use local variables instead of using output variables 2025-06-29 08:23:32 +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
Whindmar Saksit
c14a14e3b4 [BROWSEUI] Find files must compare the entire path when the view asks about the name (#8174)
CORE-20256
2025-06-26 23:02:04 +02:00
Whindmar Saksit
4562306ce4 [BROWSEUI] Find files must forward IItemNameLimits to the FS folder (#8176) 2025-06-26 23:00:53 +02:00
Eric Kohl
4afb871782 [UMPNPMGR] Implement PNP_UnregisterDeviceClassAssociation 2025-06-26 22:13:59 +02:00
Katayama Hirofumi MZ
f7c36c6d94 [SHELL32_APITEST] Certainly close newly-opened windows (#8171)
It's frustrating when windows open
during a test and remain after the test
is over.
JIRA issue: ROSTESTS-402
- Delete closewnd.cpp. Enhance
  closewnd.h.
- Modify ShellExecCmdLine,
  ShellExec_RunDLL, ShellExecuteEx,
  and ShellExecuteW testcases.
- Certainly close the newly-opened
  windows.
2025-06-26 18:20:49 +09:00
Eric Kohl
f1332c7722 [UMPNPMGR] Implement PNP_RegisterDeviceClassAssociation 2025-06-25 21:39:51 +02:00
Serge Gautherie
4164b8a053 [NTUSER] menu.c: Tiny optimizations (#8111)
A bit clearer code. A bit faster execution.
- NtUserGetTitleBarInfo(): Add/Use early returns.
  Addendum to
3b4c9ded42 (r33657).
- NtUserTrackPopupMenuEx():
  Check flags a bit earlier.
  Addendum to
3c35117f97
  (0.4.16-dev-1275).
- NtUserThunkedMenuItemInfo():
  Sort out code and comments
- menu.c: Move UserLeave() a bit earlier.
2025-06-25 21:15:28 +09:00
Katayama Hirofumi MZ
aaed9f77d9 [SHELL32_APITEST] Enhance SHAppBarMessage testcase (#8149)
SHAppBarMessage testcase has to
cover the auto-hide feature. Make the
testcase more stable.
JIRA issue: CORE-7237
Add more tests.
2025-06-25 08:48:30 +09: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
Piotr Hetnarowicz
a889320d42 [SYSSETUP] Update Polish (pl-PL) translation (#8159)
Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
2025-06-24 16:59:07 +02:00
Piotr Hetnarowicz
60cdfaa11f [SHELL32] Update Polish (pl-PL) translation (#8158) 2025-06-24 16:58:02 +02:00
Piotr Hetnarowicz
6d2267d243 [SYSDM] Update Polish (pl-PL) translation (#8157) 2025-06-24 16:57:20 +02:00
Petr Akhlamov
e5613026c4 [SYSDM][SHELL32] Update Russian (ru-RU) translation (#8147)
Added russian strings to system properties about effects and virtual memory.

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2025-06-24 16:56:55 +02:00
Hermès Bélusca-Maïto
28f733a9a4 [UNITTESTS][PATHCCH] Add unit compilation-tests for the pathcch library (#8085)
CORE-12686

Test the following compilation scenarii:
- using the `pathcch_static` library (function implementations
  statically linked into the test);
- using the `pathcch_kernelbase` library (linking directly to
  kernelbase.dll);
- using the `pathcch` MS PSDK-compatible library (linking to
  the api-ms-win-core-path-l1-1-0.dll APISET dll).
2025-06-24 16:48:04 +02:00
Hermès Bélusca-Maïto
db96138813 [SDK][KERNELBASE][PATHCCH] Compile a collection of PathCch libraries (#8085)
CORE-12686

This collection of libraries consist in:

- a down-level `pathcch_static` PathCch library, to be used for programs
  that need to run on Windows 7 and below;

- Windows 8+ compatible libraries importing from either kernelbase.dll
  (`pathcch_kernelbase`), or from the corresponding APISET
  api-ms-win-core-path-l1-1-0.dll (`pathcch`, which is Win8+ PSDK
  compatible).

The down-level static library is compiled by reusing the newly-introduced
kernelbase's path.c, instead of using a specific pathcch.c.
Unrelated functions are excluded from compilation by putting them into
`#ifndef STATIC_PATHCCH ..... #endif` blocks.
2025-06-24 16:48:03 +02:00
Hermès Bélusca-Maïto
8ed6ec437b [SDK] Move pathcch.h to the PSDK (#8085)
CORE-12686
2025-06-24 16:47:56 +02:00
Whindmar Saksit
81931d1ac0 [SHELL32] Use the folder column, not the list column during DefView sorting (#8162)
IShellFolder::CompareIDs does not understand ListView columns, we must provide it with a column index it understands during sorting.

CORE-20251
2025-06-24 15:46:48 +02:00
Whindmar Saksit
c25856d1c0 [BROWSEUI] Fix CompareIDs lParam passed to inner folder (#8161)
CORE-20250
2025-06-24 15:45:43 +02:00
Timo Kreuzer
1378f6b543 [CMAKE] Fix ARM64 build
Since VS 17.14.36203.30 / MSVC 19.44.35209.0 the default behavior on ARM64 is to not inline _Interlocked* functions. Until we have those implemented, we disable this feature, going back to the old behavior.
For additional details / tracking of the implementation see CORE-20255
2025-06-24 12:45:51 +00:00
Daniel Victor
6ed46baf49 [FREELDR] Improve disk detection (#8074)
Improve disk detection on UEFI by using PublicBootHandle index

JIRA issue: CORE-11954
2025-06-23 16:03:05 -07:00
Timo Kreuzer
6243d16945 [CRT_APITEST] Add tests for _isnan(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
b3dff9df15 [CRT_APITEST] Add tests for _finite(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
39e534bddc [CRT_APITEST] Add a tests for tan(f) / __libm_sse2_tan(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
85e2f6b26c [CRT_APITEST] Add tests for sqrt(f) / _libm_sqrt_precise 2025-06-23 17:35:21 +00:00
Timo Kreuzer
7360d0abe7 [CRT_APITEST] Add a tests for sin(f) / __libm_sse2_sin(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
90f10847f7 [CRT_APITEST] Add a tests for log10(f) / __libm_sse2_log10(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
8235099f4d [CRT_APITEST] Add a tests for log(f) / __libm_sse2_log(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
9ee1847379 [CRT_APITEST] Add a tests for exp(f) / __libm_sse2_exp(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
c4a2dbd1b0 [CRT_APITEST] Add a tests for cos(f) / __libm_sse2_cos(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
1536f521d6 [CRT_APITEST] Add a tests for atan(f) / __libm_sse2_atan(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
8b1a8d5b67 [CRT_APITEST] Add a tests for asin(f) / __libm_sse2_asin(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
bf225ab7da [CRT_APITEST] Add a tests for acos(f) / __libm_sse2_acos(f) 2025-06-23 17:35:21 +00:00
Timo Kreuzer
3b895a3c12 [CRT_APITEST] Add a python tool to generate test tables for math functions
Note: The code contains a custom implementation of ldexp in python, because on Windows (below Win 11) ldexp is broken and rounds denormals incorrectly. ldexp is used by mpmath to convert multi-precision to float, which led to incorrect floating point results (specifically denormals).
2025-06-23 17:35:21 +00:00
Timo Kreuzer
a42b3c36e4 [UCRTBASE_APITEST] Add tests for round/roundf 2025-06-23 17:35:21 +00:00
Timo Kreuzer
43546cb5c2 [UCRTBASE_APITEST] Add ucrtbase_apitest
First test is ceil.
2025-06-23 17:35:21 +00: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
d4d04c83db [NDK] Add PLUGPLAY_CONTROL_CLASS_ASSOCIATION_DATA type 2025-06-22 21:59:23 +02:00
Timo Kreuzer
c36d8c9271 [WIN32K] Fix a possible NULL pointer dereference in co_IntGetScrollBarInfo
The following code in user32_winetest scroll.c was causing it:

    ret = EnableScrollBar( mainwnd, SB_CTL, ESB_ENABLE_BOTH );
    ok( !ret, "EnableScrollBar should fail.\n" );
2025-06-22 17:35:15 +00:00
Whindmar Saksit
6a28201e3d [SDK] Add some shell defines from an old NT4 SDK (#8156) 2025-06-22 19:21:30 +02:00
Whindmar Saksit
38ad1ca394 [SHELL32][BROWSEUI] Make externally available FCIDM WM_COMMANDs work correctly (#8150) 2025-06-22 19:20:12 +02:00
Timo Kreuzer
02ad6b17ed [KERNEL32_VISTA] Implement GetFinalPathNameByHandleW
Note: The wine implementation is broken (it relies on broken behavior of NtQueryObject) and cannot be used.
2025-06-22 13:01:07 +00:00
Timo Kreuzer
36183cfc51 [KERNEL32_APITEST] Add tests for GetFinalPathNameByHandleW 2025-06-22 13:01:07 +00:00
Timo Kreuzer
007c9521ca [NTDLL_APITEST] Add another test for NtQueryObject
This shows that wine's implementation is broken, which wine's GetFinalPathNameByHandle relies on.
2025-06-22 13:01:07 +00:00
Timo Kreuzer
220e18d065 [PSDK] Fix up lmshare.h 2025-06-22 13:01:07 +00: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
Katayama Hirofumi MZ
b199e9d05f [SHLWAPI][SDK][BOOTDATA] Implement SHGetAppCompatFlags (#8137)
Compatibility is a key that the system
works well.
JIRA issue: CORE-19278
- Add appcompat.c.
- Implement SHGetAppCompatFlags
  function.
- Add Str_SetPtrA prototype to
  <commctrl.h>.
- Add SHACF_... flags to
  <shlwapi_undoc.h>.
- Add comctl32 delay import
  (for Str_SetPtrA).
- Modify boot/bootdata/hivesft.inf
  for registry key
  HRESULTKLM\SOFTWARE\Microsoft\
  Windows\CurrentVersion\
  ShellCompatibility\Applications.
2025-06-22 09:52:37 +09:00
Timo Kreuzer
1a11aa059f [NTOS:MM] Fix section related test failures
Fixes all failures, except pointer counts.
2025-06-21 18:19:01 +00:00
Timo Kreuzer
736015f36f [NTOS:MM] Fix a bad cast 2025-06-21 18:19:01 +00:00
Timo Kreuzer
e9ab780527 [NTOS:MM] Fix some unimplemented cases of NtQuerySection 2025-06-21 18:19:01 +00:00
Whindmar Saksit
e307cad501 [UXTHEME] Implement SetSystemVisualStyle (#7864)
Implement SetSystemVisualStyle based on function and flags found at https://stackoverflow.com/a/1036903 and 
https://pinvoke.net/default.aspx/uxtheme.SetSystemVisualStyle
2025-06-21 18:56:48 +02:00
Whindmar Saksit
99b99bda0f [BROWSEUI][SHELL32] Fixed FindFiles rename operation (#8151)
DefView will now map its internal (FCIDM) commands (when sent from the toolbar and accelerators) to canonical verb strings so clients outside shell32 can detect the verb. This is critical for "rename" and handy for "properties".

CORE-18326
2025-06-21 16:52:48 +02:00
Timo Kreuzer
6653bb5224 [NTOS:KE] Detect CPU support for XSAVE, AVX, AVX2 and AVX512 2025-06-21 07:55:06 +00:00
Timo Kreuzer
294eb31cfd [NTOS:KE/x64] Handle extended processor state on context switch 2025-06-21 07:55:06 +00:00
Timo Kreuzer
d6874fe7b9 [NTOS:KE/x64] Implement KiSave/RestoreXState 2025-06-21 07:55:06 +00:00
Timo Kreuzer
410cf69b0c [NTOS:KE/x64] Handle XState allocation on the stack 2025-06-21 07:55:06 +00:00
Timo Kreuzer
72fbbdf854 [NTOS:KE/x64] Implement KiInitializeXStateConfiguration 2025-06-21 07:55:06 +00:00
Timo Kreuzer
f4fd842be1 [NTOS:KE/X64] Move initialization of keFeatureBits 2025-06-21 07:55:06 +00:00
Timo Kreuzer
55b3e641ef [SDK] immintrin.h: add (f)xsave/restore intrinsics 2025-06-21 07:55:06 +00:00
Timo Kreuzer
26fae132d6 [UMKM_APITEST] Add test for XSTATE configuration 2025-06-21 07:55:06 +00:00
Timo Kreuzer
0f2f124c3a [XDK][NDK] Add XSTATE hacks 2025-06-21 07:55:06 +00:00
Timo Kreuzer
e029a98c22 [SDK] Fix some CPUID structures 2025-06-21 07:55:06 +00:00
Timo Kreuzer
0e2788de4a [SDK] Add CPUID_EXTENDED_STATE_SIZE_OFFSET_REGS 2025-06-21 07:55:06 +00:00
Timo Kreuzer
9ea129b8a9 [XDK][NDK] Avoid code duplication by generating more definitions for winnt.h 2025-06-21 07:55:06 +00:00
Timo Kreuzer
8d2d9b803a [NDK][XDK] Fix XSTATE_CONFIGURATION a bit 2025-06-21 07:55:06 +00:00
Timo Kreuzer
84c205bd06 [UMKM_APITEST] Add test for extended state saving 2025-06-21 07:55:06 +00:00
Eric Kohl
d8bfa93f21 [DEVMGR] Fix reading the device resource lists
For each device we must first try to read its AllocConfig resource list. If its AllocConfig resource list is not available, try to read its BootConfig resource list.
2025-06-20 20:50:18 +02:00
Justin Miller
8aab5a9b24 [ACPI_NEW] Minimal to build
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Dmitry Borisov <di.sean@protonmail.com>
2025-06-19 20:32:11 -07:00
Daniil Tatianin
156fead517 [ACPI_NEW] Import uACPI 2.1.1 2025-06-19 20:32:11 -07:00
Eric Kohl
15e69dbf34 [DEVMGR] Fix the device manager
- Revert changes to the wine debug macros.
- Enable grayed the Resource By Type menu items.
2025-06-19 23:08:25 +02:00
Eric Kohl
87d2179956 [DEVMGR] Implement the Resources By Type view
TODO:
- Add resource type icon
- Fix the context menu
2025-06-19 22:32:28 +02:00
Whindmar Saksit
59e556f3f3 [SHELL32] Implement DragDropHandlers shell extension context menus (#8143)
CORE-11240 CORE-11238
2025-06-19 20:54:28 +02:00
Timo Kreuzer
06414ac85a [KERNEL32_VISTA] Implement IsValidLocaleName 2025-06-19 17:36:40 +00:00
Timo Kreuzer
a8987adb67 [KERNEL32_VISTA] Move GetLocaleInfoEx from locale.c into a separate file
This allows to have it in kernel32_vista
2025-06-19 17:36:40 +00:00
Timo Kreuzer
c37310b4e0 [KERNEL32_APITEST] Add tests for GetLocaleInfoEx 2025-06-19 17:36:40 +00:00
Timo Kreuzer
5225c75d3b [KERNEL32_VISTA] Move EnumSystemLocalesEx from locale.c into a separate file
This allows to have it in kernel32_vista
2025-06-19 17:36:40 +00:00
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
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
d809cd0f7f [BOOTDATA][NTUSER] Add DontLoadCTFIME and use it (#8110)
Improve CTF IME customization.
Use the proper names for CTF IME.
JIRA issue: CORE-19268
- In the registry key "HKLM\SOFTWARE\Microsoft\
  Windows NT\CurrentVersion\IMM", add
  DontLoadCTFIME value and set it to 1.
- Delete LoadCTFIME value to avoid user
  confusing.
- Rename UserIsCiceroEnabled function
  as UserIsCTFIMEEnabled.
- Rename SRVINFO_CICERO_ENABLED
  flag as SRVINFO_CTFIME_ENABLED.
2025-06-12 13:55:49 +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
3c35117f97 [NTUSER][USER32_APITEST] TrackPopupMenuEx: Check flags (#8094)
Validate flags.
JIRA issue: CORE-3247
- In NtUserTrackPopupMenuEx function, validate the flags.
- If validation failed, then set last error and return FALSE.
- Add SAL annotations to NtUserTrackPopupMenuEx.
- Keep reference to menu in the function.
- Add TrackPopupMenuEx testcase to user32_apitest.
2025-06-10 21:25:14 +09:00
Katayama Hirofumi MZ
4cf350a716 [IMM32] Use ANSI_NULL and UNICODE_NULL (#8109)
Coding style fix.
JIRA issue: CORE-19268
- Use ANSI_NULL for '\0'.
- Use UNICODE_NULL for L'\0'.
2025-06-10 20:45:23 +09: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
Mikhail Tyukin
b6925bdd6f [RICHED20] Sync to Wine-10.0 (#8078)
[RICHED20] Sync to Wine-10.0
Sync wine/rbtree.h to Wine-10.0 as changes in riched20 require this. Also added a define to allow directx code to compile.
Sync riched20 to Wine-10.0 and its tests using the script.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 9f72c5601173728c52626342a1ec6c9a4c70670f by Francois Gouget <fgouget@free.fr>

Update WINESYNC.txt

Update precomp.h

fix build

[WINESYNC]: riched20 is now in sync with wine-staging wine-10.0

[WINESYNC] riched20: Only call ME_SendRequestResize when control is in-place active.

Prevent GetClientRect from being called when not in-place active.

wine commit id e61db557ab8473a490c84301dbb4b4665b6c9c9f by Charlotte Pabst <cpabst@codeweavers.com>

[WINESYNC] riched20: Exit from editor_ensure_visible when control is not in-place active.

According to microsoft documentation, ScrollWindowEx, SetScrollPos and SetScrollRange may only
be called while the control is in-place active.

This fixes a segmentation fault in an application.

wine commit id dafaadcb4addd9af334433666a4bc2e7aa6eb9ff by Charlotte Pabst <cpabst@codeweavers.com>

[WINESYNC] riched20/tests: Test that ScrollWindowEx and GetClientRect are only called when control is in-place active.

wine commit id f1301cedbea51be107017bb8545956bcfd02b610 by Charlotte Pabst <cpabst@codeweavers.com>

Update editor.c

[WINESYNC] riched20: Release IME input context when done using it.

wine commit id 3f51fb96c162e8d3314627b3db25564fa7d9d419 by Zhiyi Zhang <zzhang@codeweavers.com>

[WINESYNC] riched20: In para_set_fmt protect against out of bound cTabStop values.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56730

wine commit id 7b2ff977739df25252d46552d2447af50c23040e by Fabian Maurer <dark.shadow4@web.de>

Update editor.c

[WINESYNC] riched20: Don't write past end of buffer.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>

wine commit id 5cbe3a6cb186cffed20e3fea5f88abd0880d3914 by Eric Pouech <epouech@codeweavers.com>

[WINESYNC] riched20: Don't crash when no OLE obj is present.

This was generating a lot of crashes in riched20 tests.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>

wine commit id 015aae30cf2217164f631d1c03abfc9ea63bb43d by Eric Pouech <epouech@codeweavers.com>

Update editor.c

[WINESYNC] riched20: Use CRT allocation functions.

wine commit id 42579f1dcd2f14e765e2f53ceb5b46fff5623f10 by Alex Henrie <alexhenrie24@gmail.com>

[WINESYNC] riched20/tests: Make the editor paste test failures more informative and unique.

Knowing the content of the edit field is more useful than knowing the
strcmp() result. The text field may contain carriage returns and
linefeeds so use wine_dbgstr_a() so they are clearly visible in the
failure message.
Also prefix the ok messages with a unique string to indicate which
test_WM_PASTE() test failed.

wine commit id b8950d04e439f649f2167477a36ee453ad8b81ef by Francois Gouget <fgouget@codeweavers.com>

[WINESYNC] riched20: Don't call wrap_marked_paras_dc() before the editor is fully initialized.

Today, CreateTextServices() sometimes triggers an assertion failure in
select_style().

When ME_MakeEditor() calls ME_MakeFirstParagraph(), the editor
(ME_TextEditor) is not in a fully initialized state.  For example, the
font cache (pFontCache) is not fully initialized, which sometimes makes
select_style() believe that the cache slots are fully occupied.

Fix this by delaying the call to wrap_marked_paras_dc() until the editor
is fully initialized.

Also, delay the call to ITextHost::TxReleaseDC() until after
wrap_marked_paras_dc(), since we need the device context a bit longer.

Fixes: b70eb32c5f3e506181d9e1e9fbef62e9baf3674d

wine commit id 548d7179e3b2b9961321a4df50644c9b3874a295 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Factor out device context acquisition from ME_MakeFirstParagraph.

This lets ME_MakeEditor() reuse the device context throughout the editor
initialization process.

wine commit id 03036f42e1afa9c79246dcee6b9fe876286b1aa4 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Don't call ME_UpdateRepaint inside set_selection().

This partially reverts c5daf6a30f21 (riched20: Call ME_UpdateRepaint
instead of editor_ensure_visible in set_selection.)

Fixes: c5daf6a30f21acd20263692b278acba49e014cc1

wine commit id ac5110131493b8b05795e8825285e41ca40ab6f1 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Add tests for change notifications caused by EM_SETSEL{,EX}.

wine commit id c35926e49825f7a3d48ba826085fe1ae3d2a7e27 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Wrap marked paragraphs at Text Services initialization.

Today, CreateTextServices() returns an Rich Edit object without row
start and end marks, which are expected to exist by many Rich Edit
operations as well as EM_* message handlers.

This leads to a crash when certain messages (e.g., EM_SCROLLCARET) are
sent to the Rich Edit object via ITextServices::TxSendMessage(), unless
ME_WrapMarkedParagraphs() has been called beforehand.

Fix this by calling wrap_marked_paras_dc() early in the initialization
process.

This is not a problem for windowed Rich Edit controls, which already
calls ME_WrapMarkedParagraphs() before the user or application starts
interacting with it.

wine commit id b70eb32c5f3e506181d9e1e9fbef62e9baf3674d by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Use nameless unions/structs.

wine commit id 26826d3af8b1969de389f3d6702d7c8b805126e1 by Alexandre Julliard <julliard@winehq.org>

Update editor.h

[WINESYNC] riched20: Remove DECLSPEC_HIDDEN usage.

wine commit id c04ab166498b5841ecde620a9bd0b74969b01596 by Alistair Leslie-Hughes <leslie_alistair@hotmail.com>

[WINESYNC] riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.

To prevent cases where ME_WrapMarkedParagraphs has not been called causing a NULL
pointer when editor_ensure_visible tries to get the row from the cursor.

wine commit id c5daf6a30f21acd20263692b278acba49e014cc1 by Santino Mazza <smazza@codeweavers.com>

[WINESYNC] riched20: Update paragraph position in marked tree.

nCharOfs is the key for paragraphs added to the marked tree
If it is updated, re-add the entry to update its position

wine commit id f1aa3f37ef326b7cbf8fc94e982c9f0b398181c4 by Daniel Lehman <dlehman25@gmail.com>

Update editor.c

[WINESYNC] riched20: Update the editor IME position on GCS_RESULTSTR.

So that a GCS_RESULTSTR followed by GCS_COMPSTR, without interruping the
composition, begins inserting the new composition text after the result
instead of before it.

wine commit id de45bc33a73eac5dbc3502b4a43cd48399507c73 by Rémi Bernon <rbernon@codeweavers.com>

[WINESYNC] riched20/tests: Fix a typo in a comment.

wine commit id 145e3c758b9594596835e291b2fcb3c80e4c0479 by Francois Gouget <fgouget@free.fr>

[WINESYNC] riched20/tests: Don't specify DT_WORDBREAK in _check_txgetnaturalsize().

Today, test_TxGetNaturalSize() creates a pop-up window with a fixed size
(extent) of 100 x 100.  The test function then proceeds to compute the
natural size of rich edit control that fits the sample text
"TestSomeText" and compare it to the RECT calculated by DrawText.

Apparently, this test fails if the width of the sample text
"TestSomeText" exceeds the width of the test window's client area.  In
this case, DrawText() with DT_WORDBREAK breaks the text into the two
lines due to text wrapping; however, Rich Edit's
ITextServices::TxGetNaturalSize implementation does not seem to perform
text wrapping on overflow.  This results in extent mismatch.

(Note that the test may either succeed or fail depending on the current
font used for DEFAULT_GUI_FONT, which defaults to Tahoma according to
Microsoft's documentation.  To reproduce this failure, it may be
necessary to switch fonts or change the width of the pop-up window.)

Fix this by omitting the DT_WORDBREAK flag for the DrawText() call in
_check_txgetnaturalsize().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54637

wine commit id f54a1dac64c89aea3fe02ae8c0d6eef43a0aa117 by Jinoh Kang <jinoh.kang.kr@gmail.com>

Update editstr.h

[WINESYNC] riched20: Implement ITextDocument::Freeze and ITextDocument::Unfreeze.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54617

wine commit id 3fe15349d39ccf31026a92eae30f83f65c91cb1f by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Don't assume that TxDraw preserves the device context's brush selection.

Today, RichEditWndProc_common assumes that ITextServices::TxDraw
preserves the brush selection of the given device context.  However,
this invariant may be broken by misbehaving embedded OLE objects in the
text document.

Fix this by not assuming that the return value of the second
SelectObject() call equals the brush passed to the first SelectObject()
call in RichEditWndProc_common's WM_PAINT / WM_PRINTCLIENT case.

wine commit id 2027be7e0370c92595f126a0b0dd167a635d50a2 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Test for ITextDocument::Freeze and ITextDocument::Unfreeze.

wine commit id 3105fad82b9bae390fcd710a2fc10a18988b4622 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Don't set para unless committing cursor move in ME_MoveCursorWords.

Introduce a temporary variable, `other_para`, so that we don't end up
returning incorrect para (with stale run) inside the output cursor.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54564

wine commit id 7e28fa5c558f1417f8f033cb843424778bbfb8b8 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Test for word movement across paragraph boundary.

wine commit id 21d25b17c2cae8eb2d2376ce42b76e3f61eb0bba by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Fix the EM_GETSELTEXT tests in Hindi on Windows.

On Windows EM_GETSELTEXT fails with an invalid parameter error in the
Hindi locale but works in most other locales, including UTF-8 ones.
So check for this issue and adjust the expected results accordingly.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54559
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54565

wine commit id 37cd13abdf5d91c7b3f25b39fa14976bc3a3e3a3 by Francois Gouget <fgouget@codeweavers.com>

[WINESYNC] riched20/tests: EM_GETSELTEXT's wparam is not used and should be 0.

wine commit id baa41970647a7e548701a72bea2e4aa2a61ca27e by Francois Gouget <fgouget@codeweavers.com>

[WINESYNC] riched20/tests: Add context to the EM_FORMATRANGE tests.

wine commit id 020145248371bbfd2e473e79ba873e8313dde72d by Francois Gouget <fgouget@codeweavers.com>

[WINESYNC] riched20/tests: Check clipboard content after destroying the editor window.

Destroying the editor window should render all the formats so they are
still available after.

wine commit id b5b5b0b365639b889a0240d4992e16174b428f75 by Francois Gouget <fgouget@codeweavers.com>

[WINESYNC] riched20/tests: Add retry loop around OpenClipboard() to avoid access denial.

Reusing existing helper from user32 & comctl32.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47888
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>

wine commit id 25743d46f4103c7345c955b87b4134a065fb5f1d by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20/tests: Ensure clipboard has been pasted before testing the result.

The patch does reduce error failures locally.

For the record:
- WM_PASTE in undo operations haven't been transformed (as it requires
  UNDO stack manipulation in a coherent way across platforms)

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47888
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>

wine commit id 4fd5252f635817b431673accaba718c7481f48f6 by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20: Support SFF_SELECTION when streaming in plain text.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>

wine commit id 1b7a918bd7ec8bc2c51bcb76525b56b17c5ff0c0 by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20/tests: Add tests when pasting in plain text mode.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>

wine commit id 82fa1048b5cc7d9c6a2a289403f25adbdd8158c7 by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20: Obtain the composition start index after deleting selection.

Today, the Rich Edit control handles the WM_IME_STARTCOMPOSITION message
by the computing the composition start position (imeStartIndex) _before_
calling ME_DeleteSelection(), which shifts the character positions after
the range of deletion.  If the selection were not empty, imeStartIndex
immediately becomes stale, since it does not take into account the
number of deleted characters before it.

Fix this by computing imeStartIndex after the ME_DeleteSelection() call.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54318

wine commit id 8c43577f0f9b4422d3641457c595c3998bd54a18 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Call GlobalReAlloc with GMEM_MOVEABLE flag.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53474

wine commit id dfd44bb979ee2052eceff094083147e9879fa807 by Rémi Bernon <rbernon@codeweavers.com>

[WINESYNC] riched20: Fix failing test in UTF8 locales.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52875
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>

wine commit id 5902cfd2990261189ce9af27981a95ac12fa2a5d by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20: Don't emit EN_CHANGE events during window creation.

wine commit id 5c997de8dc1e4885266fa884a2fb74f840e3bedc by Evan Tang <etang@codeweavers.com>

[WINESYNC] riched20: Add test for EN_CHANGE events during window creation.

GenoPro isn't very happy if it receives one

wine commit id 0b069106b0e0f141d6925d3e10166be89fc59145 by Evan Tang <etang@codeweavers.com>

[WINESYNC] riched20: Move test class creation to a helper function.

wine commit id f9083961ed187777d660796f7136addc04fff8b0 by Evan Tang <etang@codeweavers.com>

[WINESYNC] riched20/tests: Use ARRAY_SIZE instead of open coding it.

wine commit id 90b6288f54afdc4430dac146779a92b89f4d1219 by Michael Stefaniuc <mstefani@winehq.org>

[WINESYNC] riched20/test: Add scrolling test for richole.

Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>

wine commit id 059c70d736baa164a1b246e949acd006cf83ab5a by Santino Mazza <mazzasantino1206@gmail.com>

[WINESYNC] riched20: Ensure that cursor is visible when selecting text.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40444
Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>

wine commit id 25209c162fc209124b369abbad55d915d31909b2 by Santino Mazza <mazzasantino1206@gmail.com>

[WINESYNC] riched20/tests: When selection is out of view, the scrollbar should move.

Signed-off-by: Santino Mazza <mazzasantino1206@gmail.com>

wine commit id ee131e9eba7dad090f0baf4a73fab2d62dc73b52 by Santino Mazza <mazzasantino1206@gmail.com>

[WINESYNC] riched20: Remove duplicate code.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>

wine commit id 3588479e1a674e5f43f1acb9e7c0aa8cecf98f25 by David Kahurani <k.kahurani@gmail.com>

[WINESYNC] riched20: Implement ITextDocument::Undo and ITextDocument::Redo.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53289
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id ded8227774570a1ea320dc34f2de0033f85b3ce7 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Add undo control state variable to ME_TextEditor.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id 40c54854e61d8adfca21e2fa9260712e4f5453e9 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Factor out undo-ignored status check.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id 0cd86e010e41eebdc1a4c142f9cc6a4948554d0e by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Ensure MEPF_COMPLEX is unset when in password input mode.

Otherwise, Wine may crash while attempting to fetch the script shaping
information, which does not exist since shape_para() was not called.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53335
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id f77f12ba3b1dad9ebdcb116c66b137e9103a0d1b by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Test for ITextDocument::Undo and ITextDocument::Redo.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id 73284ea18891a152dce989ffff59e2c527f94c73 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Commit and wrap paragraphs after changing text properties.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53170
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id 0974f047b57357252ec94bea119e5291250a446c by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Draw OLE objects with IViewObject implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52752
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id ecc607c6da96a5c2e8988f3021e98b442fe24c12 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Fetch extent from object if REOBJECT::sizel is unset.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id 164897e6c94d3eee4798f82a730472a5a847f9b2 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Add tests for drawing embedded OLE objects.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>

wine commit id a7d29d1625f7e02df4fbf59ef4e4a999d39edde0 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Fix the spelling of a comment.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f9fa5f9e523b45766f715c6981c6a6ab5f183157 by Francois Gouget <fgouget@free.fr>

[WINESYNC] riched20: Implement callback to IRichEditOleCallback_QueryInsertObject.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 10667b39aad6710668f60c1ba8f10e50aeb87242 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20/tests: Add tests for IRichEditOleCallback_QueryInsertObject.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 95b4072cc774ba7a7eabb0d4c114b933b7d71105 by Jinoh Kang <jinoh.kang.kr@gmail.com>

Update richole.c

[WINESYNC] riched20: Set REOBJECT's cp correctly in IRichEditOle::GetObject.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52705
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 194ba06c403fd72fbfb95048385c9ca4838af169 by Jinoh Kang <jinoh.kang.kr@gmail.com>

[WINESYNC] riched20: Add back-reference to outer ME_Run from struct re_object.

Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 05796c4e2a4acb91e6035c536b4d0e1f7e16896d by Jinoh Kang <jinoh.kang.kr@gmail.com>

fix

[WINESYNC] riched20/tests: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 9e90cecdc603d79c6332a03884ed8d4851ef2e88 by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20/tests: Use correct integral type.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8b66db027d4112bfd4287b03d5c7b6f33994adc3 by Eric Pouech <eric.pouech@gmail.com>

fix build, sync rbtree.h

[WINESYNC] riched20: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 42d0e56643740a0eac5913a9f176e789457cb475 by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20/tests: Add a test to see what richedit class flavours should be available.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id d54a0e2bea4548bb5d9c0cca9f918d7c46591e23 by Dmitry Timoshkov <dmitry@baikal.ru>

[WINESYNC] riched20: Use correct integral type.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 63a643f7f42ecd0c2625a5f5704b5b9647349e7b by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] riched20/tests: Avoid "misleading indentation" warnings.

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 2d6fad7bda2f2e21a871f405a6b0c3e70ebf6a6a by Fabian Maurer <dark.shadow4@web.de>

[WINESYNC] include: Remove the wine_ prefix on rbtree functions.

Add defines for frequently-used functions.

For compatibility with vkd3d.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 3527230c461b6baba9c29e69b575ada85bdbbc43 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] riched20: Defer releasing the host if inside a notify callback.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51521
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8138159f20d6453443861570689e0f14018051da by Huw Davies <huw@codeweavers.com>

[WINESYNC] riched20: Return the nearest char pos if the coords are outside the format rect.

For the two tests that remain todo_wine, the results differ between
riched20 and msftedit, with Wine's implementation matching msftedit.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52041
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 363508454d5f8f1fc5916bda47e6429756b7dc8f by Huw Davies <huw@codeweavers.com>

[WINESYNC] riched20: Check font_cache in select_style() too.

Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 177f808aa86e5442be1a0a92ddccc4904bf2e743 by Serge Gautherie <winehq-git_serge_180711@gautherie.fr>

[WINESYNC] riched20: Use the standard va_list instead of __ms_va_list.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 5b15bf33255bd373cbf26ec373d16a8234ec6b1c by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] riched20: Use regular allocation helpers for text services objects.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 2064c206c0b67edb8524f572166b974ba9cbd6fe by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] riched20: Remove New() allocation macro.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 1d5c9defb19fca6cfb1107384fc2325d391726d6 by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] riched20: Don't create custom heap.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8bff437e9d5e047e689d8b32f62995785c0cd48e by Dmitry Timoshkov <dmitry@baikal.ru>

[WINESYNC] riched20/tests: Don't cast NULL.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b701c3df99fbd6d4df7eaa11327bb11db95d8676 by Michael Stefaniuc <mstefani@winehq.org>

[WINESYNC] riched20/tests: Add more tests for testing EM_GETTEXTEX with OLE objects.

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 40988d6c3886d0f7a914c45ea68264bfc8540859 by Jactry Zeng <jzeng@codeweavers.com>

Update richole.c

[WINESYNC] riched20: Allow to insert OLE object at specified offset.

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8c894382dde5b9da88b0e9f23a753d5e851a43d6 by Jactry Zeng <jzeng@codeweavers.com>

Update richole.c

[WINESYNC] riched20/tests: Lock hGlobal before use.

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id f9c8c95856ded333be35ff41ab40a246bfe345b6 by Jactry Zeng <jzeng@codeweavers.com>

Co-authored-by: winesync <ros-dev@reactos.org>
2025-06-08 15:05:27 -07:00
Whindmar Saksit
c7a7376545 [SHELL32] Implement basic SHMultiFileProperties (#7956)
CORE-12510 CORE-20217
2025-06-08 20:04:10 +02:00
Eric Kohl
bec50f65f4 [ACPI] Report a docking device to the system 2025-06-08 16:47:45 +02:00
Serge Gautherie
076f08cb3e [SYSSETUP] WriteUserLocale(): Fix Locale[] length and value (#8090)
'Locale' format is "0000nnnn".

CORE-15848
2025-06-08 16:05:22 +02: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
92ff994cc2 [SDK][USER32_APITEST] Update <msgdump.h> (#8099)
JIRA issue: N/A
- Replace MSGDUMP_TPRINTF with
  MSGDUMP_PRINTF and use ANSI for
  strings. Now, we can use printf-
  compatible function for dump.
- Fix some mistakes.
- Adapt user32_apitest
  MessageStateAnalyzer to these
  changes.
2025-06-08 14:10:22 +09:00
Katayama Hirofumi MZ
87f4b28b99 [NTUSER][FORMATTING] NtUserTrackPopupMenuEx: Just formatting
for #8094. CORE-3247
2025-06-08 07:48:41 +09:00
Timo Kreuzer
c129b6d921 [COMPILER_APITEST] Disable some tests for GCC
We cannot fix these, since GCC inlines the conversion.
2025-06-07 15:53:51 +00:00
Whindmar Saksit
4b87ae3dca [SHLEXTDBG] Added more SEI flags (#8091) 2025-06-07 16:54:29 +02:00
Katayama Hirofumi MZ
901af6a681 [SENDMAIL] Add 'override' keywords
to CDeskLinkDropHandler. CORE-19469
2025-06-07 11:24:40 +09:00
Katayama Hirofumi MZ
99ddf459e0 [MYDOCS] Add 'override' keywords
to CMyDocsDropHandler.
JIRA issue: CORE-19469
2025-06-07 11:22:06 +09: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
2335229c32 [USER32][IMM32][SDK] Support WM_IME_SYSTEM.0x1D (#8088)
Splitted from #8080. The message
handling of WM_IME_SYSTEM.0x1D
is needed for IME menu handling.
JIRA issue: CORE-20142
- Define IMS_IMEMENUITEMSELECTED
  (0x1D) in <immdev.h>.
- Add WM_IME_SYSTEM.0x1D handling
  in ImeWnd_OnImeSystem function.
- Rename and extend
  User32GetImmFileName function as
  User32GetSystemFilePath, with
  adding a filename parameter.
2025-06-07 06:51:46 +09:00
Katayama Hirofumi MZ
5b4d1dbd4b [NTUSER] IntTrackPopupMenuEx: Check TPMPARAMS.cbSize (#8092)
Validate structure size.
JIRA issue: CORE-3247
- In IntTrackPopupMenuEx function,
  if lpTpm was non-NULL, then
  validate lpTpm->cbSize.
- If validation failed, then set last
  error and return FALSE.
2025-06-06 22:37:27 +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
Stanislav Motylkov
21d02b8266 [KMTESTS] Allocate buffer for the test list dynamically
Fixes broken test list output.
Addendum to 7c3a119d6d. CORE-20078
2025-06-04 22:04:03 +02: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
Serge Gautherie
dfe30e58c0 [ROSAPPS:SYSUTILS] Remove remnant config.h (#8075)
- `REACTOS_NO_SECURITY_SS`
Added on 9ef17ea (r475), without being used.
Not currently used either.

- `FMIFS_IMPORT_DLL`
Now lives in the 2 /base programs which use it.
Addendum to (probably earlier than) 9723b5e (r70868) and dc17af9 (r70916).
2025-06-04 16:25:35 +02:00
Hermès Bélusca-Maïto
273b4c8702 [WIN32SS:NTUSER] Minor code cleanup in hotkey code (#8084)
- Remove duplicated code in NtUserRegisterHotKey() and in
  NtUserUnregisterHotKey() by directly calling UserRegisterHotKey()
  and UserUnregisterHotKey() after the usual user-validation steps.

- In UserRegisterHotKey(), ignore hotkeys with virtual key VK_PACKET
  since this is not a real keyboard input, but is instead used in
  conjunction with unicode characters to simulate keystrokes for
  non-keyboard input methods.

- s/StartDebugHotKeys/SetDebugHotKeys/

- Remove duplicate code between NtUserCallMsgFilter() and IntCallMsgFilter().
2025-06-04 14:26:34 +02:00
Dmitry Borisov
7c3a119d6d [KMTESTS:HAL] Add a test for string I/O intrinsic functions
CORE-20078
2025-06-04 10:52:34 +03:00
Dmitry Borisov
4a3a446ba7 [KMTESTS] Add the ability to detect a virtual machine
This allows the tests to interact directly with hardware
CORE-20078
2025-06-04 10:52:34 +03:00
Katayama Hirofumi MZ
18290a7b6b [KBSWITCH] Follow-up of #8039
JIRA issue: CORE-18546
2025-06-04 15:13:15 +09:00
Katayama Hirofumi MZ
7d8d8a6e52 [USER32_APITEST] Add MenuUI testcase (#8066)
Verifying menu behavior.
JIRA issue: CORE-5065
JIRA issue: CORE-10829
JIRA issue: CORE-11756
- Add user32_apitest_menuui sub
  program for MenuUI testcase.
- Add MenuUI testcase.
2025-06-04 05:56:01 +09:00
Katayama Hirofumi MZ
67a4cf93be [NTUSER] ime.c: Add SAL2 annotations and tracing (#8070)
Refactoring and improving trace.
JIRA issue: CORE-19455
- Add SAL2 annotations to
  function parameters.
- Add and improve tracing
  (TRACE and ERR) for easier
  debugging.
2025-06-04 05:47:54 +09:00
Carl J. Bialorucki
0947a64a90 [GDI32_APITEST] Fix test on all versions of Windows at certain vertical resolutions (#8048)
* Use MulDiv to generate the result and negate that instead of dividing by a negative number, which can cause test failures.
2025-06-03 14:08:03 -06: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
Hervé Poussineau
343d1d4873 [DXDIAG] Add a GUID field to DXDIAG_DISPLAY, and give it to DirectDrawCreate
Currently, this GUID is always NULL.
2025-06-03 21:34:56 +02:00
Hervé Poussineau
6f47c884d5 [DXDIAG] Add a structure to contain all data related to one display
Also change user pointer of display page to be the PDXDIAG_DISPLAY structure.
2025-06-03 21:34:56 +02:00
Whindmar Saksit
4f7736a088 [SHELL32] Implement single-click mode in DefView (#8054) 2025-06-03 20:39:38 +02:00
Daniel Victor
22d077f9f1 [FREELDR] Make the NTFS filename comparison conforming to NTLDR/BOOTMGR (#8021)
When an NTFS partition is created with Windows and modified with Linux
(see below), the NTLDR/BOOTMGR will compare the file names ignoring the
case of the files, while FreeLdr does not and the same hack is on Btrfs
file name comparison.

This PR is necessary because the case of the file names on registry, etc.
may not always be consistent!

How to reproduce:
- Try to install Windows with NTFS and install FreeLdr on it;
- Try to modify Windows partition on Linux like creating/copying some new files;
- Try to boot with FreeLdr (it will fail if the hive file path case is different
  than the actual file path);
- Try to boot with NTLDR/BOOTMGR (it will work finally reaching the desktop).
2025-06-03 16:47:15 +02:00
Katayama Hirofumi MZ
2ab01e7302 [SHELL32_APITEST] Add shell32_apitest_sub dependency (#8077)
Improve shell32_apitest build.
JIRA issue: N/A
Add dependency to shell32_apitest_sub.
2025-06-03 23:22:06 +09:00
Katayama Hirofumi MZ
d80fdbe146 [IMM32][SDK] Refactor IMM32 and fix annotations (#8071)
Fix annotations' mistakes. Improve debug output.
JIRA issue: CORE-19268
- Fix some SAL annotations.
- Use debugstr_a and debugstr_w for tracing
  strings.
- Add static to some functions.
- Remove APIENTRY of some functions.
- Fix code formatting.
2025-06-03 11:09:36 +09:00
Katayama Hirofumi MZ
2fd0af4f8f [EXPLORER] AppBar Part 3 (#7966)
Follow-up of #7946.
JIRA issue: CORE-7237
- Implement ABM_GETSTATE,
 ABM_GETTASKBARPOS, ABM_ACTIVATE,
  ABM_WINDOWPOSCHANGED,
  ABM_GETAUTOHIDEBAR,
  ABM_SETAUTOHIDEBAR, and
  ABM_SETSTATE appbar messages.
- Implement TWM_SETZORDER tray
  message.
2025-06-03 06:59:30 +09:00
Katayama Hirofumi MZ
2543e2179c [USER32] Alt+Tab: Don't switch to IME-related window (#8061)
The application switcher (Alt+Tab) shouldn't switch to IME-related (CS_IME) windows.
JIRA issue: CORE-19268
2025-06-03 06:53:51 +09:00
Serge Gautherie
1395e7ecc4 [FORMAT] Usage(): Remove redundant LoadFMIFSEntryPoints() call (#8072)
`wmain()` already handles this. Addendum to commit 9cea0fddde (r24253).

CORE-20218
2025-06-02 22:30:47 +02:00
Serge Gautherie
9fd4378def [BOOTDATA] hivesys.inf: Sort 5 NLS languages and locales (#8068)
- Remove '0414' redundant NLS Language. Addendum to 532d977 (r27709).
- Remove '0401' redundant NLS Language. Addendum to 3a88ebc (r63713).
- Sort '0845', '0c04' and '1004' NLS Locales

CORE-16766
2025-06-02 22:27:10 +02:00
Andrei-Valentin Miloiu
bb282448c6 [MSUTB] Add Romanian (ro-RO) translation (#7923) 2025-06-02 22:18:04 +02:00
Andrei-Valentin Miloiu
81edd1f9b4 [NETSHELL] Update Romanian (ro-RO) translation (#7973) 2025-06-02 21:43:33 +02:00
Andrei-Valentin Miloiu
6a154167cf [REGEDIT] Update Romanian (ro-RO) translation (#7948) 2025-06-02 21:43:12 +02:00
Gabriele Lo Re
9d8b342e60 [BASE] Add and improve Italian (it-IT) translation (#7893) 2025-06-02 21:40:46 +02:00
Hervé Poussineau
d09c3d0af8 [COMCTL32] Pass WM_SYSCOLORCHANGE/WM_DISPLAYCHANGE/WM_WININICHANGE to property pages
Property pages may want to react on such events, like 'Font' or 'Layout' pages
in console.dll

CORE-13212
2025-06-02 21:23:30 +02:00
Carl J. Bialorucki
dd896f6f44 [DNSAPI_APITEST] Fix dnsapi:DnsQuery on Server 2003 x86, 8.1 x86, 8.1 x64, 10 x86, 10 x64 (#8043)
* Windows Server 2003 x86 may return a DNS_ERROR_RCODE_NAME_ERROR in some tests where other versions of Windows may return ERROR_INVALID_NAME, ERROR_TIMEOUT, or DNS_ERROR_INVALID_NAME_CHAR. Pass this behavior.

* Windows 8+ sets the query to a null pointer when given an invalid query pointer while earlier Windows versions don't change the query pointer. Pass either behavior.
2025-06-02 12:15:45 -06:00
Daniel Victor
bad53bf847 [FREELDR] Fix UEFI boot after FreeLoader split (#8069)
Add missing initialization of the module list and boot devices.
This makes UEFI boot work again after #7488 merge.

CORE-11954
2025-06-02 13:42:49 +03:00
Justin Miller
9fe829874b [KERNELBASE][KERNEL32] Import KernelBase from WINE-10.0 (#8049)
* [KERNELBASE] Import KernelBase from wine-10.0
* [KERNELBASE] Create some cmake files and add stuff into headers
2025-06-01 23:13:41 -07:00
Katayama Hirofumi MZ
1286711ac4 [SDK][CICERO] Replace msctf_undoc.h with msctf_undoc.idl (#8060)
Follow-up of #8057. Generally, the IDL
file is a higher level than the header file.
JIRA issue: CORE-19361
- Modify CMakeLists.txt.
- Add sdk/include/reactos/CMakeLists.txt.
- Add reactos_idls CMake target in
- sdk/include/reactos/CMakeLists.txt
  to process IDL files.
- Add reactos_idls dependency to cicero.
- Delete msctf_undoc.h and add
  msctf_undoc.idl.
2025-06-02 06:53:42 +09:00
Katayama Hirofumi MZ
52ca35327e [MSCTF] Make ITfLangBarMgr C++ (#8056)
Implementing missing features...
JIRA issue: CORE-19361
- Delete langbarmgr.c (C) and add
  langbarmgr.cpp (C++).
- Remove the legacy C
  implementation of ITfLangBarMgr.
- Add CLangBarMgr class.
2025-06-02 05:07:49 +09:00
Whindmar Saksit
ddcd5f7083 [SHELL32] Don't assert on broken ShellExecuteEx error reporting (#8065) 2025-06-01 06:49:38 +02:00
Katayama Hirofumi MZ
54840389ee [NETSHELL] Update Japanese (ja-JP) translation
CORE-18706
2025-06-01 11:36:06 +09:00
Justin Miller
45eff312cb [SDK][XDK][PSDK] Grab header changes needed for Wine-10.0 KernelBase (#8047)
* [SDK] Update ThreadInfoClass to wine-10.0

* [SDK][MODULES] Fix a test and add wine-10 entries to headers

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-05-31 17:20:02 -07:00
Eric Kohl
babe6046e5 [DHCPCSVC] Fix exception on service restart
CORE-14390
2025-05-31 16:16:34 +02:00
Timo Kreuzer
87b8c1ee2f [NTDLL_APITEST] Fix build 2025-05-31 13:14:31 +00:00
Katayama Hirofumi MZ
51495b1b75 [KBSWITCH] Refactor on layout numbers (#8052)
We believe the power of simplicity.
JIRA issue: CORE-20142
- Rename g_nCurrentLayoutNum as
  g_iKL for simplicity.
- Make g_iKL zero-based indexing.
- Add ID_LANG_BASE id for language
  menu items and adjust
  ID_EXIT/ID_PREFERENCES values.
- Fix KbSwitch_OnNotifyIconMsg
  function.
2025-05-31 21:17:41 +09:00
Eric Kohl
c187cf8b9e [SERVICES] Add check for valid control codes to RI_ScSendPnPMessage 2025-05-31 14:07:18 +02:00
Timo Kreuzer
001d0051e9 [CRT_APITEST] Fix test failures on Win 2003 x64 2025-05-31 09:57:32 +00:00
Timo Kreuzer
e431470ff9 [REACTOS] Fix build with VS 17.14.2 / CL 19.44.35207.1 2025-05-31 09:51:33 +00:00
Whindmar Saksit
d663eb4466 [SHELL32][CMD][SHLWAPI] Use the openas verb when invoking unknown file types (#7981)
CORE-20184
2025-05-30 18:46:24 +02:00
Katayama Hirofumi MZ
6dd8e04438 [KBSWITCH] Delete vDbgPrintExWithPrefix and link ntdll (#8050)
Reverts 57981ed and later changes.
JIRA issue: N/A
2025-05-30 22:44:16 +09:00
Katayama Hirofumi MZ
e43e639c30 [CICERO] Move sdk/lib/cicero to base/ctf/cicero (#8055)
The CTF modules depend on Cicero
static library. Cicero should be a
component in CTF.
This move will improve code
readability and grep-ability.
JIRA issue: CORE-19361
JIRA issue: CORE-19363
- Move sdk/lib/cicero to base/ctf/cicero.
- Adapt CMakeLists.txt to this move.
- No code content change except
  CMakeLists.txt.
2025-05-30 22:17:09 +09:00
Katayama Hirofumi MZ
543cf1e2fd [SDK] Add ITfRangeAnchor interface to <msctf_undoc.h> (#8057)
This interface is needed for msctf.dll.
JIRA issue: CORE-19361
- Add ITfRangeAnchor interface
  (based on current msctf
  implementation) to
  <msctf_undoc.h>.
2025-05-30 22:15:47 +09:00
Serge Gautherie
bc03c010b3 [WIN32K:DIB] USE_DIBLIB: Use new DIB_16BPP_AlphaBlend() (#4568)
* [WIN32K:DIB] Fix 'DIB_16BPP_AlphaBlend' copypasta in a DPRINT()

Addendum to 684c3d3 (r49275).

* [WIN32K:DIB] USE_DIBLIB: Use new DIB_16BPP_AlphaBlend()

Addendum to 7540c2e (r64953).
2025-05-28 22:06:41 -05:00
Hervé Poussineau
72dcb3a11f [WIN32SS:ENG] Initialize pdo variable before using it 2025-05-28 23:37:28 +02:00
Hervé Poussineau
9f21cc3e98 [WIN32SS:ENG] Do not allocate 0 bytes if no monitor is reported
Addendum to 2f00ca4663
2025-05-28 18:26:23 +02:00
Hervé Poussineau
4534537036 [WIN32SS:USER] Remove useless assignations of pdo variable
Addendum to 30a7d19d84
2025-05-28 18:26:23 +02:00
Katayama Hirofumi MZ
9853f1de67 [KBSWITCH] Make message handlers functions (#8044)
Simplify window procedure management.
JIRA issue: CORE-20142
- Make message handling codes some
  functions (KbSwitch_On...).
2025-05-28 21:45:30 +09:00
Katayama Hirofumi MZ
b4e471c87d [IMM32][SDK] Add install.c and move some code (#8032)
Splitting IME installation code for code readability.
JIRA issue: CORE-19268
- Add win32ss/user/imm32/install.c.
- Move some code to install.c.
- Add SAL annotations. Use debugstr_a/_w macro.
- Modify <imm32_undoc.h>.
- Don't CharUpperW for IME pathname due to
  security reason.
2025-05-28 16:08:51 +09:00
Carl J. Bialorucki
b627a42898 [APPSHIM_APITEST] Fix test for x86 Vista and 7 (#8042)
On x86 builds, accept the sentinel hmodule instead of the 111 hmodule and 0 hmodule for Vista and 7.
2025-05-27 16:11:42 -06:00
Eric Kohl
7015c76c63 [ADVAPI32] Do not call the classic service handler function with an event control code 2025-05-27 23:37:19 +02:00
Katayama Hirofumi MZ
d4c64771cd [CTFMON][MSCTF][MSCTFIME][MSUTB] Move CTF modules to base/ctf (#8040)
This PR reorganizes the location of
the CTF-related modules to improve
grep-ability, understanding, and
readability. New folder base/ctf will
become incomplete Cicero, CTF or
TSF (Text Services Framework).
JIRA issue: CORE-19360
JIRA issue: CORE-19361
JIRA issue: CORE-19363
- Move ctfmon, msctf, msctfime,
  and msutb modules to new
  directory base/ctf.
- Adapt CMakeLists.txt to this move.
- Modify .github/labeler.yml and
  media/doc/WINESYNC.txt.
- No code content changes except
  CMakeLists.txt, .github/labeler.yml,
  and media/doc/WINESYNC.txt.
2025-05-28 05:04:03 +09:00
Hermès Bélusca-Maïto
2a0d98c2bc [DOSKEY][USETUP][KERNEL32][NTVDM][CONSRV][REGEXPL] Fix build (#8019)
Fix build after the move and update of private console API
definitions to wincon_undoc.h
2025-05-27 20:52:20 +02:00
Hermès Bélusca-Maïto
412fe7d9ac [SDK] Improve wincon.h and add wincon_undoc.h (#8019)
- Add missing WINBASEAPI modifiers.
- Update/add missing SAL annotations.
- Add missing function argument names.
- Only keep public definitions there.
- Move private/undocumented ones in a new wincon_undoc.h

This header is based on the following resources:
- https://undoc.airesoft.co.uk/kernel32.dll/
- https://github.com/microsoft/terminal/blob/main/dep/Console/ntcon.h
- https://github.com/microsoft/terminal/blob/main/dep/Console/winconp.h
  (commit f08321a0b2)
2025-05-27 20:52:19 +02:00
Hermès Bélusca-Maïto
228156e79f [SDK][SHELL] Sort out SEE_MASK_* and CMIC_MASK_* defines (#8019)
- Add missing versioning defines for the different SEE_MASK_*
  and CMIC_MASK_* defines.
- Move the five undocumented SEE_MASK_* defines into reactos/undocshell.h
2025-05-27 20:52:19 +02:00
Hermès Bélusca-Maïto
07ab1cc82d [SDK] winuser.h: Add missing Vista+ WinEvent defines (#8019) 2025-05-27 20:52:18 +02:00
Hermès Bélusca-Maïto
6696d40cfc [SDK] Introduce winbase_undoc.h for undocumented exported kernel32 definitions (#8019)
This header is based on the following files from the official
Windows 10.0.10240.0 PSDK, a copy of which can be found at:
- https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/minwin/winbasep.h
- https://github.com/tpn/winsdk-10/blob/master/Include/10.0.10240.0/um/minwin/wbasek.h
2025-05-27 20:52:17 +02:00
Hermès Bélusca-Maïto
4fce13e06b [SDK] winbase.h: Add missing WINADVAPI define (#8019) 2025-05-27 20:52:16 +02:00
Hermès Bélusca-Maïto
2c5bba3c48 [SDK] sdkddkver.h: Add NTDDI_* defines for newest Windows 11 versions (#8019)
And add version descriptions, from https://github.com/MiroKaku/Veil
and cross-checked with BetaWiki ones.
2025-05-27 20:52:15 +02:00
Hermès Bélusca-Maïto
14877a7ec6 [CODEOWNERS] Sort out entries for "Win32 Subsystem" 2025-05-27 20:52:14 +02:00
Hervé Poussineau
30a7d19d84 [WIN32SS:USER] Rework UserEnumDisplayDevices to correctly report monitors
desk.cpl now returns the correct monitor name.
2025-05-27 20:34:37 +02:00
Hervé Poussineau
29b5003455 [VIDEOPRT] Implement IOCTL_VIDEO_ENUM_MONITOR_PDO 2025-05-27 20:34:37 +02:00
Hervé Poussineau
2f00ca4663 [WIN32SS:ENG] Retrieve and store list of associated monitors for each video adapter device 2025-05-27 20:34:37 +02:00
Katayama Hirofumi MZ
17577d2581 [IMM32][SDK] Support ImmIMPQueryIMEA/W and ImmIMPSetIMEA/W (#8033)
Implementing missing features...
These functions are given for IME
program handling.
JIRA issue: CORE-19268
- Implement ImmIMPQueryIMEA
  and ImmIMPQueryIMEW functions.
- Implement ImmIMPSetIMEA and
  ImmIMPSetIMEW functions.
- Add prototypes to <imm32_undoc.h>.
2025-05-27 20:10:25 +09:00
Katayama Hirofumi MZ
3df71d678d [KBSWITCH] Make Alt+Shift working Part 1 (#8039)
Recently language switching (Alt+Shift)
was not working. This PR will fix
Alt+Shift (partially).
JIRA issue: CORE-18546
- Add WH_KEYBOARD_LL hook to
  detect Alt+Shift.
- Add delay to the action after language
  change.
- Increase g_SpecialIds not to be full.
- Delete useless ID_NEXTLAYOUT
  command.
2025-05-27 20:09:03 +09:00
Whindmar Saksit
c03d7794b8 [SHELL32_APITEST] Fixed SimpleIDListFromPath and SHGetFileInfo tests on NT5 (#8038) 2025-05-27 00:10:53 +02:00
Johannes Anderwald
4bdbb3092c [POWERCFG] Add Batteries page
Missing things are:
- "Show details for each battery" doesn't work
- Data are not updated on timer (you need to reopen the window)

Global battery doesn't work, but that's a ntoskrnl bug (CORE-19452)
2025-05-26 21:45:55 +02:00
Hervé Poussineau
f4992a4484 [RTL] Fix prototypes of RtlCreateUserSecurityObject and RtlCreateAndSetSD 2025-05-26 21:29:30 +02:00
Katayama Hirofumi MZ
5af1d7c6b1 [MSCTF][SDK][CTFMON][MSCTFIME][MSUTB] Add msctf.dll stubs (#8026)
Some baby steps to msctf.dll for CTF.
JIRA issue: CORE-19361
- Add all the export functions of msctf.dll.
- Modify msctf.spec.
- Modify sdk/include/psdk/msctf.idl
  and sdk/include/psdk/inputscope.idl.
- Add sdk/include/reactos/msctf_undoc.h.
- Include <msctf_undoc.h> in ctfmon,
  msctfime, and msutb.
2025-05-26 07:22:41 +09:00
Eric Kohl
99e2606982 [DC21x4][ne2000][netkvm][nvnet][pcnet][rtl8139] Implement OID_GEN_PHYSICAL_MEDIUM
CORE-20206
2025-05-25 23:48:38 +02:00
Katayama Hirofumi MZ
3194e0556f [MSCTF] Implement CheckAnchorStore function (#8025)
Implementing missing features...
JIRA issue: CORE-19361
2025-05-26 06:40:22 +09:00
Hervé Poussineau
0743ceefa2 [WIN32SS:ENG] Fix check to enable panning driver
If ldevtype is not LDEV_DEVICE_DISPLAY, pdm is really a PMDEVOBJ structure.
So, we must not read the dmFields value.
2025-05-25 20:24:00 +02:00
Eric Kohl
c699471994 [AUDIOSRV] Register and unregister device notifications 2025-05-25 17:15:23 +02:00
Eric Kohl
16e620d647 [ADVAPI32] Pass PnP data to services on SERVICE_CONTROL_DEVICEEVENT
Services can now receive PnP events.
2025-05-25 14:34:25 +02:00
Katayama Hirofumi MZ
55b6f3455c [CTFMON] Include <ime/indicml.h> and use INDICATOR_CLASS
CORE-19362
2025-05-25 19:48:17 +09:00
Katayama Hirofumi MZ
8a913baed8 [CONSRV] Improve Japanese (ja-JP) translation
CORE-18706
2025-05-25 19:36:12 +09:00
Eric Kohl
a6bdcbc007 [SERVICES] Refactor ScmControlService(Ex) and implement RI_ScSendPnPMessage 2025-05-25 10:34:13 +02:00
Katayama Hirofumi MZ
64fda67763 [KBSWITCH] s/ARRAYSIZE/_countof/
Use standard-ish macro.
CORE-18546
2025-05-25 08:27:13 +09:00
Doug Lyons
284f15be02 [USP10] Fix notepad without word-wrap 'select all' (#8016)
CORE-20176 & CORE-20177
2025-05-24 18:06:35 -05:00
Whindmar Saksit
6bd0ffc494 [SHELL32_APITEST] Fix control panel printers PIDL test (#8022) 2025-05-24 22:08:54 +02:00
Katayama Hirofumi MZ
57981ed025 [KBSWITCH] Unlink ntdll and add vDbgPrintExWithPrefix
CORE-18546
2025-05-24 23:23:22 +09:00
Katayama Hirofumi MZ
2041f3c7a1 [IMM32][GITHUB] Move dll/win32/imm32 to win32ss/user/imm32 (#8024)
imm32 and win32ss have common
interface. This move will improve
grep-ability.
JIRA issue: N/A
- Move dll/win32/imm32 to
  win32ss/user/imm32.
- Adapt CMakeLists.txt to this move.
- No code content change except
  CMakeLists.txt and .github\labeler.yml.
2025-05-24 13:44:47 +09:00
Whindmar Saksit
5299f047e4 [NTUSER][PSDK] Implement Snap DockMoving setting (#8020)
SPI_SETDOCKMOVING allows you to turn off window snapping when moving a window with the mouse. The Win keys can still snap unless you turn everything off with SPI_SETWINARRANGING.
2025-05-23 13:45:25 +02:00
Timo Kreuzer
e326b06983 [KMTEST] Improve MmSection test 2025-05-22 18:39:14 +00:00
Timo Kreuzer
08b6106aac [NTDLL_APITEST] Improve test for NtQuerySection 2025-05-22 18:39:14 +00:00
Timo Kreuzer
f920d349e0 [APITESTS] Improve ok_* macros to avoid format warnings 2025-05-22 18:39:14 +00:00
Timo Kreuzer
4cb4eee23a [E1000] Implement OID_GEN_PHYSICAL_MEDIUM 2025-05-22 18:37:55 +00:00
Katayama Hirofumi MZ
99064a58d9 [KBSWITCH] Enable Wine debug (#8010)
Debug easy and develop easy.
JIRA issue: CORE-18546
- Include <wine/debug.h>.
- Import ntdll and link to wine.
- Enable Wine debug.
2025-05-22 20:08:36 +09:00
Timo Kreuzer
40721f49ba [CRT_APITEST] Reorganize tests
- Move build files and testlist.c into individual modules folder
2025-05-21 14:29:29 +00:00
Timo Kreuzer
99d9e764a2 [CRT_APITEST] Fix GCC format warnings 2025-05-21 14:29:29 +00:00
Katayama Hirofumi MZ
ec5b1422bc [IMM32][SDK] Implement ImmIMPGetIMEA/W (#8011)
Implementing missing features...
JIRA issue: CORE-19268
- Add dll/win32/imm32/imepro.c.
- Move some utils.c code into imepro.c.
- Implement ImmIMPGetIMEA and
  ImmIMPGetIMEW functions there.
- Add prototypes into <imm32_undoc.h>.
- Delete needless code.
2025-05-21 07:16:39 +09:00
Timo Kreuzer
06034b258a [XDK] Some GCC/wine compatibility fixes 2025-05-20 18:13:16 +00:00
Timo Kreuzer
8369c55edb [WINE] wine/asm.h: add missing __ASM_DEFINE_IMPORT 2025-05-20 18:13:16 +00:00
Timo Kreuzer
0453ed98df [WINE] Improve wine/exception.h 2025-05-20 18:13:16 +00:00
Timo Kreuzer
876bba3d07 [PSDK] Add threadpoolapiset.h 2025-05-20 18:13:16 +00:00
Timo Kreuzer
ada4584cb6 [PSDK] make winnt.h compile with rtlsupportapi.h 2025-05-20 18:13:16 +00:00
Timo Kreuzer
61ff0eb940 [PSDK] Import rtlsupportapi.h from wine-10.0 2025-05-20 18:13:16 +00:00
Timo Kreuzer
2f30fda4f9 [VCRUNTIME] emmintrin.h: don expect _STATIC_ASSERT to be defined
Legacy headers, like the Wine msvcrt headers, do not define _STATIC_ASSERT
2025-05-20 18:13:16 +00:00
Timo Kreuzer
eff677ca98 [PSDK] winnls.h: add missing LOCALE_ALLOW_NEUTRAL_NAMES 2025-05-20 18:13:16 +00:00
Timo Kreuzer
95caf762d4 [XDK] Add missing _InlineInterlockedAdd 2025-05-20 18:13:16 +00:00
Timo Kreuzer
281855e88c [KMTEST] Fix MmSection tests 2025-05-20 16:30:06 +00:00
Whindmar Saksit
937954cf6c [BROWSEUI][SHELL32][SHLWAPI][BOOTDATA] Implement and use IRegTreeOptions (#7255) 2025-05-20 16:59:02 +02:00
Eric Kohl
3842b59f75 [TCPIP] Retrieve the interface medium type from NDIS
Send OID_GEN_PHYSICAL_MEDIUM and OID_GEN_MEDIA_SUPPORTED query requests to NDIS.

This will enable us to distinguish wired and wireless ethernet adapters.
2025-05-20 00:47:26 +02:00
Katayama Hirofumi MZ
c876fe350d [IMM32][NTUSER] Strictly check Cicero IME (#8009)
This PR enhances Cicero IME support.
JIRA issue: CORE-19268
- Add null checks for the functions
  of Cicero IMEs in Imm32LoadIME
  function.
- Add and use
  IS_CICERO_COMPAT_DISABLED
  macro in win32ss/include/ntuser.h.
- Fix ImmGetImeInfoEx,
  Imm32LoadImeDpi,
  ImmGetDescriptionA,
  ImmGetDescriptionW,
  ImmGetIMEFileNameA,
  ImmGetIMEFileNameW, and
  ImmGetProperty functions for
  Cicero IME support.
- Set last error in NtUserGetImeInfoEx.
2025-05-20 07:34:46 +09:00
Katayama Hirofumi MZ
7ce90a0399 [IMM32] NotifyIME: Improve debug trace (#8005)
JIRA issue: CORE-19455
- Add some traces for NotifyIME calls.
- Improve Imm32MakeIMENotify trace.
- Make some parameter types of
  Imm32MakeIMENotify function
  DWORD's.
- Fix and improve ERR_PRINTF macro.
2025-05-20 07:30:46 +09:00
Hervé Poussineau
eff61af6df [IPHLPAPI] Call tcpip.sys driver to get IP/TCP/UDP statistics
CORE-19596
2025-05-19 21:07:58 +02:00
Hervé Poussineau
7cc36bd42f [PSDK] Add TCP_MIB_STAT_ID/UDP_MIB_STAT_ID 2025-05-19 21:07:58 +02:00
Eric Kohl
c477928b0e [HIDCLASS] Override hid device capabilities
- Disable the Removable capability
- Enable the SilentInstall and SurpriseRemovalOK capabilities

This keeps the remove device icon from showing in the notification area whenever you plug in a mouse or a keyboard.
2025-05-19 00:29:10 +02:00
Katayama Hirofumi MZ
5d40ec3e8c [IMM32] ImeGetImeMenuItems is optional (#8008)
Supporting old IMEs.
JIRA issue: CORE-19268
Do null check of ImeGetImeMenuItems
function of IME side, in
ImmGetImeMenuItemsAW function.
2025-05-19 06:09:48 +09:00
Timo Kreuzer
eb9c664d7e [KERNEL32_APITEST] Revert manifest architecture changes
While the previous change didn't have any effect on ReactOS, it made the test crash on Windows 2003.
2025-05-18 17:53:12 +00:00
Timo Kreuzer
6b222fb084 [SHELL32_APITEST] Comment out OpenAs_RunDLL test
This test hangs on Windows 2003 and breaks testing on Windows 2003 x64.
2025-05-18 11:54:26 +00:00
Katayama Hirofumi MZ
8029339c49 [IMM32] Fix ImmLocalAlloc usage (#8007)
JIRA issue: CORE-19268
- Replaces LPTR with 0 in two calls
  to ImmLocalAlloc within imemenu.c
  (No need to zero-fill).
2025-05-17 06:35:17 +09:00
Katayama Hirofumi MZ
9e1f2b035f [NTUSER][USER32] Rewrite GetAncestor (#7978)
JIRA issue: N/A
- Set the last error.
- Check message window.
- Modify user32.spec.
2025-05-16 19:41:01 +09:00
Whindmar Saksit
53685ada35 [SHELL32][SHDOCVW] Only forward menu messages to the correct shell extension (#7968)
Folder Marker 1.4 fails if it gets a WM_INITPOPUPMENU it does not expect.

CORE-17811
2025-05-15 12:21:22 +02:00
Katayama Hirofumi MZ
6bfb792439 [IMM32][SDK] Add User32InitializeImmEntryTable to <undocuser.h> (#8006)
Declare function in proper place.
JIRA issue: CORE-19268
- Add User32InitializeImmEntryTable
  prototype to <undocuser.h> and use it.
2025-05-15 15:10:57 +09:00
Katayama Hirofumi MZ
6efbed51ac [BROWSEUI][FORMATTING] Quick Launch: Just formatting (#7998)
JIRA issue: N/A
Just fix indentation and formatting.
2025-05-15 07:57:23 +09:00
Katayama Hirofumi MZ
490f7af4ae [NETAPI32] Revert to Wine module (#8004)
Partially revert #7912.
JIRA issue: CORE-5743
Use wine instead of wine2ros.
2025-05-15 07:43:14 +09:00
Katayama Hirofumi MZ
e2e6fcdb96 [IMM32] Revert to Wine module (#8003)
Partially revert #7912.
JIRA issue: CORE-5743
- Use wine instead of wine2ros.
- Improve Unexpected Condition Checkers.
2025-05-15 07:38:49 +09:00
Doug Lyons
a2dd6efcb4 [COMCTL32] Fix StatusBar left border frame missing (#7979)
Remove flag BF_MIDDLE from DrawEdge function.

CORE-19854
2025-05-14 17:15:16 -05:00
Mohammad Amin Mollazadeh
0fa49018cd [FREELDR] Show a notice message when booting in debug mode (#7967)
Make FreeLoader print a notice message before it passes the control
to the kernel, if kernel-mode debugging is enabled via boot options.

This can be helpful for people who may forget that they're booting
in debug mode (the default boot option also for the bootcd) and they
need to attach a debugger for the boot process to continue.
2025-05-14 22:15:11 +02:00
Timo Kreuzer
947c03e948 [WS2_32][WS2HELP] On Vista+ forward all ws2help to ws2_32 2025-05-14 05:50:59 +00:00
Timo Kreuzer
8df62f2f2c [WS2_32] Add Vista exports 2025-05-14 05:50:59 +00:00
Timo Kreuzer
3a0e02cede [WS2_32] Improve exports
- Add 64 bit exports
- Fix some parameters
- Add stubs file to build
2025-05-14 05:50:59 +00:00
Timo Kreuzer
c47d1ffba6 [WS2_32] Fix export ordering
Put exports with ordinals at the top, sort the rest like on Windows.
2025-05-14 05:50:59 +00:00
Katayama Hirofumi MZ
4f84ffa118 [IMM32][SDK] Support IME menus Part 1 (#7969)
Supporting IME menus will improve
Asian users' usability. IME menu is
used on the IME System Pen icon.
JIRA issue: CORE-20142
- Add dll/win32/imm32/imemenu.c.
- Move some code to imemenu.c.
- Implement IME menu transporting
  correctly by using file mapping and
  serialization.
2025-05-14 11:02:57 +09:00
Katayama Hirofumi MZ
189623614d [ACCESS] Improve Japanese (ja-JP) translation Part 3 (#7997)
Follow-up of #7995.
JIRA issue: CORE-18706
2025-05-14 10:30:27 +09:00
Katayama Hirofumi MZ
626a875de1 [EXPLORER] Improve Japanese (ja-JP) translation (#7996)
JIRA issue: CORE-18706
2025-05-14 10:21:05 +09:00
Katayama Hirofumi MZ
6d1d6a7c51 [ACCESS] Improve Japanese (ja-JP) translation Part 2 (#7995)
Follow-up of #7994.
JIRA issue: CORE-18706
2025-05-14 10:13:19 +09:00
Katayama Hirofumi MZ
6d460b61bf [ACCESS] Improve Japanese (ja-JP) translation (#7994)
JIRA issue: CORE-18706
2025-05-14 10:07:04 +09:00
Katayama Hirofumi MZ
9e3546028d [SHELL32] Improve Japanese (ja-JP) translation (#7993)
JIRA issue: CORE-18706
2025-05-14 09:47:03 +09:00
Katayama Hirofumi MZ
e07cf7f629 [DXDIAG] Improve Japanese (ja-JP) translation (#7992)
JIRA issue: CORE-18706
2025-05-14 09:35:45 +09:00
Katayama Hirofumi MZ
6cca9a9466 [SERVMAN] Improve Japanese (ja-JP) translation (#7991)
JIRA issue: CORE-18706
2025-05-14 09:26:36 +09:00
Katayama Hirofumi MZ
f17f96cb7e [RAPPS] Update Japanese (ja-JP) translation (#7990)
JIRA issue: CORE-18706
2025-05-14 09:22:26 +09:00
Katayama Hirofumi MZ
2766144b8b [FC] Improve Japanese (ja-JP) translation (#7989)
JIRA issue: CORE-18706
2025-05-14 09:04:22 +09:00
Katayama Hirofumi MZ
0c5274549b [REG] Improve Japanese (ja-JP) translation (#7988)
JIRA issue: CORE-18706
2025-05-14 08:49:25 +09:00
Katayama Hirofumi MZ
42b48b7435 [HELP] Improve Japanese (ja-JP) translation (#7987)
JIRA issue: CORE-18706
2025-05-14 08:22:28 +09:00
Katayama Hirofumi MZ
28ff80d3d1 [NETID] Improve Japanese (ja-JP) translation (#7986)
JIRA issue: CORE-18706
2025-05-14 08:16:18 +09:00
Katayama Hirofumi MZ
aa79640218 [DEVMGR] Improve Japanese (ja-JP) translation (#7985)
JIRA issue: CORE-18706
2025-05-14 08:10:41 +09:00
Katayama Hirofumi MZ
4fe1f62ba3 [NETCFGX] Improve Japanese (ja-JP) translation (#7984)
JIRA issue: CORE-18706
2025-05-14 08:01:29 +09:00
Katayama Hirofumi MZ
42da121600 [SYSSETUP] Improve Japanese (ja-JP) translation (#7983)
JIRA issue: CORE-18706
2025-05-14 07:09:41 +09:00
Katayama Hirofumi MZ
99ecbf5e56 [KBSWITCH][SDK] Add indicml.h and change window class (#7970)
Supporting the IME System Pen icon.
JIRA issue: CORE-19268
- Change kbswitch window class to "Indicator"
  from "kbswitcher".
- Add <ime/indicml.h> from DDK.
2025-05-13 07:14:17 +09:00
Hervé Poussineau
49427c48c5 [WIN32SS:USER] If default display driver doesn't work, try with VGA
CORE-7728, CORE-16002, CORE-16009, CORE-19224, CORE-19951
2025-05-12 18:24:58 +02:00
Hervé Poussineau
dca369cf41 [WIN32SS:ENG] Rework EngpUpdateGraphicsDeviceList
- choose VGA adapter outside of driver initialization loop
- choose primary adapter outside of driver initialization loop
- link VGA adapter to primary adapter at the end
- only set DISPLAY_DEVICE_PRIMARY_DEVICE in this function

Also mark VgaSave driver as SystemStart instead of Disabled,
so it is available if main display driver doesn't work.
2025-05-12 18:24:55 +02:00
Katayama Hirofumi MZ
6df1cc63b6 [BROWSEUI] Fix 'bad window handle' on CShellBrowser::RepositionBars (#7980)
Silence "NtUserSetWindowPos bad window
handle!" error at win32k!NtUserSetWindowPos
function when Desktop has started up.
JIRA issue: CORE-19663
Add null check of window handle before
SetWindowPos call in
CShellBrowser::RepositionBars method.
2025-05-12 22:27:52 +09:00
Katayama Hirofumi MZ
d06d9f3e8f [SYSDM] Improve Japanese (ja-JP) translation (#7976)
JIRA issue: CORE-18706
Update dll/cpl/sysdm/lang/ja-JP.rc.
2025-05-11 21:57:55 +09:00
Katayama Hirofumi MZ
6a905ae2e1 [REACTOS] Improve Japanese (ja-JP) translation (#7975)
JIRA issue: CORE-18706
Update base/setup/reactos/lang/ja-JP.rc.
2025-05-11 21:57:07 +09:00
Eric Kohl
d32fd58722 [UMPNPMGR][ADVAPI32][SERVICES] Pass PNP events to the service manager
- umpnpmgr.dll: Call I_ScSendPnPMessage to report pnp events to the service manager.
- adavpi32.dll: Implement I_ScSendPnPMessage which calls the service managers RI_ScSendPnPMessage function.
- services.exe: Add a debug message to RI_ScSendPnPMessage.
2025-05-11 14:25:15 +02:00
Katayama Hirofumi MZ
00b5dc8b49 [BROWSEUI] Quick Launch: Refresh buttons on change notify (#7965)
Respond change notification on Quick Launch.
JIRA issue: CORE-18475
- Subclass CISFBand to handle messages.
- Register change notification.
- Refresh buttons on change notification.
- Use timer to reduce redrawing cost.
2025-05-11 06:04:14 +09:00
Whindmar Saksit
afe29ee7fa [BROWSEUI] Don't remember invoked non-folders in addressbar (#7954)
CORE-20091
2025-05-09 16:19:49 +02:00
Eric Kohl
e0ef51b11e [UMPNPMGR] PNP_RegisterNotification: Validate a service and keep its status handle in the notification entry 2025-05-09 01:00:59 +02:00
Hervé Poussineau
3729b96625 [WIN32SS:ENG] In case of error, display the name of the problematic file 2025-05-08 21:48:14 +02:00
Hervé Poussineau
a8abe1d677 [WIN32SS:ENG] Move debug log to the right place
Display number of prepared modes after preparing them, not at device creation
where this number is always 0.
2025-05-08 21:48:14 +02:00
Hervé Poussineau
a36bf31a0d [VGAMP] Correctly initialize interface before calling VideoPortInitialize 2025-05-08 21:48:14 +02:00
Hermès Bélusca-Maïto
f20efc6007 [INCLUDE][ATL] Fix WM_SETHOTKEY macro wrappers
WM_SETHOTKEY / WM_GETHOTKEY messages encode the hotkey in a different
way than with the WM_HOTKEY message.
For more details, see:
https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-gethotkey
https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-sethotkey

Addendum to commit 6829350af9 (PR #7947)
2025-05-08 18:57:43 +02:00
Eric Kohl
3bb27eb416 [UMPNPMGR] Fix buggy identification of window and service handles 2025-05-07 23:57:09 +02:00
Katayama Hirofumi MZ
0ca6002b4f [GDI32][NTGDI][SDK] Font/Text: Fix SAL2 annotations and const-ness (#7865)
I want to work in correct type info.
JIRA issue: CORE-17684
- Add and fix SAL2 annotations.
- Fix const-ness of function
  parameters.
- Delete needless type casts.
2025-05-06 15:13:04 +09:00
Katayama Hirofumi MZ
530d26a1f4 [NTGDI][NTUSER] Initial support of NtGdiRemoveFontResourceW (#7877)
Enable the users to delete fonts.
JIRA issue: CORE-17684
- Add IntDeleteRegFontEntry helper function.
- Add RegDeleteValueW and RegEnumValueW helper
  functions in win32ss/user/ntuser/misc/registry.c.
- Add some code to IntGdiRemoveFontResourceSingle
  function.
2025-05-06 12:38:54 +09:00
Katayama Hirofumi MZ
2c475add8c [IMM32][NETAPI32][SDK] Reduce Wine dependency (#7912)
Related to #7870. netapi32.dll uses NDK.
So, we have to reduce dependency on Wine.
JIRA issue: CORE-5743
- Introduce wine2ros module in
  sdk/lib/wine2ros/.
- Reduce Wine dependency.
2025-05-06 09:59:47 +09:00
Dmitry Borisov
45b928f8bc [ACPI] Remove section assignment from IOCTL handlers (#7829)
Fix a bug introduced in 5070e8960a.

CORE-17256

- These handlers must be memory resident. Otherwise,
  this would cause a page fault that needs to be resolved.
  Low-level storage drivers could evaluate ACPI control
  methods while the device's IRP queue has been paused.

- Minor code enhancements.
2025-05-05 22:42:11 +02:00
Timo Kreuzer
d1f9e06a4f [REACTOS] Change manifest architecture from "X86"/"" to "*" 2025-05-05 10:02:51 +00:00
Katayama Hirofumi MZ
93e9710caf [CRT_APITEST] Add setjmp testcase (Retry) (#7847)
Splitted from #7839. Improved a little.
JIRA issue: CORE-19265
2025-05-05 12:56:21 +09:00
Katayama Hirofumi MZ
7073bdfead [EXPLORER][SHELL32][SHELL32_APITEST][SDK] AppBar Part 2 (#7946)
Follow-up of #7778.
JIRA issue: CORE-7237
- Rename APPBARDATA3264 structure
  as APPBARDATAINTEROP.
- Fix structures for WoW64.
- Use trace instead of DPRINT1.
- Add CAppBarManager::
  RecomputeAllWorkareas function.
- Fix WM_DISPLAYCHANGE handling
  to re-compute the work areas.
2025-05-05 12:48:02 +09:00
Petru Răzvan
24c2e4433b [NETSHELL] Implement Right click menu (#7959)
This implements the right click menu on the network icon that is in the taskbar.

CORE-9055

Note that Repair isn't implemented and emits a "not implemented" message,
because as far as I see ReactOS has no repair functionality for internet.
2025-05-04 22:41:20 +02:00
Petru Răzvan
986c4778fa [REGEDIT] Fix Incorrect status bar (#7944)
This fixes the incorrect status bar that happens when context menu action is used.

CORE-19524
2025-05-04 22:38:21 +02:00
Mohammad Amin Mollazadeh
2e7cfa0400 [WINESYNC][COMCTL32] Move caret to the end on "select all" (#7939)
CORE-19903

comctl32/edit: Scroll caret on Ctrl+A.

wine commit id e71087cd39 by Vladislav Timonin <timoninvlad@yandex.ru>
2025-05-04 22:32:56 +02:00
Petru Răzvan
2aa6fc1c7f [WORDPAD] Fix garbage in "Get Text" dialog (#7922)
This fixes the garbage in the "Get Text" dialog which occurs if there is no text input
and one clicks on "Get Text" under Extras.

CORE-19868
Reported to Wine: https://bugs.winehq.org/show_bug.cgi?id=58144
2025-05-04 22:28:32 +02:00
Eric Kohl
7c8a8400e0 [SDK][LSASRV][SETUPAPI] Move undocumented service manager functions into a new header file 2025-05-04 20:15:48 +02:00
Hermès Bélusca-Maïto
fad52db479 [EVENTVWR] Add missing output buffer size parameters to some routines.
Fix also some bugs encountered while testing.
2025-05-04 17:54:28 +02:00
Marcin Jabłoński
39ce22150a [DESK][SHELL32] Remove desk.cpl hacks for argument parsing (#7934)
Remove argument parsing hacks from desk.cpl that were originally introduced to
make it work with the previous broken implementation of `Control_RunDLLW`.

CORE-20076

- Remove argument parsing hacks from desk.cpl;
- Fix some issues with space separated string parsing in `Control_RunDLL`;
- Windows seems to allow invalid dialog-box names if there is only one dialog-box.
2025-05-04 17:47:28 +02:00
Eric Kohl
9638666d84 [MOUCLASS] Only set the device interface state if we have an interface name 2025-05-04 17:28:37 +02:00
Eric Kohl
5414600e1e [KBDCLASS] Set the device interface state on device start and device remove 2025-05-04 17:27:23 +02:00
Mohammad Amin Mollazadeh
cc16769179 [SHELL32] Fix focus glitch when hovering separators with submenu open (#7932)
CORE-20124

Since `TB_HITTEST` returns negative numbers for ID for separator menu items [^1],
shell menu assumes mouse moved outside of the menu popup, highlighting the menu
item for currently open submenu.
To fix this behavior, we can detect separators in `CMenuFocusManager::ProcessMouseMove`
and negate the ID returned by `TB_HITTEST` to make it a positive number again,
so the shell menu wouldn't glitch.

[^1]: https://learn.microsoft.com/en-us/windows/win32/controls/tb-hittest
2025-05-04 17:11:44 +02:00
Mohammad Amin Mollazadeh
3e342246d4 [WINESYNC][COMCTL32] Fix large height for ComboBox when CBS_NOINTEGRALHEIGHT is specified (#7940)
CORE-19833

wine commit id d551564f1b by Orin Varley <ovarley@codeweavers.com>

comctl32: Make CBS_NOINTEGRALHEIGHT only set minimum combobox height.

When the combobox height is to be set by the application (as the CBS_NOINTEGRALHEIGHT style is on),
and when a large size is specified but only a small number of items in the list, the height of the
combobox should be set by the number of items rather than the size specified to avoid empty lines.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57360
2025-05-04 16:59:54 +02:00
Timo Kreuzer
946f17e93d [NTOS] Fix x64 definition of MMPFN
Adjust the definition of COLORED_LIST_HEAD to always match the new MI_PTE_FRAME_BITS define.
2025-05-04 07:28:41 +00:00
Timo Kreuzer
fb8e6124e0 [NDK][XDK] Update definition of KUSER_SHARED_DATA with tests 2025-05-04 07:24:40 +00:00
Mohammad Amin Mollazadeh
21d3e290b7 [WINESYNC][COMCTL32] Don't delete font when destroying the control (#7941)
The font object `infoPtr->Font` is not owned by the `syslink` control, therefore freeing it would make the whole system use a different font. The fix provided by Wine removes the code that deletes this font object.

Imports Wine commit 480598680c

Fixes deleting system font object when destroying syslink. CORE-20127
2025-05-04 02:14:24 +03:00
Tim Abdiukov
a9ba54f678 [DWNL] Improve user experience and fix progress output (#7903)
- `CBindStatusCallback_UpdateProgress`:
  * Rework the failsafe check to enable percentage to be at 100%.
  * More thorough failsafe check, to avoid displaying 100% (or even 101%) where the actual and expected file sizes don't match.
- `case BINDSTATUS_ENDDOWNLOADDATA`: Do update the progress one last time to be at 100%, on download success.
2025-05-03 23:42:36 +02:00
Hermès Bélusca-Maïto
e6f5065f32 [EVENTVWR] Rewrite the way data is copied into the clipboard
CORE-20023

- Besides copying the event information, copy also its formatted data.

- Update translations with new IDS_COPY* strings.

- Eliminate all statically-sized temporary buffers, in favour of
  carefully calculating the size, and allocating an adequately
  sized buffer to hold the data to be copied.

- By default, the "title" and event info on the single-line fields,
  are separated with TABs (to facilitate data import in spreadsheets).
  Add a mode where, when the user presses the SHIFT key while clicking
  on the "Copy" button, the separation is instead done with space
  padding, to be able to prettify information display when copying
  into text files instead.
2025-05-03 17:15:29 +02:00
Hermès Bélusca-Maïto
85a69768d0 [EVENTVWR] DisplayEvent(): Avoid using multiple large statically-sized buffers
CORE-20023

And use a loop to fill the individual event item fields,
instead of repeating the same code over and over.
2025-05-03 17:15:18 +02:00
Whindmar Saksit
6829350af9 [SHELL32][NTUSER] Implement the SEE_MASK_HOTKEY/ICON/HMONITOR flags (#7947) 2025-05-03 16:08:58 +02:00
Timo Kreuzer
102c1db735 [NTDLL_APITEST] Fix x64 MSVC warnings 2025-05-03 08:01:03 +00:00
Timo Kreuzer
7af8ab2470 [NTDLL_APITEST] Add a test for NtQuerySection 2025-05-03 08:01:03 +00:00
Timo Kreuzer
4cee67df3f [CMAKE] Fix TREAT_ALL_WARNINGS_AS_ERRORS 2025-05-03 08:00:44 +00:00
Timo Kreuzer
2d57c60148 [WINMM] Silence MSVC warning about unary minus operator
mci.c(1012): warning C4146: unary minus operator applied to unsigned type, result still unsigned
2025-05-03 08:00:44 +00:00
Timo Kreuzer
edc8eb63c4 [RICHED20] Fix array bounds overflow
editor.c(4518): warning C4045: 'text': array bounds overflow
2025-05-03 08:00:44 +00:00
Timo Kreuzer
9bfa6b51be [BROWSEUI] Fix MSVC warning about unary minus operator
basebarsite.cpp(536): warning C4146: unary minus operator applied to unsigned type, result still unsigned
2025-05-03 08:00:44 +00:00
Doug Lyons
e98bba2535 [NTGDI:FREETYPE] Fix Fonts broken by opening VLC About (Retry of PR #4579) (#7952)
* Check is FontGDI->OriginalWeight > FontGDI->RequestWeight and if so, then return original weight.
* Do not handle FontGDI->OriginalWeight as a boolean. Use 'FontGDI->OriginalWeight = FW_DONTCARE;'.

CORE-17011
2025-05-01 17:44:10 -05:00
Whindmar Saksit
bbd6a57c0f [MSGINA][LSASRV] Support LSA secret DefaultPassword in autologon (#7936) 2025-05-01 17:51:42 +02:00
Stanislav Motylkov
21810f11e4 [REGEDIT] Update Russian (ru-RU) translation
Addendum to eb91f91569. CORE-19886
2025-05-01 16:36:11 +03:00
Marcin Jabłoński
b79a0447b9 [REGEDIT] Update Polish (pl-PL) translation (#7949)
Addendum to eb91f91569. CORE-19886
2025-05-01 16:26:33 +03:00
Katayama Hirofumi MZ
d722e70817 [SDK][USER32] Implement WM_IME_SYSTEM.IMS_SOFTKBDONOFF (#7950)
Supporting soft keyboard will improve IME
usability.
JIRA issue: CORE-19268
- Define IMS_SOFTKBDONOFF constant as
  0x13 in <immdev.h>.
- Implement
  WM_IME_SYSTEM.IMS_SOFTKBDONOFF
  message handling in ImeWnd_OnImeSystem.
2025-05-01 11:20:18 +09:00
Katayama Hirofumi MZ
e40e5f572f Revert "[COMCTL32] Pager: Fix PGM_RECALCSIZE behaviour (#7875)" (#7910)
Reverts #7875.
JIRA issue: CORE-20121
2025-04-30 20:38:22 +09:00
Katayama Hirofumi MZ
b33127f494 Revert "[CURSOR] Add Cursor AI project settings (#7752)" (#7913)
Reverts #7752
JIRA issue: CORE-20011
2025-04-30 20:36:41 +09:00
Whindmar Saksit
ba6760683b [SHELL32] Handle sort order in RegItems (#7906)
* [SHELL32] Handle sort order in RegItems

This makes the TweakUI "First icon on desktop" setting work correctly.
2025-04-30 13:31:58 +02:00
Hermès Bélusca-Maïto
b1cf981c52 [PSDK] Add missing hMonitor member in union with hIcon in SHELLEXECUTEINFOA/W
As documented in the official MS PSDK and MSDN.
2025-04-29 16:25:23 +02:00
Whindmar Saksit
37e2c59096 [RAPPS] Add ExeInZip installer type to support running installers in zip files (#7866) 2025-04-29 15:39:22 +02:00
Leon Frommholz
eb91f91569 [REGEDIT] Add missing status text for "New" elements (#7927)
Add missing status text for the "Multi-String Value" and
"Expandable String Value" in the "New" menu of the registry editor
for the English and German languages.

CORE-19886
2025-04-29 13:10:26 +03:00
Mohammad Amin Mollazadeh
be87e0099f [SHELL32] Return correct CSIDL for "Network Connections" menu item (#7938)
Fixes erroneous addition of "Properties" item into its context menu.

- Addendum to 0241b5c4e9 and 5aaead3fdb. CORE-20152
- Also remove FIXME for CORE-19477 which is fixed now. CORE-20151
2025-04-28 22:44:58 +03:00
Eric Kohl
dbc0c37750 [UMPNPMGR] Typo: Handle device interface removal events properly 2025-04-28 21:16:05 +02:00
Eric Kohl
bfa63932ce [MOUCLASS] Activate and deactivate the device interface for mouse devices 2025-04-28 21:14:20 +02:00
Hermès Bélusca-Maïto
5456e195db [EVENTVWR] Improve _some_ translations
- Add accelerators to the IDD_EVENTDETAILS_CTRL controls, in _some_
  translations but NOT all. Anyone is welcome to add the missing ones
  in the translations to their own language!

- Fix "Data" static text tab-ordering. It should be just before the
  IDC_EVENTDATAEDIT control, so that when pressing its accelerator,
  focus is given to the edit control and NOT on the Bytes/Words buttons.

- Change IDC_WORDRADIO -> IDC_WORDSRADIO
2025-04-28 18:02:45 +02:00
Hermès Bélusca-Maïto
87eac43fb9 [EVENTVWR] Improve details controls transition when updating events list
CORE-20021, CORE-20023, CORE-20037

Complements commits 1786a68256 (#7757) and d1aa59982d (#7921)

- When starting eventvwr, the details buttons are disabled and the fields
  are empty.

- During events enumeration, i.e. when refreshing the events list, the
  Previous/Next navigation arrow buttons are disabled. They get re-enabled
  once enumeration is done. No default event item is auto-selected at first.

- When the user selects an item, the details fields are filled (and the
  Copy button is enabled; the Byte/Word mode buttons are enabled only if
  the selected event has associated data).

- When changing the current filter via the TreeView, the events list is
  refreshed, but also the event details fields are emptied and buttons
  are disabled. The navigation arrows are re-enabled once enumeration is
  finished, but the details fields remain empty until an event is selected.

- Pressing the Previous/Next buttons just after the events list refresh
  (when no item is selected), automatically selects respectively the
  last/the first event in the list.
  The rationale for this behaviour is the following: in this situation,
  no item is selected, so it is as if the "current" item is at the same
  time, at the top and at the end (i.e. at the borders) of the list.

- Temporary HACK: When disabling the navigation arrows, this is usually
  because the events list is being refreshed, so we loose access to the
  event's data and we cannot use the bytes/words mode buttons anymore.
2025-04-28 17:53:16 +02:00
Hermès Bélusca-Maïto
fe6de816d6 [EVENTVWR] Update French (fr-FR) translation 2025-04-28 13:19:16 +02:00
Katayama Hirofumi MZ
f19c62c80e [EXPLORER][SHELL32][SHELL32_APITEST][SDK] AppBar: Initial support (#7778)
Supporting AppBars.
JIRA issue: CORE-7237
- Rewrite shell32!SHAppBarMessage
  function.
- Introduce CAppBarManager class in
  base/shell/explorer/appbar.cpp.
- Add support of ABM_NEW,
  ABM_REMOVE, ABM_QUERYPOS,
  and ABM_SETPOS messages for
  AppBar in Tray Window.
2025-04-28 19:08:13 +09:00
Whindmar Saksit
378a335468 [SHELL32] Don't pass menu band hwnd to InvokeCommand (#7945)
The menu band window is about to go away, don't pass it to InvokeCommand because it's invalid as an owner window for any dialogs the callee might display.
2025-04-28 00:24:15 +02:00
Hervé Poussineau
9b70d4380c [FREELDR] Allow empty RDPATH parameter
In that case, read the whole partition/disk, instead of the selected file.

CORE-14603
2025-04-27 23:49:21 +02:00
Dmitry Borisov
c27a2fc7cb [XDK] Add missing PCI subclass type definition for AHCI controllers (#7931)
Split out of #6577. CORE-17256
2025-04-27 23:04:41 +03:00
Eric Kohl
f8efb5d474 [UMPNPMGR] Report device interface arrivals and removals to registered windows
- Other event types are not supported yet.
- Services notification is not supported yet.
2025-04-27 17:09:50 +02:00
Petru Răzvan
d1aa59982d [EVENTVWR] Fix "Bytes" and "Word" buttons enabled with empty entry (#7921)
CORE-20037
2025-04-27 16:31:25 +02:00
Whindmar Saksit
a6558c0562 [EXPLORER] Implement ClearRecentDocsOnExit setting (#7935) 2025-04-27 01:28:37 +02:00
Whindmar Saksit
bd2d3b8603 [SHELL32] Don't set a desktop.ini folder icon on WinDir and System32 (#7933)
wine 332b90c0064563a9e4f67fb2d9b26a940e5e745c removed the whole icon member on their side.

CORE-19037
2025-04-27 01:06:32 +02:00
Petru Răzvan
0a6bcfc9ff [CHARMAP] Fix status bar not being refreshed (#7924)
Ensure SetCaretXY() is called when the charset is changed,
or a new font is being set.

CORE-19838
2025-04-26 22:42:46 +03:00
Whindmar Saksit
8b6907f2a6 [EXPLORER] Implement NoWinKeys and HideClock restrictions (#7926) 2025-04-25 13:51:26 +02:00
Doug Lyons
85afe48c3e [GDI32] Fix MSVC warning in SetDIBitsToDevice and simplify code. (#7919)
This is a very small revert of PR #5227 to simplify the code and eliminate an MSVC warning.
It was pointed out by Timo Kreuzer as probably not doing what I intended and he was correct.
I added this code in PR #5227 to try and correct some return values from SetDIBitsToDevice.
After testing with this new PR, there was no difference in the regression tests for either
1) gdi32:bitmap or 2) gdi32:SetDIBitsToDevice after deleting the code here and the MSVC warning was fixed.
2025-04-24 21:04:36 -05:00
Whindmar Saksit
efbdd483b3 [SHELL32] Allow .Lnk properties dialog to change icon for non-FS targets (#7911)
CORE-19971
2025-04-24 21:30:27 +02:00
Whindmar Saksit
7eb8535edf [STOBJECT][NTUSER][ACCESS] Don't use a systray timer when not needed (#7917) 2025-04-24 21:27:36 +02:00
Whindmar Saksit
78e04c07b8 [USER32] Read the CoolSwitch settings from the registry (#7920) 2025-04-24 15:22:43 +02:00
Timo Kreuzer
e452980e0e [HALX86/APIC] Change IRQL for x86 profile interrupt to HIGH_LEVEL
While PROFILE_LEVEL is defined as 27 on x86, this does not match the vector for the profiling interrupt, which is 0xFD (see https://community.osr.com/t/odd-ioapic-output/45216), implying IRQL 31.
Fixes boot with x86 APIC hal (CORE-20093)
2025-04-24 11:36:12 +00:00
Timo Kreuzer
35fd771c84 [HALX86/APIC] Read APIC Id from APIC instead of using initial Id
This is needed on some hardware systems, where the BIOS has modified the actual APIC IDs.
The timer interrupt already did this, but in a broken way.
2025-04-24 11:36:12 +00:00
Timo Kreuzer
faaac75546 [HALX86/APIC] Use physical addressing in HalEnableSystemInterrupt 2025-04-24 11:36:12 +00:00
Timo Kreuzer
f1f01771b6 [HALX86/APIC] Set timer interrupt to level triggered 2025-04-24 11:36:12 +00:00
Timo Kreuzer
884f73fb04 [HALX86/APIC] Fix interrupt delivery on bare metal
Write both high and low 32 bits of ICR in ApicRequestSelfInterrupt. In VMs we get away with only writing the low 32 bits, but actual hardware doesn't always accept that.
2025-04-24 11:36:12 +00:00
Timo Kreuzer
0f6e982ad7 [HALX86/APIC] Mask profiling interrupt on init 2025-04-24 11:36:12 +00:00
Timo Kreuzer
2c057d9bc1 [HALX86] Set the NMI disable flag when accessing CMOS registers
An NMI while accessing the CMOS can leave it in an undefined state. NMIs are used on x64 SMP for CPU freeze in the debugger.
2025-04-24 11:36:12 +00:00
Katayama Hirofumi MZ
94fc56c038 [COMCTL32][USER32] Edit: Don't unlock if unlocked on EM_SETHANDLE (#7886)
JIRA issue: CORE-18944
EDIT_EM_GetHandle unlocks the handle,
so the next EM_SETHANDLE handler
shouldn't unlock the unlocked text.
Don't unlock the handle when es->text
was NULL on EM_SETHANDLE
message handling.
2025-04-24 19:21:22 +09:00
Mohammad Amin Mollazadeh
860262952d [SHELL32] Fix Deselect highlighted item in shell menus on close (#7904)
CORE-18855

Add a call to _ChangeHotItem(NULL, -1, 0) in CMenuBand::OnSelect(MPOS_CANCELLEVEL) which causes to deselect currently selected item the moment the menu bands (including start menu) are closing.
Start Menu is not destroyed when it's closed so its allocated resources can be re-used next time user wants to open it, so to keep this behavior and still not having an item selected every time you open the start menu, you have to deselect the currently selected item.
2025-04-23 23:10:08 +02:00
Whindmar Saksit
fcc2247774 [BROWSEUI] Use the last id for custom find files menu item (#7918) 2025-04-23 18:57:24 +02:00
Whindmar Saksit
6faee56f86 [DESK] Preview the color on the background color button (#7916)
Note: A bug in the classic button prevents it from sending CDDS_POSTPAINT if the button has no text, the button resource has a space in its text as a workaround.
2025-04-23 18:32:45 +02:00
Whindmar Saksit
d3456f5060 [SHELL32] Implement IShellFolder2::GetDetailsEx (#7880) 2025-04-21 23:21:44 +02:00
Marcin Jabłoński
4cbd5d1b44 [TASKMGR] Distinguish WOW64 processes with a " *32" in the image name (#7915) 2025-04-21 23:17:19 +02:00
Whindmar Saksit
73b019a390 [SHELL32] Respect the REST_NODRIVES restriction (#7907)
This is the "My Computer => Drives" setting in TweakUI.
2025-04-21 23:16:59 +02:00
Whindmar Saksit
fb6191b71a [SHELL32] Respect StrCmpLogicalW policy in shell folders (#7900) 2025-04-21 23:06:47 +02:00
Eric Kohl
4514e748f0 [DHCPCSVC] Implement DhcpAcquireParameters and DhcpReleaseParameters
TODO: The AdapterName parameter should be a unicode string. Fix this later.
2025-04-21 14:45:51 +02:00
Hermès Bélusca-Maïto
f135cab83e [SETUPLIB] Add a setuplib_static library, used for the dll and the unit-tests.
Since the setuplib.dll isn't available after installing ReactOS, build
instead a static library that is then used for the dll, and linked into
the setuplib_unittest, so that it can be run in our test-suite.

Addendum to commit d7c1d220.
2025-04-20 19:18:28 +02:00
Eric Kohl
2c2cdfddd3 [DHCPCSVC] Move the public header rosdhcp_public.h
This header is not to be used outside of dhcpcsvc because it contains the data structures for the communication between the client and the server part within dhcpcsvc. That is why it is moved inside of dhcpcsvc and renamed to rosdhcp_pipe.h.
2025-04-19 22:55:52 +02:00
Hermès Bélusca-Maïto
d489f1a170 [NTOS:KD] Supplement minimal handling in KdSend/ReceivePacket when no kernel debugger is present.
CORE-20107

Improve the minimal handling done in the fall-back KdSend/ReceivePacket()
routines when they are invoked by KD64 (in Release build).

Part of my `kdbg_tests_kdio_split` branch for splitting kd/kdio.c
into a separate KD dll.

KdSendPacket:
- Silently ignore PACKET_TYPE_KD_STATE_CHANGE32/64 DbgKdLoadSymbolsStateChange notification.
- Partially manage and log the unhandled PACKET_TYPE_KD_STATE_CHANGE DbgKdExceptionStateChange notification.
- Log other unhandled PACKET_TYPE_KD_STATE_CHANGE32/64 and PACKET_TYPE_KD_STATE_MANIPULATE notifications.

When KdSendPacket receives the DbgKdExceptionStateChange notification,
it cannot handle it (no debugger is there!). However, we need to claim
the debugger to be present, so that its KD64 caller: KdpSendWaitContinue(),
can call back KdReceivePacket(PACKET_TYPE_KD_STATE_MANIPULATE), which,
in turn, informs KD that the exception cannot be handled, by returning
a failure code in the ManipulateState's ContinueStatus.

During bugchecks, this allows KiBugCheckDebugBreak() to not loop infinitely,
but instead fall back into calling HalHaltSystem() to halt the computer.
2025-04-19 20:01:10 +02:00
Serge Gautherie
0e21c6f3fd [NTOS:KD] Accept some packet types without KDBG (#7892)
When KDBG isn't included in the kernel (Release build), the fall-back
KdSend/ReceivePacket() routines are invoked by KD64. A minimal handling
of the basic packets needs to be done:
PACKET_TYPE_KD_STATE_CHANGE32/64 for KdSendPacket(),
and PACKET_TYPE_KD_POLL_BREAKIN, PACKET_TYPE_KD_STATE_MANIPULATE
for KdReceivePacket().

Addendum to commit 2046a17ef4
CORE-20107
2025-04-19 20:01:09 +02:00
Hermès Bélusca-Maïto
005f75bd61 [RTL] x64/ARM: Alias RtlpBreakWithStatusInstruction to DbgBreakPointWithStatus; x64: fix a bug.
RtlpBreakWithStatusInstruction is just a label for KD.

On machines that have register calling conventions (basically all except
x86), the `Status` parameter for `DbgBreakPointWithStatus` is stored in
the first argument register.

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-dbgbreakpointwithstatus

On the x64 platform, `DbgBreakPointWithStatus` only uses the ECX register
and leaves EAX untouched. Verified on Windows.
2025-04-19 20:01:08 +02:00
Hermès Bélusca-Maïto
a7d86fe3a7 [NTOS][RTL] Remove unused deprecated ReactOS-only DbgBreakPointNoBugCheck()
This helper was introduced in commit b041530f2d (r8551), and its
last remaining usage removed in commit f038f4a895 (r23636).
2025-04-19 20:01:06 +02:00
Whindmar Saksit
b42b015cc6 [SHELL32] Enable OK Run dialog button on combo change (#7909)
CORE-20125
2025-04-19 14:18:08 +02:00
Eric Kohl
2fe3073697 [DHCPCSVC] Remove the now obsolete function DhcpRosGetAdapterInfo 2025-04-19 11:42:09 +02:00
Eric Kohl
3fe4b41f20 [IPHLPAPI] Retrieve DHCP information from the registry 2025-04-18 19:52:23 +02:00
Doug Lyons
fa7890f39d [SERVMAN] Services Properties 'Dependencies' tab missing text above lower listbox (#7899)
- Add some missing 'colons' to descriptive text above upper listbox.
CORE-20115
2025-04-18 12:45:48 -05:00
Timo Kreuzer
aa60e56199 [NTOS] Fix MSVC warnings
Be strict about string length to prevent overflows.
2025-04-18 17:28:49 +00:00
Eric Kohl
aa6c33b21c [DHCPCSVC] Set more registry values when an ip address has been provided
Set the DhcpServer, LeaseObtainedTime and LeaseTerminatesTime values.
2025-04-18 19:26:23 +02:00
Whindmar Saksit
5a10ec60be [EXPLORER][BROWSEUI][SHLWAPI][BOOTDATA][WIN32K] Support AppKeys and more WM_APPCOMMANDs (#7879)
Implements a couple of extra commands in IShellBrowser and adds support for the AppKeys fallback registry key (used when the foreground application does not handle the command).
2025-04-18 18:35:30 +02:00
Timo Kreuzer
2e85425c53 [NTOS:MM] Remove one more instance of MmLocateMemoryAreaByAddress 2025-04-17 22:22:08 +00:00
Timo Kreuzer
0e58b59794 [NTOS:MM] Get rid of more calls to MmLocateMemoryAreaByAddress 2025-04-17 22:22:08 +00:00
Timo Kreuzer
1f27911997 [NTOS:MM] Reduce the magnitude of the MiRosProtectVirtualMemory hack 2025-04-17 22:22:08 +00:00
Timo Kreuzer
f60128b69d [NTOS:MM] Remove usage of memory area in MiProtectVirtualMemory 2025-04-17 22:22:08 +00:00
Timo Kreuzer
edecbf4799 [NTOS:MM] Remove usage of memory area in MiUnmapViewOfSection 2025-04-17 22:22:08 +00:00
Timo Kreuzer
a8f4a76c7b [NTOS:MM] Improve MiDeleteVirtualAddresses
- Fix parameter annotations
- Add an ASSERT
2025-04-17 22:22:08 +00:00
Timo Kreuzer
8851d86847 [NTOS:MM] Remove Vad pointer from MEMORY_AREA 2025-04-17 22:22:08 +00:00
Timo Kreuzer
7611e49b9d [NTOS:MM] Use StartingVpn instead of Vad member to check for user/kernel 2025-04-17 22:22:08 +00:00
Timo Kreuzer
7ec2e1cd2f [NTOS:MM] Stop inserting fake MEMORY_AREAs for ARM³ VADs
They were introduced when MEMROY_AREAs and VAD still lived in different tables to synchronize between them. Since some time MEMORY_AREAs are special VADs and live in the same table as ARM³ VADs, but with flags to distinguish them. Since then the only reason that the fake MEMORY_AREAs still existed was to determine whether a VAD that is a MEMORY_AREA is still handled by ARM³ (which is the case for some kernel VADs, like for paged pool). This is no longer required as it is now determined by a 2nd flag in the VAD itself.
Additionally, we tried to insert the fake MEMORY_AREAs into the VAD table, which would fail, because it was already occupied by the ARM³ VAD, but the failure was ignored.
2025-04-17 22:22:08 +00:00
Timo Kreuzer
2696f1a29f [NTOS:MM] Do not update ARM³ owned memory area
Those are not inserted into a table and we don't use them.
2025-04-17 22:22:08 +00:00
Timo Kreuzer
ec45b8fde8 [NTOS:MM] Stop using memory areas in MmAccessFault
- Implement MiLocateVad and make MiLocateAddress call it
- Use MiLocateVad in MmAccessFault to get the VAD
- Check VadFlags for whether this is an ARM³ VAD/MEMORY_AREA
2025-04-17 22:22:08 +00:00
Timo Kreuzer
fca88bb94d [NTOS:MM] Add more checks for MEMORY_AREA_OWNED_BY_ARM3 2025-04-17 22:22:08 +00:00
Timo Kreuzer
d0a7e496aa [NTOS:MM] Mark RosMm memory areas
This is to distinguish them from ARM³ memory areas, which we use for some kernel regions, like paged pool.
2025-04-17 22:22:08 +00:00
Timo Kreuzer
42c7e4f66a [NTOS:MM] Add macros to determine whether a VAD is a MEMORY_AREA 2025-04-17 22:22:08 +00:00
Timo Kreuzer
d27f5971c5 [NTOS:MM] Add MmIsAddressRangeFree helper function
Use this instead of MmLocateMemoryAreaByRegion to determine whether we can inert a section at the requested base address. This will be required to get rid of fake memory areas allocated for each ARM³ VAD.
2025-04-17 22:22:08 +00:00
Timo Kreuzer
48027a8058 [NTOS:MM] Remove obsolete code path
In MmCleanProcessAddressSpace we already delete VADs that are RosMm memory areas by calling MiRosCleanupMemoryArea, so we never reach the later check. This code path is from a time when VADs and memory areas lived in different tables, which is no longer the case.
2025-04-17 22:22:08 +00:00
Timo Kreuzer
7b23673851 [NTOS:MM] Forward MmLocateMemoryAreaByAddress to MmLocateMemoryAreaByRegion
Both functions do exactly the same.
2025-04-17 22:22:08 +00:00
Timo Kreuzer
31a693a035 [NTOS:MM] Remove some obsolete declarations 2025-04-17 22:22:08 +00:00
Katayama Hirofumi MZ
67e5343daf [IMM32] Make IMM32 non-Wine module (#7890)
Related to #7870. IMM32 uses NDK.
So, we have to remove Wine
dependency.
JIRA issue: CORE-5743
- Add dll/win32/imm32/debug.h.
- Remove Wine dependency.
- Update the documentation
  (media/doc/WINESYNC.txt).
2025-04-17 22:50:22 +09:00
Adam Słaboń
016c5fd083 [KERNEL32] RemoveDirectoryW: Fix the code for removing a mounted folder (#7897)
- Fix the crash due to copying the memory to wrong destination buffer.
- Fix the check for trailing backlash on path string.
2025-04-17 15:49:38 +02:00
Adam Słaboń
3d9b919814 [MOUNTMGR] Few fixes and improvements (#7896)
- `MountMgrVolumeMountPointChanged()`: Set status code in all failure
  paths and correct the check for remote or removable media.
- `DeleteRemoteDatabaseEntry()`: Do not allow the database with size of zero.
- `QueryVolumeName()`: Use reparse point file reference when no file name is supplied.
2025-04-17 15:26:58 +02:00
Adam Słaboń
26e0a5472f [NDK] Add definitions for system partition and disk information classes (#7895)
Add definitions for SystemSystemPartitionInformation and SystemSystemDiskInformation classes.
2025-04-17 13:57:19 +02:00
Petru Răzvan
7026466324 [USRMGR] Implement "Require user name and password on system startup." (#7887)
This implements the tickbox along with the associated code required for it to work.

CORE-11371
2025-04-17 13:55:31 +02:00
Curtis Wilson
be56c5c328 [TRACERT] Improve command line parsing (#7779)
- Added bounds check for -w and -h options to prevent the program from crashing.
- Added argument checks for -w and -h to make sure values were of the correct type and within range.
- Added check to see if a host was specified.
- Added new resource strings for reporting errors related to the checks above.
- Added the slash character as an additional option to specify command options.
2025-04-17 13:53:43 +02:00
Doug Lyons
23ad93627b [COMDLG32] Improve IDC_TOOLBARPLACES placement (#7898)
Change IDC_TOOLBARPLACES y-value from 192 to 200 to allow Browse Dialog for "My Network Places" to show lower border.
CORE-19732
2025-04-16 19:52:33 -05:00
Serge Gautherie
2f380814d3 [NTOS:KD] Fix KdMax value without KDBG debugger (#7889)
Addendum to commit 271b985
CORE-20107

[NTOS:KD] Comment defines related to KdMax. They are not used,
but keep them for documentation purposes.
Addendum to e160c0f (r14799) and 6d53c91 (r27419).
2025-04-16 17:18:07 +02:00
Katayama Hirofumi MZ
80eb313eed [COMCTL32] Pager: Fix PGM_RECALCSIZE behaviour (#7875)
JIRA issue: CORE-7017
- Add m_bProcessingReCalcSize to PAGER_INFO structure.
- Fix EM_FMTLINES and PGM_RECALCSIZE handling, by
  usiing m_bProcessingReCalcSize.
2025-04-15 08:59:43 +09:00
Eric Kohl
00983aa86f [UMPNPMGR] PNP_AddEmptyLogConf: Implement adding a resource list to an existing configuration value 2025-04-13 20:12:08 +02:00
Hermès Bélusca-Maïto
79f281e74f [SDK:CMAKE] Remove unused BUILD_MP build option (#7862)
It was introduced in commit 1f9c4940d (r38270), but this flag isn't used
anymore in our source tree, and nowadays, we actively compile both UP
and MP support.
2025-04-12 22:37:48 +02:00
Timo Kreuzer
00f4a0f89b [RICHED20] Enable thiscall wrappers for MSVC
Properly fix thiscall functions by enabling thiscall wrappers on MSVC builds.
See CORE-20079, CORE-20006
2025-04-12 07:57:42 +00:00
Timo Kreuzer
dd53e7f79e Revert "[RICHED20] Fix MSVC Wordpad failure after riched20 Wine Sync to 6.10 (#7789)"
This reverts commit 74599f6c97.
2025-04-12 07:57:42 +00:00
Timo Kreuzer
18fc5a1391 [USER32] Fix use of uninitialized variable 2025-04-11 07:24:44 +00:00
Doug Lyons
3b8cfa42c1 [RICHED20] Fix RTC MSVC Failure in function ME_GetTextW. (#7881)
Import Wine Commit: 5cbe3a6cb1
CORE-20082
2025-04-10 13:35:53 -05:00
Whindmar Saksit
5022a451df [SHELL32] Fix Search Folder resource string id (#7874) 2025-04-09 16:29:57 +02:00
Alexey Strukov
9a0ff8b21b [BROWSEUI] Fix backspace button behavior in win32 shell browser (#7837)
Update backspace button functionality to align with standard modern Windows behavior in the win32 shell browser.
2025-04-08 23:54:14 +02:00
Hermès Bélusca-Maïto
1b564c1ba8 [REACTOS] Use the RT_* resource type defines where possible (#6023)
And use the self-documenting `MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)`
instead of `0` for the `LDR_RESOURCE_INFO::Language` structure member.
2025-04-08 20:21:07 +02:00
Hermès Bélusca-Maïto
111c8cc62a [REACTOS] Usage improvements for some RtlFindMessage invocations (#6023)
Use `RT_MESSAGETABLE` and `MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)`
instead of hardcoding their values.
2025-04-08 20:19:54 +02:00
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
Whindmar Saksit
a444572c3e [SHIMGVW] Display error message on delete failure (#7776)
CORE-20019
2025-03-27 13:43:58 +01:00
Mark Jansen
70422cda51 [SHELL32] Fix starting disk cleanup from drive properties
CORE-12314
2025-03-27 10:55:41 +01:00
Nguyen Trung Khanh
97e7efc020 [TASKKILL] Implement /t (tree) parameter (#2403)
CORE-15998
2025-03-26 17:04:49 +01:00
Mark Jansen
49c40a2941 [PROGMAN][MSPORTS][VFDLIB][CONSRV] Update resource encoding to be utf8 2025-03-26 16:39:43 +01:00
Mark Jansen
2e8f4e2c24 [SHELL32] Implement Recycle bin cleanup handler
CORE-18942
2025-03-26 13:58:40 +01:00
Mark Jansen
f9bedd5ca5 [CLEANMGR] Add basic cleanmgr implementation
CORE-18941
2025-03-26 13:58:40 +01:00
Mark Jansen
0cd7e2cfb0 [PSDK] Add missing parameter names 2025-03-26 13:58:40 +01:00
Mark Jansen
db9768f25d [PSDK] Add EmptyVC.idl 2025-03-26 13:58:40 +01:00
Serge Gautherie
c302dbcc96 [FORMAT] wmain(): Call GetLastError() immediately
and adapt STRING_ERROR_DRIVE_TYPE strings.
2025-03-26 13:37:53 +01:00
Serge Gautherie
421dd31d49 [FORMAT] wmain(): Clean GetDiskFreeSpaceExW() calls up 2025-03-26 13:37:53 +01:00
Serge Gautherie
982cf2be5e [FORMAT] wmain(): Clean GetVolumeInformationW() calls up
and immediately print file system out
2025-03-26 13:37:53 +01:00
Katayama Hirofumi MZ
d69a80fad7 [SHDOCVW] Follow-up of #7804: Improve AddUrlToFavorites (#7820)
JIRA issue: CORE-19824
JIRA issue: CORE-19867
JIRA issue: CORE-14172
- Use <strsafe.h>.
- Don't use CSIDL_COMMON_FAVORITES.
2025-03-26 20:13:36 +09:00
Katayama Hirofumi MZ
457642cc4a [FONTEXT] Refactor (#7821)
Improve code flexibility.
JIRA issue: CORE-12861
- Delete excessive virtual keywords
  and add overload keywords.
- Add InstallFontFiles helper function.
- Add strMsg parameter to
  DoInstallFontFile function.
- Move DoInstallFontFile and
  DoGetFontTitle functions outside
  the class.
- Delete needless fontext.h.
2025-03-26 18:58:12 +09:00
Marcin Jabłoński
be7d79768e [COMCTL32] Fix a heap corruption in EDIT_EM_ReplaceSel (#7598)
https://jira.reactos.org/browse/CORE-19743
2025-03-26 10:32:17 +01:00
Serge Gautherie
35ca454cab [NTOSKRNL] Add missing \n to DPRINT() calls (#6012)
Improve debug logs.
- Add missing \n to DPRINT() calls
- And demote/promote some DPRINT()/DPRINT1().
2025-03-26 10:23:15 +01:00
Whindmar Saksit
c1b8c4f96f [SHELL32] Correctly implement common desktop items PIDL (#7730)
The current implementation is broken, if a file/folder exists in both places, you always get the user item.

CORE-19861
2025-03-25 21:26:55 +01:00
Katayama Hirofumi MZ
151ba9ee8f [BROWSEUI][SHDOCVW][SDK] Fix 'Add Favorite' command (#7804)
JIRA issue: CORE-19824
JIRA issue: CORE-19867
- Add shdocvw import to browseui.
- Half-implement shdocvw!
  AddUrlToFavorites function.
- Add AddUrlToFavorites prototype
  to <shdocvw_undoc.h>.
- Fix browseui!CShellBrowser::
  OnAddToFavorites and
  shdocvw!CNSCBand::_AddFavorite
  by using AddUrlToFavorites.
2025-03-26 04:35:22 +09:00
Doug Lyons
0c6423da8d [RICHED20] txthost.c: Partial Wine Sync of RichEditWndProc_common (#7817)
Add extra parameters to 'struct host' to handle 'defer_release' and 'notify_level' and use these.
Fixes crash when using 'Enter' key in DevCpp installer license edit box.

Update and retrial of #7733. CORE-19991
Cherry pick of wine commit: 8138159f20
2025-03-25 13:15:59 -05:00
Hermès Bélusca-Maïto
48beb0433e [SETUPAPI] Add missing NULL parameter checks in SetupOpenInfFileW and SetupDiGetINFClassW (#7573)
Based on PR #5673, ROSTESTS-388

Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
2025-03-25 17:41:23 +01:00
Mark Jansen
5ec739bf2e [RTL] Change comment to indicate a hack 2025-03-25 16:23:39 +01:00
Mark Jansen
6ab81dcc31 [VERIFIER] Clarify logging 2025-03-25 16:23:39 +01:00
Mark Jansen
0b8acaac31 [AVRF] Suppress notifications for providers 2025-03-25 16:23:39 +01:00
Mark Jansen
08d575adf9 [RTL] Notify verifier when freeing the process page heap 2025-03-25 16:23:39 +01:00
Mark Jansen
5821136dfa [AVRF] Hook up debug functions, add noisy stub for AVrfpGetStackTraceAddress 2025-03-25 16:23:39 +01:00
Mark Jansen
a7a504a466 [SDK] Add avrf stop codes and VERIFIER_STOP macro 2025-03-25 16:23:39 +01:00
Katayama Hirofumi MZ
367e4877f1 [BROWSEUI][SDK] Implement IAddressEditBox::SetCurrentDir (#7814)
JIRA issue: CORE-19704
- Rename and retype pidlLastParsed
  as CComHeapPtr
  <ITEMIDLIST_ABSOLUTE>
  m_pidlLastParsed.
- Implement
  CAddressEditBox::SetCurrentDir
  method.
- Simplify
  CAddressEditBox::ParseNow
  method.
- Modify IAddressEditBox interface.
2025-03-25 20:32:26 +09:00
Timo Kreuzer
776c660542 [NTDLL] Export RTL locale functions
The exports are NT6, but the table is initialized unconditionally, because the functions will be used later internally.
2025-03-25 09:55:17 +00:00
Timo Kreuzer
e01c32f3bd [RTL] Implement locale functions/tables
The locale table is currently hardcoded in rtl. On Vista+ (and Wine) this table is part of locale.nls, but we don't have that yet.
2025-03-25 09:55:17 +00:00
Timo Kreuzer
762a9f00bb [NTDLL_APITEST] Add test for Rtl locale functions 2025-03-25 09:55:17 +00:00
Timo Kreuzer
738ff9dc04 [NDK] Add some Vista+ Rtl locale functions 2025-03-25 09:55:17 +00:00
Timo Kreuzer
684072fe12 [NDK] Minor header improvements
- Remove some duplicated prototypes
- Fix a few mismatching annotations
2025-03-25 09:55:17 +00:00
Katayama Hirofumi MZ
9563c07146 [MSPAINT] Improve behaviour on memory shortage (#7780)
Improve UX on memory shortage.
JIRA issue: CORE-20020
- Clear history on memory shortage.
- Improve CCanvasWindow::OnPaint on memory
  shortage.
- Add null check in CCanvasWindow::DoDraw.
- Retire using of cache in CCanvasWindow.
2025-03-25 10:45:23 +09:00
Katayama Hirofumi MZ
c930c8c464 [GDI32] Implement RemoveFontResourceExA (#7813)
JIRA issue: CORE-17684
2025-03-25 10:38:17 +09:00
Katayama Hirofumi MZ
aee5cbdfe3 [SHELL32_APITEST] Add PathProcessCommand testcase (#7815)
JIRA issue: CORE-17659
2025-03-25 08:34:02 +09:00
Timo Kreuzer
9ab89bd8fa [UCRTBASE_WINETEST] Fix and add to build 2025-03-24 23:02:06 +00:00
Timo Kreuzer
5c47607ab2 [UCRTBASE_WINETEST] Import ucrtbase_winetest from wine-10.0 2025-03-24 23:02:06 +00:00
Timo Kreuzer
5b633d64f1 [UCRTBASE] Build without debug exports
Windows ships ucrtbase without debug exports and ucrtbased with debug exports. The wine test tests ucrtbase and loads it dynamically in some cases. Compiling it with _DEBUG requires it to be linked to ucrtbased, which causes problems, because it also dynamically loads ucrtbase, which will cause it to crash.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
6a4dbedd1e [CMAKE] Support WITH_DBG and NO_DBG overrides in spec2def
This is to be able to build ucrtbase without debug and later ucrtbased with debug.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
01cd8472c7 [UCRTBASE] Implement simplistic versions of some stubs
This is to allow ucrtbase_winetest to run without debug breaks.
Proper implementations will follow.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
f81c82f5fa [VCSTARTUP] Implement atexit and _onexit
These must use a local table and cannot use the one from ucrtbase.
The table is initialized with a .CRT section initializer.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
fce48c3014 [OLDNAMES] Fix up for ucrtbase
Some old names redirect to functions that are not exported by ucrtbase. Place them into a seperate asm file, so that they don't get pulled in, when any of the other ones is referenced.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
5abc69f31d [PSEH] Make x64 PSEH independent of SDK headers 2025-03-24 23:02:06 +00:00
Timo Kreuzer
ad50a00020 [UCRTBASE] Fix broken imports from ntdll
Previously sprintf and _vsnprintf were imported from ntdll. These functions are defined as inline functions in ucrt headers, but linked directly by legacy CRT code.
2025-03-24 23:02:06 +00:00
Justin Miller
c37af4cfca [CODEOWNERS] add myself to codeowners for directx (#7816) 2025-03-24 23:08:34 +01:00
Timo Kreuzer
0fc0d9ebb1 [NTOS:KE] Skip an "optimization" on SMP 2025-03-24 21:33:48 +00:00
Timo Kreuzer
0016d65532 NTOS:KE] Make KiSetAffinityThread SMP ready 2025-03-24 21:33:48 +00:00
Timo Kreuzer
9292cad39a [NTOS:KE] Implement KiFindIdealProcessor 2025-03-24 21:33:48 +00:00
Timo Kreuzer
c1369e8c41 [NTOS:KE] Select proper processor in KiDeferredReadyThread 2025-03-24 21:33:48 +00:00
Denis Robert
8c9f250587 [SETUP:REACTOS] Update French (fr-FR) translation (#7564)
Update French translation in base/setup/reactos/lang

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-03-24 22:26:07 +01:00
Whindmar Saksit
f222c2155d [SHELL32][SHDOCVW] Fix drive volume renaming (#7812)
* [SHELL32] Fix drive volume renaming

- Support renaming to empty volume name.
- Use SHGDN_FOREDITING in Explorer tree and DefView ("Volname" instead of "VolName (C:)").
- Added support for the ShowDriveLettersFirst setting.

CORE-17292

* Suggested changes
2025-03-24 22:01:22 +01:00
Daniel Victor
185225a5fc [FREELDR] Pass the correct ACPI table for Windows (#7486)
JIRA issue: CORE-11954 and CORE-18969

This PR passes the real ACPI table instead of a hardcoded (PVOID)1.
2025-03-24 21:49:39 +01:00
Doug Lyons
74599f6c97 [RICHED20] Fix MSVC Wordpad failure after riched20 Wine Sync to 6.10 (#7789)
JIRA issue: CORE-20006

Fix riched20 functionality when compiling with MSVC.
This fixed Wordpad and other programs that depend upon riched20.
2025-03-24 21:38:00 +01:00
Justin Miller
d7db8c9c80 [WIN32SS] Fix the extra VOID amendum to e7a9e7c 2025-03-24 21:32:41 +01:00
Justin Miller
b9b765038e [WIN32SS] Fix an added APIENTRY amendum to e7a9e7c 2025-03-24 21:27:57 +01:00
Justin Miller
e7a9e7ca3d [SDK][WIN32SS] Prepare d3dkmt functions up to Windows Vista (#5612)
Prepare the d3dkmt APIs up to Vista RTM
Build the skeleton needed for having userspace components talk to a WDDM KMD driver

Co-authored-by: Mark Jansen <mark.jansen@reactos.org>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-03-24 21:21:09 +01:00
Denis Robert
818842de06 [BASE] Update French (fr-FR) translation (#7563)
Updates French translation of base folder.
2025-03-24 21:10:02 +01:00
Thomas Faber
1b2eeb23e0 [NTOS:EX] Fix BufferSize validation in NtCreateProfile.
See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/profile/bugdemo.htm
2025-03-24 20:56:30 +01:00
Thomas Faber
11d11f93ee [NTDLL_APITEST] Add tests for NtCreateProfile and NtStartProfile. 2025-03-24 20:56:30 +01:00
Mas Ahmad Muhammad
7b5e004dd6 [SETUP][USETUP] Update Indonesian (id-ID) translation (#7618)
Updating translation for: setup/reactos and setup/usetup.
2025-03-24 20:47:26 +01:00
Serge Gautherie
9ecd5fb6fe [FREELDR] DisplayBootTimeOptions(): Simplify concatenation checks (#4058) 2025-03-24 20:14:04 +01:00
Andrei Miloiu
ecb2293d6d [BUTTERFLIES] Improve Romanian (ro-RO) translation (#7363)
Improvements based on recent Romanian translation document revision 06e89b2.

This file was not translated in Romanian language in any Win version (neither XP/2k3+, nor in the previous ones). I tried to translate this file as close as possible in the way I did in the previous PRs.
2025-03-24 19:09:28 +01:00
Andrei Miloiu
1b63247b81 [DESK] Update Romanian (ro-RO) translation (#7584)
Improvements based on recent Romanian translation document revision 06e89b2.

This file exists in XP/2k3+, but there are many things I didn't find in desk.cpl. I found them in other files like explorer.exe. There were also many items I found nowhere. I tried to translate this file as close as possible in the way I did in the previous PRs.

I also fixed the accelerator collisions and added the missing ones.
2025-03-24 19:07:08 +01:00
Timo Kreuzer
4a5fdb9a3a [RSYM64] Nuke rsym64
It's purpose was to create x64 unwind information from DWARF debug info, but it was never fully working and is pointless now anyway, because x64 GCC does this itself properly.
2025-03-24 18:05:28 +00:00
Andrei Miloiu
5d30831fb8 [SETUP] Update Romanian (ro-RO) translation (#7660) 2025-03-24 19:05:11 +01:00
Justin Miller
35ed79f2d4 [GITHUB] Adjust the pullrequest template to include the buildbot testruns (#7754)
* [GITHUB] Adjust the pullrequest template

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-03-24 18:23:41 +01:00
Mark Jansen
05d71fa69b [CERTUTIL] Add -asn verb 2025-03-24 18:00:06 +01:00
Ethem Çılgın
c35bb8dd73 [EXPLORER] Improve Turkish (tr-TR) translation (#7801)
Adapt Turkish translations from Windows and add the missing ‘Masaüstünü Göster’ translation as in Windows 10.
2025-03-24 14:06:30 +03:00
Katayama Hirofumi MZ
88d9285bd0 [SHELL32] Follow-up of #7805: Improve PathMakeUniqueName (#7809)
JIRA issue: CORE-19278
- Simplify formatString handling.
- Don't use magic number.
- Commonize some code.
2025-03-24 06:23:14 +09:00
Ratin Gao
cfcc8d85b2 [NEWDEV] Fix HardwareId match logic in UpdateDriverForPlugAndPlayDevicesW (#7808)
Match Hardware ID correctly. This fix is required to install the latest (7.1.6) Virtual Box Guest Additions drivers.

- Add Compatible IDs match, call SetupDiGetDeviceRegistryPropertyW twice, once for SPDRP_HARDWAREID and once for SPDRP_COMPATIBLEIDS.
- Use case-insensitive comparison (wcscmp -> _wcsicmp)
- Convert code file to UTF-8 encoding
2025-03-23 02:25:12 +01:00
Doug Lyons
ffa81857c2 [COMCTL32] ReactOS second stage listbox selection fix (#7793)
@I_Kill_Bugs patch
CORE-19814
Check for LBS_NOSEL flag for 'descr->style' in 'LISTBOX_PaintItem' and if FALSE, only then set 'selected'.
2025-03-22 19:33:50 -05:00
Ratin Gao
49a55a099e [SETUPAPI] Refactor SetupInstallServicesFromInfSectionExW (#7770)
Fix `SetupInstallServicesFromInfSectionEx`.

- Call SetupDiSetDeviceRegistryPropertyW only if DeviceInfoSet is valid
- DeviceInfoSet can be INVALID_HANDLE_VALUE, treat this as NULL
- Improve function declaration
2025-03-23 00:39:12 +01:00
Ratin Gao
7a9c744b70 [SETUPAPI] Stub implement SetupQueryInfVersionInformation (#7769)
Sync SetupQueryInfVersionInformation stubs to Wine.

The new synced stubs set ERROR_CALL_NOT_IMPLEMENTED as last error and return, rather than raise exception EXCEPTION_WINE_STUB (0x80000100), then the Virtual Box Guest Addition 7.1.6 setup progress can move on.
2025-03-23 00:17:50 +01:00
Justin Miller
6c7d2a2e25 [SDK] Fix RelWithDebInfo (#7811) 2025-03-22 23:12:52 +01:00
Katayama Hirofumi MZ
386fccd02c [SHELL32][SHELL32_APITEST][SDK] Implement PathMakeUniqueName (#7805)
Sideproduct of #7804. Implementing missing features.
JIRA issue: CORE-19278
- Implement PathMakeUniqueName function.
- Add PathMakeUniqueName prototype to <shlobj.h>.
- Add PathMakeUniqueName testcase to shell32_apitest.
2025-03-22 08:23:24 +09:00
Katayama Hirofumi MZ
6a95219ed3 [REACTOS] Don't use DLL_WINE_PREATTACH macro (#7802)
Related to #7800. Reduce code dependency on Wine.
JIRA issue: CORE-5743
- Wrap DLL_WINE_PREATTACH usage by #ifndef
  __REACTOS__ and #endif.
- Undefine DLL_WINE_PREATTACH macro in
  sdk/include/xdk/winnt_old.h.
2025-03-22 08:04:55 +09:00
Mark Jansen
59f0ec1fdf Update the readme for 0.4.15 2025-03-21 22:39:23 +01:00
Dmitry Borisov
5fb6fad175 [FREELDR] iso.c: Remember the last directory that was accessed (#7734)
This patch reduces the number of sectors read by 709 (from 8788 to 8079)
2025-03-21 22:17:29 +01:00
Dmitry Borisov
564be44f45 [FREELDR] iso.c: Remove a redundant zero initialization of the FileName buffer (#7734)
The FileName buffer is NUL-terminated later on.
2025-03-21 22:17:11 +01:00
Dmitry Borisov
b931c51937 [FREELDR] iso.c: Avoid unnecessary zero-init and copy of the file info structure (#7734)
FileHandle gets initialized completely in IsoSearchDirectoryBufferForFile()

- Also mark some functions as static.
2025-03-21 22:15:54 +01:00
Dmitry Borisov
61ee431169 [FREELDR] iso.c: Cache the PVD information for ISO volumes (#7734)
This patch reduces the number of sectors read by 41 (from 8829 to 8788)
2025-03-21 22:15:43 +01:00
Katayama Hirofumi MZ
2ffc6d281b [BOOTDATA] Follow-up of #7795; Modify NLS registry (#7799)
Follow-up of #7795. This affects
boot condition of es-CR, rm-CH,
ur-PK, fa-IR, vi-VN, ka-GE, bn-IN
and my-MM users.
EDIT: These languages are not
supported in
base/setup/usetup/
muilanguages.h yet.

JIRA issue: CORE-19496

Modify boot/bootdata/hivesys.inf t
o change the values of
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Control\Nls\
Language and HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Control\Nls\
Locale registry keys.
2025-03-22 06:01:56 +09:00
Whindmar Saksit
56e7afe56c [SHDOCVW][SHELL32] Rename RegItem to empty name must reset the name to the default (#7794)
CORE-18839
2025-03-21 13:51:45 +01:00
Katayama Hirofumi MZ
27bb510282 [FREETYPE] Fix WordPad ruler rendering (#7803)
Based on @Doug-Lyons's wordpad-ruler-fix-05.patch.
JIRA issue: CORE-19870
In IntRequestFontSize function, if lfWidth < 10, then
req.width = 0;.

Co-authored-by: Doug Lyons <douglyons@douglyons.com>
2025-03-21 08:52:20 +09:00
Whindmar Saksit
7dc7b866b1 [RAPPS] Don't delete downloaded ZIP/CAB even if configured to (#7791) 2025-03-20 14:32:07 +01:00
Whindmar Saksit
7f49ae633b [SHELL32] Multiple drives property sheet support (#7787)
Supports multiple drives in a single property sheet

CORE-20025
2025-03-20 13:33:51 +01:00
Whindmar Saksit
d769f5675d [RAPPS] Must apply settings changes when a new download folder is created (#7792) 2025-03-19 12:24:52 +01:00
Johannes Anderwald
dba4efbcae [USBCCGP] [USBPORT] USB Stack improvements (#7740)
[USBCCGP]

Ignore invalid devices
Group audio function interfaces together
[USBPORT]

Prevent infinite loop in USBPORT_OpenPipe when endpoint is not becoming ready
2025-03-19 01:35:36 -07:00
Katayama Hirofumi MZ
4bc97ad145 [BOOTDATA] Arabic, Hong Kong, Singapore, come back! (#7795)
JIRA issue: CORE-19496
Modify boot/bootdata/hivesys.inf to change
the values of registry key HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\Control\Nls\Locale.
2025-03-19 09:40:38 +09:00
Whindmar Saksit
4a1877d0f6 [NTDLL][SHLWAPI][SYSDM] ReportAsWorkstation should always override the product type (#7052)
Allows "ROS as a workstation" installs to report itself as a basic server to Win32 applications when the user toggles the sysdm.cpl checkbox (to unchecked in this case).
2025-03-19 00:10:46 +01:00
Daniel Victor
19c1f5661f [BOOTSECT][FREELDR] Fix wrong comment of conditional jump on ext.S and extldr.S (#7798) 2025-03-18 23:52:56 +01:00
Hermès Bélusca-Maïto
2e47094764 [SYSSETUP] Apply theming from unattend files very early on when booting the LiveCD or a new install (#7797)
Use a `[Shell]` section with `DefaultThemesOff` and `CustomDefaultThemeFile`
values, specifying respectively whether to use the classic theme or a
custom one, and the complete path to the custom .theme (or .msstyles) file.

These values are compatible with those documented in the
"MS Windows Preinstallation Reference" help file
of the Windows installation CD (DEPLOY.CAB\ref.chm)

[BOOTDATA] bootcd/unattend.inf: Use the Shell/CustomDefaultThemeFile value to specify which theme to use
2025-03-18 23:02:34 +01:00
Curtis Wilson
8e2d1b358c [PING] Update SendBuffer fill method (#7782)
The ping utility found in various versions of Windows fills the optional
data field in the ICMP echo request structure with ASCII characters from
'a' to 'w' wrapping back around until SendBuffer is full.

Future TO-DO: Compare ReplyBuffer data to SendBuffer.
2025-03-18 22:05:06 +01:00
Dmitry Borisov
787f81f3f5 [FREELDR] Refactor and optimize the IDE driver (#7728)
[DDK] Update IDENTIFY data and other ATA definitions.
Based on the MinGW header.

[FREELDR] Refactor and optimize the IDE driver.
Fix long-standing bugs, which have a negative impact on the boot stability.

- Make the driver more ATA specification compliant.
- Improve the speed of device detection.
- Remove inconsistent delays.
- Support modern hard drives with sector size greater than 512 bytes.
- Add basic error recovery.
- Move private definitions to a separate private header.
- Remove the useless AtaFree API method.
2025-03-18 21:56:25 +01:00
Daniel Victor
ddf55b3772 [BOOTSECT][FREELDR] Rewrite the Ext bootsector (#7544)
Rewrite the Ext bootsector because the older one was broken and had no compatibility with Ext4 extents.
Introduce a 3rd-stage bootsector for complex code.

CORE-14235

- Why was the previous bootsector broken?
  Because of hardcoded inode size, hardcoded freeldr base address, etc.

- Why is there a extldr.sys?
  The extldr.sys was introduced because the limited code space in the bootsector
  prevents adding new features, such as Ext4 full extents support.

- What is extldr.sys and What does it do?
  It is the helper file for the Ext bootsector and that is necessary for adding
  Ext4 support. It locates the freeldr.sys file, loads it into memory and runs it.
2025-03-18 21:53:47 +01:00
Hermès Bélusca-Maïto
7c61e5769f [CONFIGURE] Display the operating system on which the build config takes place (#7774) 2025-03-18 21:39:19 +01:00
Hermès Bélusca-Maïto
9da45923b3 [CONFIGURE] Adjust some echo'ed strings (#7773)
[CONFIGURE.CMD] Use multi-command syntax instead of AND operator for successive echo's
And adjust few strings.

[CONFIGURE.SH] Quote the echo'ed strings, and adjust some of them.
2025-03-18 21:20:32 +01:00
Hermès Bélusca-Maïto
57fa5a22de [GIT] Ensure .sh script files use LF (Unix) line endings (#7772)
For example, this is what's expected by Cygwin (ba)sh on Windows.
2025-03-18 20:17:40 +01:00
Timo Kreuzer
9a093ecbe9 [FREELDR] Fix menu display on VMware
When drawing the menu, the boot options should not be overwritten, but when clearing the screen, everything needs to be drawn, otherwise there will be uninitialized characters at the bottom. See CORE-20014.
2025-03-18 00:36:40 +02:00
Eric Kohl
bcedb5314c [SYSETUP] Set the tcpip service hostname parameter even if the service key does not exist yet 2025-03-16 14:14:58 +01:00
Whindmar Saksit
c6b134123b [SHELL32] Initialize COM for PickIconDlg (#7788)
CORE-20030
2025-03-16 10:09:31 +01:00
Whindmar Saksit
96aa1eee17 [LNKTOOL][SHELL32] Add utility to create/dump .lnk files (#7745)
Unlike mkshelllink, this uses the native COM interface to create the link.
2025-03-15 16:31:22 +01:00
Katayama Hirofumi MZ
75c0dc0cd8 [EXPLORER][COMCTL32][SHELL32] Enable SPI_SETICONTITLELOGFONT (#7783)
Enable desktop icon title font setting.
JIRA issue: CORE-13601
- Forward WM_SETTINGCHANGE message up to
  ListView.
- ListView accepts WM_SETTINGCHANGE message.
- Enable icon spacing.
2025-03-15 09:31:15 +09:00
Hermès Bélusca-Maïto
8e53386de9 [SETUPLIB][REACTOS][USETUP] Don't export setup data. Make IsUnattendedSetup local to the installer. 2025-03-14 21:38:39 +01:00
Hermès Bélusca-Maïto
8d80203d65 [SDK:MC] Fix basic english typos in some messages. 2025-03-14 21:38:38 +01:00
Katayama Hirofumi MZ
135a9a95b8 [DXDIAG] Romanian (ro-RO): Fix unrecognized escape sequence (#7781)
JIRA issue: N/A
Fix IDS_DDPRIMARY_DESCRIPTION
escape sequence.
2025-03-13 22:57:08 +09:00
Katayama Hirofumi MZ
e6302ccd70 [REGEDIT] Reduce flickering and fix rendering (#7747)
JIRA issue: CORE-19970
- Fix status bar toggling.
- Improve behaviour of splitter.
- Add (WS_CLIPCHILDREN |
  WS_CLIPSIBLINGS) style to
  ChildWnd.
2025-03-13 19:33:14 +09:00
Justin Miller
656a5dcc1f [NTOS:KE] Implement KeI386VirtualIntExtensions code paths for INT and IRET. CORE-19049 (#7742)
Co-authored-by: Thomas Faber <thomas.faber@reactos.org>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>

Continued from PR #6070

JIRA issue: CORE-19049
2025-03-12 05:24:36 -07:00
Doug Lyons
5c505d9a9b [NTUSER] Handle window update region larger than the current window in clip region (#7731)
CORE-18206 CORE-18799 CORE-19371

Fixes infinite loop of:
  err: Message WM_PAINT count 1 Internal Paint Set? FALSE

The symptom appears in the following scenario (as reported in CORE-18799):

A program (game) runs at a small resolution (e.g. 640 x 480), but the
game window gets invalidated at a larger size (e.g. 1152 x 864 screen
resolution) before switching to the smaller (640 x 480) size.
Because of this, the window's update region is larger than the current
window so only the 640 x 480 region gets validated leaving the remaining
region invalid. This causes the recurring WM_PAINT messages because there
is no way to invalidate the remaining area.
2025-03-12 12:18:53 +01:00
Hermès Bélusca-Maïto
f37138ce91 [NTOS:OB] Allow ObpCaseInsensitive to be configured via registry (#7751)
This feature can be controlled by the system policy:
"System objects: Require case insensitivity for non-Windows subsystems"
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/jj852277(v=ws.11)

It is also used in conjunction with NTFS to get system-wide filesystem case-sensitivity:
https://www.betaarchive.com/wiki/index.php/Microsoft_KB_Archive/929110

This is controlled with a REG_DWORD value named `ObCaseInsensitive`
inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Kernel` .

Object case (in)sensitivity check is done in the ObpLookupObjectName() helper.
The `ObpCaseInsensitive` variable is used to retrieve the data,
hence it needs to be a ULONG.
2025-03-11 19:15:02 +01:00
Hermès Bélusca-Maïto
c71845ee8c [NTOS:OB] ObpLookupEntryDirectory(): SearchShadow is a BOOLEAN 2025-03-11 19:12:36 +01:00
Hermès Bélusca-Maïto
bc62c17a7f [KERNEL32][NTDLL][NTOS][WIN32K] Fix and sync the exports for RtlUnwindEx and RtlVirtualUnwind (#7749) 2025-03-11 18:59:22 +01:00
Ratin Gao
275c40d26d [CRYPT32] Initial implementation of CertEnumSystemStoreLocation() (#7746)
Initial implementation of `CertEnumSystemStoreLocation`, which is required by the latest "VirtualBox Guest Additions".

This function returns 8 fixed hard-coded system stores and registered OID system stores, this PR didn't implement the latter because `CryptEnumOIDFunction` is unimplemented, marked as FIXME.
2025-03-11 14:17:38 +01:00
Miguel Almeida
b45debb93a [COMCTL32] Fix shift-selecting files not working as expected in small/large icons views (#7729)
CORE-10386

Fixes the behavior when selecting multiple files in a folder with the Shift key, while using either the Large Icons or Small Icons view, so that it is consistent with how it works on Windows.

Proposed changes:
Disable the specialized code for these views in LISTVIEW_SetGroupSelection, using the same code as for the list and details views, which also works fine for them.
2025-03-11 13:49:39 +01:00
Owen Utley
14f8f7e3bd [THEMES][MIZU] New bitmaps to replace old Lautus ones (#7775) 2025-03-11 12:04:53 +03:00
Dmitry Borisov
029e53ddb5 [MINIHAL] Minor improvements (#7398)
* [FREELDR] Mark noreturn functions

* [FREELDR] Compile hw debugging support code only in debug builds

- Make BREAKPOINT() portable

* [FREELDR] Consolidate identical names into a single string

* [FREELDR] Use intrinsics for string I/O operations on x86 and x64

Stop them being pulled in from a static minihal library

* [MINIHAL] Exclude unnecessary portio dependency
2025-03-11 10:30:14 +03:00
Whindmar Saksit
0089017d54 [SHELL32] Don't close icon dialog when selecting from autocomplete (#7766) 2025-03-09 22:00:16 +01:00
Whindmar Saksit
5af47c9baf [BROWSEUI] Set AddressBand Go button checkbox state correctly in menu (#7771)
CORE-20018
2025-03-09 21:59:03 +01:00
Whindmar Saksit
5461abeeba [SHELL32][SHELL32_APITESTS] SHDefExtractIcon zero icon size as sysmetric (#7768) 2025-03-09 15:41:53 +01:00
Justin Miller
bdda5b93d7 [PSAPI][KERNEL32] Convert the PSAPI exports to a static library (#7708)
This behavior is straight out of win7 where this logic was moved to
KernelBase and friends. Required for thousands of apps. But also just
preps for the KernelBase sync from Wine-10

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2025-03-09 04:09:59 -07:00
Justin Miller
6dccccc2a3 [USER32_VISTA][USER32] Sync some parts with WINE-10.0 2025-03-09 04:07:55 -07:00
Justin Miller
245513e7ec [USER32_VISTA] Import input.c misc.c win.c from wine-10.0 2025-03-09 04:07:55 -07:00
Katayama Hirofumi MZ
1786a68256 [EVENTVWR] Localize and check item count (#7757)
Don’t display garbage to the users.
JIRA issue: CORE-19786
- Localize message text by using
  newly added
  IDS_CONTFROMBEGINNING
  and IDS_CONTFROMEND
  resource strings.
- Check item count before
  showing next/previous item.
- Add EnableEventDetailsButtons
  function.
2025-03-09 06:55:05 +09:00
Katayama Hirofumi MZ
0898bd371d [CURSOR] Add Cursor AI project settings (#7752)
AI-friendly development for the future.
JIRA issue: CORE-20011
- Reduce time and cost on using Cursor AI.
- Improve interoperability with Cursor AI.
- Add .cursor folder and some files.
- Modify .gitignore.
2025-03-08 22:35:40 +09:00
Whindmar Saksit
f844296b0a [BROWSEUI][SHELL32] Fix FindFolder icons (#7756)
- Shortcut icons require the correct IShellFolder because it needs the full path.
- Items in a drive root needs the final backslash to be part of the path.

CORE-18692
2025-03-08 14:30:04 +01:00
Whindmar Saksit
acbadb9fba [USER32] PrivateExtractIcons must return 0 for empty files (#7767)
This bug breaks the documented S_FALSE return value for SHDefExtractIconW when the icon is not found.
2025-03-08 13:34:23 +01:00
Katayama Hirofumi MZ
d1d300b44b [REACTOS] Add CODING_STYLE.md (#7753)
JIRA issue: CORE-20011
- Add CODING_STYLE.md at the root
  directory.
- This CODING_STYLE.md is generated
  from HTML text of
  https://reactos.org/wiki/Coding_Style
2025-03-08 18:57:17 +09:00
Katayama Hirofumi MZ
115cf65ebf [EVENTVWR] Reduce lines (#7758)
JIRA issue: N/A
- Reduce lines in InitInstance function.
2025-03-07 07:06:38 +09:00
Katayama Hirofumi MZ
13894e2da0 [SNDVOL32] Improve Japanese (ja-JP) translation (#7765)
JIRA issue: CORE-18706
2025-03-06 20:26:18 +09:00
Katayama Hirofumi MZ
b728d330c2 [SHUTDOWN] Improve Japanese (ja-JP) translation (#7764)
JIRA issue: CORE-18706
2025-03-06 20:14:24 +09:00
Katayama Hirofumi MZ
02acdae022 [MSCONFIG] Add Japanese (ja-JP) translation (#7763)
JIRA issue: CORE-18706
2025-03-06 19:56:32 +09:00
Katayama Hirofumi MZ
cf96d9175f [MPLAY32] Improve Japanese (ja-JP) translation (#7762)
JIRA issue: CORE-18706
2025-03-06 19:41:33 +09:00
Katayama Hirofumi MZ
118940ed9a [DRWTSN32] Add Japanese (ja-JP) translation (#7761)
JIRA issue: CORE-18706
2025-03-06 19:33:03 +09:00
Katayama Hirofumi MZ
5c8d677356 [FINDSTR] Add Japanese (ja-JP) translation (#7760)
JIRA issue: CORE-18706
2025-03-06 19:27:08 +09:00
Katayama Hirofumi MZ
84f3a2b1d1 [SERVMAN] Update Japanese (ja-JP) translation (#7759)
JIRA issue: CORE-18706
2025-03-06 19:20:04 +09:00
Whindmar Saksit
fc6330a01a [SHDOCVW] Don't show create shortcut context menu item in Explorer tree (#7735) 2025-03-05 13:41:02 +01:00
Whindmar Saksit
4a0f0ddbd7 Implement GetDefaultColumn and GetClassID (#7750) 2025-03-05 13:40:10 +01:00
Justin Miller
a8cd1eac1d [NTDLL] Fix Vista+ stubs (#7672)
Mostly based on Windows 11 22H2 and Vista SP2 and WINE-10.0

Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
Co-authored-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2025-03-05 01:24:22 -08:00
Timo Kreuzer
c6853581c5 [NTOS:MM] Fix broken ASSERT
There is no guarantee that all pages in the requested range actually exist.
2025-03-04 15:24:53 +02:00
Ratin Gao
4d605ec26f [NTOS:MM:PS] Little fixes for NTDLL loading (#7707)
- [NTOS:PS] `STATUS_INVALID_IMAGE_PROTECT` returned by `MmCheckSystemImage` should be a fatal error too.
- [NTOS:PS] Fix object attributes for opening NTDLL.
- [NTOS:MM] Remove `MmCheckSystemImage` unused parameter.
- [NTOS:MM] Inline `MmVerifyImageIsOkForMpUse` in `MmCheckSystemImage`, reducing a call to `RtlImageNtHeader`.
2025-03-03 20:36:21 +01:00
Hermès Bélusca-Maïto
7c23a2e38e [NTOS:MM] Split MmVerifyImageIsOkForMpUse() into an auxiliary inlined helper.
This helper is used when an existing NtHeader is already available.
2025-03-03 20:30:54 +01:00
Ratin Gao
ccf1e97aa1 [NTDLL_VISTA:LDR] Implement DLL Notification (#6795)
Implement DLL Load Notification, an NT6+ feature.
https://learn.microsoft.com/en-us/windows/win32/devnotes/dll-load-notification

- [RTL] Sync `RTL_STATIC_LIST_HEAD` and `RtlFailFast` from XDK to NDK.
- [NTDLL_VISTA] Introduce ntdll_vista_static static library and link both ntdll_vista and ntdll to it.
- [NDK][LDR] Add and fix DLL Notification definitions.
- [NTDLL_VISTA] Code improvements.
- [NTDLL_VISTA:LDR] Implement Dll Notification.
- [NTDLL][NTDLL_APITEST] Add Dll Notification API test.
2025-03-02 21:13:33 +01:00
Miguel Almeida
6988b4e2c4 [EXPLORER] Add Show Desktop button to taskbar customization preview (#7727)
Use a 4D lookup table for the notification area settings preview, instead of many if cases.

CORE-19738
2025-03-02 20:56:30 +01:00
Daniel Victor
afb96acfdd [FREELDR] Use the OFF(x) macro on realmode assembly files 2025-03-02 19:09:46 +01:00
Daniel Victor
9c5efed7da [ASM] Move OFF(x) macro from asmxtras.inc to asm.inc 2025-03-02 19:09:46 +01:00
Max Korostil
606e996e1f [UNIATA] Fix memory corruption if SCSIOP_SERVICE_ACTION16 processed. (#7717)
Reason: the size of `READ_CAPACITY16_DATA` struct in UniATA driver and ReactOS/Windows SDK were not equal.

- In UniATA driver: `sizeof(READ_CAPACITY16_DATA) == 33` (wrong);
- In ReactOS/Windows SDK: `sizeof(READ_CAPACITY16_DATA) == 32` (correct).

CORE-19696
2025-03-02 19:07:34 +01:00
Andrei Miloiu
e36c669d97 [DXDIAG] Update Romanian (ro-RO) translation (#7359)
Improvements based on recent Romanian translation document revision 06e89b2.

This file was not translated in Romanian language in any Win version (neither XP/2k3+, nor in the previous ones). I tried to translate this file as close as possible in the way I did in the previous PRs.
2025-03-02 17:33:34 +01:00
Eric Kohl
da5192e622 [BOOTDATA][NETSHELL][INF] Improvements to the network setup
- Fix the network setup wizard start page.
- Add the ndisuio driver to the network setup.
- Remove the tcpip driver from the system setup.
2025-03-02 15:07:36 +01:00
Whindmar Saksit
f1a66daeeb [SHELL32] Display cut items as ghosted (#7739)
- When Ctrl+X is pressed on a selected item, it will appear ghosted until another clipboard action takes place.
- Generate SHCNE_UPDATE* notifications when file attributes change.
- When an items hidden attribute is changed (filesystem notification), we must update the ghosted state.

CORE-9465
2025-03-02 13:07:23 +01:00
Eric Kohl
c3505bb4f6 [NETSHELL] Reverted the removal of the unattended setup support for the network settings page.
I removed the unattended setup support by accident.
This should fix our automatic tests.
2025-03-02 13:01:58 +01:00
Eric Kohl
abb04ec321 [NETSHELL] Fix build error 2025-03-02 10:28:13 +01:00
Eric Kohl
6b9122b5f5 [NETSHELL][SYSSETUP] Move network installer code to the network setup wizard pages
- Add a new page to the network setup wizard that installs the required network components in a background thread.
- Remove the network setup code from syssetup.dll.

TODO: Move the network setup code for the LiveCD.
2025-03-02 09:53:06 +01:00
Timo Kreuzer
a86055a037 [COMCTL32_APITEST] Rename a test
The test name was conflicting with an existing winetest, which breaks testman.
2025-03-01 19:01:21 +02:00
Eric Kohl
7f248437e8 [NETCFGX] Simple implementation of INetCfgClassSetup.Install()
Import device installer code from syssetup.dll.
This is the first step to move the network component installer code from syssetup.dll to netcfgx.dll and netshell.dll.
2025-03-01 15:43:34 +01:00
Whindmar Saksit
9a55c931f8 [BROWSEUI][SHELL32] Fix desktop and computer find files locations (#7721)
- Searching the Desktop now searches the two desktop folders.
- Searching My Computer now searches all local disks.
- Adds a "Browse..." entry to the combobox list.
2025-02-28 18:52:48 +01:00
Whindmar Saksit
556cc8a7b2 [BROWSEUI] Set find files pane focus (#7722)
CORE-16424
2025-02-28 16:57:08 +01:00
Whindmar Saksit
a236c39ee5 [RAPPS] Added option to display small application icons (#7723) 2025-02-23 19:27:02 +01:00
Whindmar Saksit
46d01bc7fd [SHIMGVW] Only enable toolbar edit and print buttons if the shell verb exists (#7725)
CORE-20002
2025-02-23 14:08:36 +01:00
Whindmar Saksit
e5fc4de8c9 [SHELL32] Handle multiple files in recycle bin delete/restore operations (#7568)
CORE-19895 CORE-19231
2025-02-22 13:03:11 +01:00
Whindmar Saksit
924592dc47 [DESK] Don't include .ico files in list of wallpapers (#7726)
CORE-20003
2025-02-22 13:01:32 +01:00
Daniel Victor
56c8c8ab4f [FREELDR] Add Extents support 2025-02-20 19:28:41 +02:00
Daniel Victor
a980ad08b4 [FREELDR] Rewrite the header and reformat/adapt current code 2025-02-20 19:28:41 +02:00
Daniel Victor
1f3083be75 [FREELDR] Rename almost everything to Ext 2025-02-20 19:28:41 +02:00
Daniel Victor
d0dfb6cf6f [FREELDR] Rename the ext2.* to ext.* 2025-02-20 19:28:41 +02:00
Doug Lyons
601646e3b0 [RICHED20] Sync to Wine-6.10 (#7713)
* Restore cherry picked commit limiting tab stops in para.c
* Add 'remove_definitions(-D_CRT_NON_CONFORMING_SWPRINTFS)' to CMakeFiles.txt.
Restore para.c to standard conforming 'swprintf'.

CORE-6727
2025-02-19 22:02:06 -06:00
Whindmar Saksit
ae79d1af90 [COMCTL32] ListView LVIS_CUT image does not depend on focus (#7724)
Also undoes flicker caused by PR #4218.
2025-02-19 15:26:49 +01:00
Whindmar Saksit
88f105e184 [GDIPLUS] Identify .ico codec format as ImageFormatIcon (#7714) 2025-02-18 13:24:51 +01:00
Whindmar Saksit
f3c750787b [RAPPS] Ask user if they want to run the zip app they just installed (#7719)
After the zip has been installed, ask the user if they want to run the extracted application.
2025-02-18 13:23:25 +01:00
Whindmar Saksit
705a985789 [COMCTL32][COMCTL32_APITEST] Implement ImageList Get/SetFlags and the system flag (#7701)
The shell needs to be able to change the color depth of the system image lists on the fly and it does that by changing the ILC_COLOR* flags.
2025-02-17 13:46:20 +01:00
Eric Kohl
47bae01cfa [NETCFGX][PSDK] Add the interfaces INetCfgClass and INetCfgClassSetup
This will enable us to install networking drivers and services properly.
2025-02-16 21:23:12 +01:00
Doug Lyons
45ed1a9b6d [UCRT] Fix MSVC compiling on VS 2017 after Timo's UCRT commits (#7718)
CORE-19996
Verified using https://godbolt.org.
2025-02-15 20:03:52 -06:00
Whindmar Saksit
a1157f86f2 [SHELL32] OpenWith should use dll path instead when the command starts with rundll32 (#7712)
CORE-16980
2025-02-15 14:27:51 +01:00
Whindmar Saksit
396249d9e0 [APPWIZ] Don't set the .lnk filename as the shortcut comment (#7720) 2025-02-15 14:17:01 +01:00
Katayama Hirofumi MZ
ac175b23b7 [WALLPAPERS] Retire using ugly filenames (#7716)
JIRA issue: CORE-19989
- Rename wallpapers filenames.
- Adapt CMakeLists.txt and
  ReadMe.txt to renaming.
2025-02-15 20:58:09 +09:00
Whindmar Saksit
bc52d5f1f4 [SHIMGVW] Display shell context menu for the image on right-click (#7711)
CORE-13340
2025-02-13 13:13:02 +01:00
Whindmar Saksit
329a414584 [SHIMGVW] Choose a better icon image and also support .cur files (#7706)
- Choose an icon image based on size and color and place it first so GDI+ will pick it
- Change .cur files to .ico so GDI+ can open it

CORE-19945
2025-02-12 20:57:51 +01:00
Timo Kreuzer
166d83b206 [CRT] Fix cvt to not overflow the buffer on NAN/INF
Fixes crash in msvcrt_winetest printf
2025-02-12 16:54:45 +02:00
Timo Kreuzer
4a63e19e47 [MSVCRT_WINETEST] Add checks to not crash on reactos 2025-02-12 16:54:45 +02:00
Timo Kreuzer
748fdbcd6a [MSVCRT_WINETEST] Fixes for windows 2003 2025-02-12 16:54:45 +02:00
Timo Kreuzer
063c818c72 [MSVCRT_WINETEST] Sync to wine-10.0 2025-02-12 16:54:45 +02:00
Timo Kreuzer
736fea6c44 [CRT] math.h: fix definition of NAN
- Use positive NAN by default
- add support for _UCRT_NEGATIVE_NAN to legacy CRT headers
- Use __builtin_nanf() on GCC/Clang
2025-02-12 16:54:45 +02:00
Timo Kreuzer
2fca81eca8 [WINE] test.h: Add wait_child_process 2025-02-12 16:54:45 +02:00
Timo Kreuzer
c150c0a456 [MSVCRT] Export _get_heap_handle 2025-02-12 16:54:45 +02:00
Timo Kreuzer
05dfc83df5 [NDK] Add FILE_MODE_INFORMATION 2025-02-12 16:54:45 +02:00
Justin Miller
3368adc547 [POWRPROF] Sync Powrprof to WINE-10.0 - Add some functions too (#7681)
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>

"Sync" to WINE-10.0, plus add some functions we need. Required for various apps going forward.
2025-02-11 17:33:45 -08:00
Denis Malikov
28b802b229 [COMCTL32] fix version number reading/writing image lists and counting pointers for mixing image & mask 2025-02-09 12:15:51 -08:00
Whindmar Saksit
e4216bd015 [SHELL32] Expand .lnk working directory string before checking if it's valid (#7710)
Handles the case where SEE_MASK_DOENVSUBST will expand it later inside ShellExeute.

CORE-19987
2025-02-09 20:07:17 +01:00
Doug Lyons
364d6e0346 [RICHED20_WINETEST] Sync to Wine-6.10. (#7692)
ROSTESTS-398 and CORE-6727
2025-02-08 13:04:04 -06:00
Whindmar Saksit
dd34ad7037 [SHIMGVW] Fixes and enhancements (#7705)
Fixes:
- Reduce flicker when resizing main window
- Fixed slideshow starting with 1x1 pixel image zoom
- Don't reset zoom levels > 100% when resizing main window
- Always retain an active window on toggle slideshow (show/hide actions order)
- Enable/disable real-size button as required
- Correctly handle accelerators in main window after slideshow has been closed
- Use same zoom shortcuts as NT6

New features (unique to ROS):
- Fullscreen mode (slideshow mode but without timer)
- Alt+Enter or double-click to toggle fullscreen mode
- Shift +/- to change fullscreen slideshow next picture timer

CORE-19358
2025-02-08 16:22:20 +01:00
Mikhail Tyukin
2d1144a5cd [PROPSYS] Sync to wine-10.0 (#7677)
[WINESYNC] propsys/tests: Merge test files.
wine commit id d189b55d2ffb038474cb6656dc8743eb34c35a3d by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] propsys: Add a semi-stub for PSCreatePropertyStoreFromObject().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47958
wine commit id acb2e4fc7a4242c74ac91657edb97bf1e402656a by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] propsys: Allow only ASCII digits in PSPropertyKeyFromString.
wine commit id 6e8c2d836e637e1fbd83c231cfd846ecb9333964 by Jacek Caban <jacek@codeweavers.com>

[WINESYNC] propsys/tests: Get rid of strcmp_wa().
wine commit id 2340212ee9c48c731c85bbad8c81ed833458bf15 by Michael Stefaniuc <mstefani@winehq.org>

[WINESYNC] propsys: Use wide-char string literals.
wine commit id b72440fa2e1016681cbfcebcdc4792b6ced3eb53 by Michael Stefaniuc <mstefani@winehq.org>

reduce wine diff and add stuff from previous commit

[WINESYNC] propsys: Use --prefer_native instead of DLL_WINE_PREATTACH.
wine commit id f99113192ffac37506a905827415d3d21d0ebbf8 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] propsys: Use nameless unions.
wine commit id 1d8e5079f0e53a767a783e5107f57f04c1897951 by Jacek Caban <jacek@codeweavers.com>

[WINESYNC] propsys/tests: Use nameless unions.
wine commit id 497de3cc19f971808ca4105f52038e61dc818db1 by Jacek Caban <jacek@codeweavers.com>

[WINESYNC] winecrt0: Add a default implementation for DllCanUnloadNow().
wine commit id bd6b53740c28c6974300e15f965c12feb0252085 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] winecrt0: Add a default implementation DllRegisterServer()/DllUnregisterServer().
wine commit id 5d82baf9747b7b133cad3be77c0cc9e24cc09582 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] propsys: Add support for VT_VECTOR|VT_UI1 type in PropVariantCompareEx().
wine commit id e91b05bb5be6fd70a767bea9991e818a49cc5547 by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] propsys: Fix VT_UI4 comparison, use ulVal instead of uiVal.
wine commit id 58eeb1a86433db1104d3a9ccf9ad7435ec81443a by Rémi Bernon <rbernon@codeweavers.com>

[WINESYNC] propsys/tests: Add a VT_UI4 test for PropVariantCompareEx().
A test for 58eeb1a86433db1104d3a9ccf9ad7435ec81443a.
wine commit id 10359e17ce64f39461a7b7b54f73857e6458d1fb by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] propsys/tests: Avoid "misleading indentation" warnings.
wine commit id 7cd6681b3be35cf6c02f056cb5131c90c0674c16 by Fabian Maurer <dark.shadow4@web.de>

[WINESYNC] propsys: Enable compilation with long types.
wine commit id a9c797e4538a37716e62bb81c3fed3de39561b41 by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] propsys/tests: Enable compilation with long types.
wine commit id c1c393595d43bd95390d3ddf86dcbc46bc4f52ba by Eric Pouech <eric.pouech@gmail.com>

[WINESYNC] propsys: Implement InitVariantFromFileTime.
wine commit id f2b8ccb7b0b22b7b5d661d908f8f8ee02f22647d by Daniel Lehman <dlehman@esri.com>

[WINESYNC] propsys/tests: Add some InitVariantFromFileTime tests.
wine commit id 083dea7fce4372840ac18176496a7d05dadd5ad8 by Daniel Lehman <dlehman@esri.com>

[WINESYNC] propsys: Implement VariantToStringWithDefault.
wine commit id bf0f1fdcf80657a42116b79a0953181191cf9221 by Mohamad Al-Jaf <mohamadaljaf@gmail.com>

[WINESYNC] propsys/tests: Add VariantToStringWithDefault tests.
wine commit id 89aba13dc381dbbda62d1019e1af2af5a589b0cf by Mohamad Al-Jaf <mohamadaljaf@gmail.com>

[WINESYNC] include: Add Stg functions declaration in propvarutil.h.
wine commit id 0d294ad26544913414277daa164004d731ae6e33 by Biswapriyo Nath <nathbappai@gmail.com>

[WINESYNC] propsys: Add InitPropVariantFromStringVector().
wine commit id 3a1146d8e63d7ceff38441fee08f7f7080527020 by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] Remove unused NONAMELESS defines.
wine commit id 20afe438320f77d103a96d1d8cd562d0899ebac7 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] propsys: Partially implement VariantToString().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55708
wine commit id f7ef02bd8f74ea052d61e48cd84b226d8a5867a8 by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] propsys: Handle VT_I4 type in VariantToString().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55708
wine commit id 001e0543bfd5aea060053af0c76233bb90fbb43b by Nikolay Sivov <nsivov@codeweavers.com>

[WINESYNC] propsys: Implement PropVariantToUInt32WithDefault.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55713
wine commit id d177709b10ce07ddd234b0e8e00764ae4b1d8488 by Fabian Maurer <dark.shadow4@web.de>

[WINESYNC] include: Use proper dllimports for propsys functions.
wine commit id f0b2e0d00c86fb04d47467f39e49c587250ffec5 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC] propsys: Remove DECLSPEC_HIDDEN usage.
wine commit id e9ff53e098ef3871d692c7b907151cfbb2f0673f by Alistair Leslie-Hughes <leslie_alistair@hotmail.com>

Update propsys_private.h

[WINESYNC] propsys: Force debug info in critical sections.
wine commit id 67bea281cc851eda6a08430c70f6c9e848d3fbe1 by Paul Gofman <pgofman@codeweavers.com>

[WINESYNC] include: Fix typos in IID_IPropertyEnumType2 and CLSID_PropertySystem.
wine commit id 66e6b61705a66459ed3a9e0cf9457d8b180e4564 by Alfred Agrell <floating@muncher.se>

[WINESYNC] propsys: Add stubs for variant conversion functions.
wine commit id c21f04f7adaa4a8d0ca2d2659bf9a6facdc168c3 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys/tests: Add tests for VariantToPropVariant.
wine commit id 8877889f2a8e36d22dcad061e6da84476efb3750 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Initially implement VariantToPropVariant.
wine commit id 6985637ed59e81e7d1716095a343cc5681082306 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys/tests: Add tests for PropVariantToVariant.
wine commit id 3277de5572b7f6c41ebeeb89f781e378a6a2c2d3 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys/tests: Test converting clsid to string.
wine commit id 7a4f9f83c51883f41ae1363e27700452472ec18f by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Support converting clsid to string for PropVariant.
wine commit id 67b097ff46c65d525de6a7f560f019de6828320c by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Initially implement PropVariantToVariant.
wine commit id 808b398549350fffc9fc023d637ef8de9e4bba37 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Add PropVariantToBSTR stub.
wine commit id 86558a4b83ebf9a0c6e76888a3d0f3fe3e36bf57 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys/tests: Test PropVariantToBSTR.
wine commit id b4ac03f1f622120906a8b6e691caa05f6539c2dd by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys/tests: Test truncating for PropVariantToString.
wine commit id df16802582a56f8076ebbcf9cb6178f65bb8b9b6 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Implement PropVariantToBSTR.
wine commit id 66220be403ce5c3634c13da3546f0c19f04059cc by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Use debugstr_variant for the trace in VariantToPropVariant.
wine commit id 3517aded4090229dbb11e413bde8349d1eca0be3 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys: Support converting to BSTR for PropVariantToVariant.
wine commit id c33fdc27650045a754a05a8f25e250e6e72c8072 by Ziqing Hui <zhui@codeweavers.com>

[WINESYNC] propsys/tests: Fix a test that fails on some Windows versions.
wine commit id c09f828f43101cf2dfe11d7e13f1fc6ef4b19853 by Alexandre Julliard <julliard@winehq.org>

[WINESYNC]: propsys is now in sync with wine-staging wine-10.0
Co-authored-by: winesync <ros-dev@reactos.org>

[PROPSYS] Remove duplicate uuid

[PROPSYS] Fix headers/idl file
2025-02-07 22:00:48 +01:00
Whindmar Saksit
5bc6d59142 [RAPPS] Refresh item info after installer completes (#7697)
- Refresh the details view of the item that was just installed.
- Hint update of uninstallers list is needed.
- Restore focus correctly after installer process finishes.

CORE-17677
2025-02-07 21:33:19 +01:00
Thamatip Chitpong
a610016952 [WINVER] Display compatibility information (#7661)
Also don't hardcode the OS name. This make it compatible with Windows.
2025-02-08 00:05:03 +07:00
Mikhail Tyukin
197ed01e95 [WINDOWSCODECS][WINDOWSCODECSEXT] Sync to wine-10.0 (#7665) 2025-02-07 16:57:02 +01:00
Mikhail Tyukin
41d1898fcd [LIBJPEG][LIBPNG][LIBTIFF] Add .spec files (#7665) 2025-02-07 16:57:01 +01:00
Hermès Bélusca-Maïto
468a9787d1 Revert "[USER32][LIBPNG] Support PNG/Vista icons (#7704)"
This reverts commit 7f4708479d.

- PR was still in review;
- Doug has commit access himself.
2025-02-07 15:20:05 +01:00
Doug Lyons
7f4708479d [USER32][LIBPNG] Support PNG/Vista icons (#7704)
Add PNG (NT6/Vista+) support.
JIRA issue: CORE-18385
- Change libpng to add IMPORTLIB libpng.spec
  to allow linking to it in USER32.
- Add code into mostly cursoricon.c to support
  PNG icons.
2025-02-07 23:12:32 +09:00
Katayama Hirofumi MZ
22577aed85 [NTUSER][USER32] Support GetWindow.GW_ENABLEDPOPUP (#7700)
JIRA issue: CORE-6920
- Make the return value of
  NtUserCallHwnd a DWORD_PTR.
- Add DWP_GetEnabledPopup
  helper function in
  win32ss/user/ntuser/defwnd.c.
- Add code to NtUserCallHwnd for
  HWND_ROUTINE_DWP_GETENABLEDPOPUP.
- Add code to GetWindow for
  GW_ENABLEDPOPUP.
- Set last error in GetWindow and
  IntGetWindow.
2025-02-07 07:31:08 +09:00
Eric Kohl
2d8a2944ba [SYSSETUP] Add the type library registration to the Register Components task on the process page 2025-02-06 23:14:28 +01:00
Katayama Hirofumi MZ
d969be0fb4 [SHDOCVW_APITEST] Add WinList testcase (#7702)
JIRA issue: CORE-9368
- Add WinList testcase for
  CLSID_ShellWindows class
  and shdocvw!WinList_*
  functions.
2025-02-06 22:07:56 +09:00
Timo Kreuzer
92d479a54b [VCRUNTIME] Add initialization / cleanup of wine code 2025-02-06 09:17:37 +02:00
Timo Kreuzer
32c349d30e [VCRUNTIME] Add TLS callback support 2025-02-06 09:17:37 +02:00
Timo Kreuzer
7f050e0a6d [VCRUNTIME] Improve includes in internal_shared.h 2025-02-06 09:17:37 +02:00
Timo Kreuzer
a978879ddb [VCSTARTUP] Implement (w)mainCRTStartup
__acrt_initialize is here as a stub to later support linking ucrt statically. When it is statically linked the real function should be called, but when the executable links to ucrtdll, the initialization happens when the DLL is loaded, so we call a stub here.
2025-02-06 09:17:37 +02:00
Timo Kreuzer
d243b6cdf3 [VCRUNTIME] Implement __std_terminate() 2025-02-06 09:17:37 +02:00
Timo Kreuzer
9186b861a6 [VCRUNTIME][VCSTARTUP] Add separate vcruntime and vcstartup lib
vcruntime contains the code that is linked into ucrtbase (in VS it is also provided as vcruntime140.dll)
vcstartup contains the code that is statically linked into executables that link to ucrtbase.dll. In Visual Studio this is part of msvcrt.lib (the import library for msvcrt), similar to our current msvcrtex, and it gets linked when you link to ucrtbase as well. The name is based on the folder name in the library.
Both libraries share some code, but each file is only compiled once.
2025-02-06 09:17:37 +02:00
Max Korostil
2b2bdabe72 [RTL][NTDLL_APITEST] Fix buffer overflow in RtlDosSearchPath_Ustr (#7698)
In addition:
- `IS_PATH_SEPARATOR(*--End)` -> `--End; IS_PATH_SEPARATOR(*End)` fix,
- Use SIZE_T type for `WorstCaseLength` and `NamePlusExtLength`.
2025-02-05 21:17:11 +01:00
Timo Kreuzer
a1a169fbe8 [FREELDR] Fix pc98 build 2025-02-04 16:45:48 +02:00
Timo Kreuzer
2b71c738b8 [ROSLOAD] Enable registry healing code for x64 2025-02-04 16:45:48 +02:00
Timo Kreuzer
e56911f66b [FREELDR] Implement loading of rosload as 2nd stage loader 2025-02-04 16:45:48 +02:00
Timo Kreuzer
adacd51a30 [FREELDR] Use StallExecutionProcessor instead of KeStallExecutionProcessor
The latter will only be available in rosload.exe.
2025-02-04 16:45:48 +02:00
Timo Kreuzer
78ded05547 [MINIHAL] Move the definition of _MINIHAL_ to directory scope
This is required, so that the definition is available when preprocessing asm files on MSVC builds. Otherwise systimer.s will contain KeStallExecutionProcessor, which must not be used in freeldr.
2025-02-04 16:45:48 +02:00
Timo Kreuzer
3d516e71d3 [USETUP] Install rosload.exe 2025-02-04 16:45:48 +02:00
Timo Kreuzer
17cf47df44 [ROSLOAD] Add rosload.exe target as 2nd stage loader 2025-02-04 16:45:48 +02:00
Timo Kreuzer
ebcf3f23aa [FREELDR] Remove ShowBootOptions from Menu code
This removes a dependency of UI code to boot options code by getting rid of a call to DisplayBootTimeOptions() from within the menu code.
Instead this is now handled by MainBootMenuKeyPressFilter.
2025-02-04 16:45:48 +02:00
Timo Kreuzer
9daef292e9 [FREELDR] Move MachInitializeBootDevices to BootMain 2025-02-04 16:45:48 +02:00
Timo Kreuzer
f81c1910ee [FREELDR] Export functions for a 2nd stage loader 2025-02-04 16:45:48 +02:00
Timo Kreuzer
2f9dde09e1 [FREELDR] Replace some macros/inline functions and global variables with functions
This allows to easily import them from a 2nd stage loader without having to bother about _declspec(dllimport)
2025-02-04 16:45:48 +02:00
Timo Kreuzer
aa46e0f0a7 [RTL/x64] Fix a bug in RtlpUnwindInternal
Check if the stack pointer is out of bounds, before trying to unwind a frame. This will not fix any crashes, but it prevents simple crashes from going into a recursive exception.
2025-02-04 09:00:35 +02:00
Vitaly Orekhov
7215e542b1 [CMAKE] Fix compiling i386 targets via x64 clang-cl 2025-02-03 21:38:02 +02:00
Hermès Bélusca-Maïto
97ea95c80c [SDK:BUGCODES] Remove inaccurate description of CREATE_DELETE_LOCK_NOT_LOCKED
The description had nothing to do with CREATE_DELETE_LOCK_NOT_LOCKED,
but instead was for EMPTY_THREAD_REAPER_LIST. And even so, descriptions
for both of these BSOD codes have been removed in official MS Windows
2000 and beyond.

Regarding the Thread Ripper:
https://devblogs.microsoft.com/oldnewthing/20231031-00/?p=108944
2025-02-03 17:04:10 +01:00
Václav Zouzalík
9ba2c794db [SOLITAIRE] Update Czech (cs-CZ) translation (#7451) 2025-02-03 13:11:32 +01:00
Václav Zouzalík
9164e9f85f [RAPPS] Update Slovak (sk-SK) translation (#7450) 2025-02-03 13:05:03 +01:00
Philippe Morin
2cdcb1f857 [SHELL32] Improve French (fr-FR) translation (#7699)
Change "New" by "Nouveau".
2025-02-03 13:00:03 +01:00
Jose Carlos Jesus
c3408740b0 [SHLWAPI] Remove accelerator keys from Ok and Cancel buttons (#7690) 2025-02-03 12:59:41 +01:00
Jose Carlos Jesus
a07a35d0f6 [SHIMGVW] Update Portuguese (pt-PT) translation (#7688)
And add file header.
2025-02-03 12:59:22 +01:00
Eric Kohl
9c8ef7369f [e1000][ne2000][pcnet][rtl8139] Add missing UpperRange and LowerRange values to network adapter inf files
These values will be used for binding network adapters to protocol drivers. Right now we use hard-coded binding.
2025-02-03 01:15:10 +01:00
Oleg Dubinskiy
a8669e023a [NTOS:IO] Rewrite OpenRegistryHandlesFromSymbolicLink
Also add a new IopOpenOrCreateSymbolicLinkSubKeys routine, which does some work for it.
CORE-17361
2025-02-02 23:30:38 +01:00
Oleg Dubinskiy
d617c8cf32 [NTOS:IO] Implement IoGetDeviceInterfaceAlias
Required by XP/2003 audio stack to be loaded properly.
CORE-17361
2025-02-02 23:30:38 +01:00
Oleg Dubinskiy
6b2f00e70a [KMTESTS:IO] Rewrite IoDeviceInterface kmtest
Add new kernel-mode test for Device Interface functions, based on the patch by Mark Jansen.
The previous one was buggy and crashed even on Windows.
The new one doesn't fail, and works without bugs. Although there is missing one test case (for IoRegisterDeviceInterface).
Also perhaps IoRegister/UnregisterPlugPlayNotification testcases should be keept, if they correspond to Device Interface functions.
CORE-17361
2025-02-02 23:30:38 +01:00
Timo Kreuzer
9b002025d4 [NTOS:KE/x86] Detect more KeFeatureBits 2025-02-01 19:45:21 +02:00
Timo Kreuzer
d09eb6f856 [NTOS:KE/x64] Add detection of SSE 4.2 2025-02-01 19:45:21 +02:00
Timo Kreuzer
be3dde7698 [NTOS] Make KeFeatureBits 64 bit 2025-02-01 19:45:21 +02:00
Whindmar Saksit
77e4217919 [SHELL32] CMenuBand must set ShowWindow value for InvokeCommand (#7695) 2025-02-01 13:50:22 +01:00
Katayama Hirofumi MZ
ee19792605 [SHDOCVW][EXPLORER][RSHELL][SDK] Populate WinList_* stubs (#7691)
Implementing missing features...
JIRA issue: CORE-9368
- Modify shdocvw.spec.
- Add dll/win32/shdocvw/winlist.cpp.
- Add stubs of WinList_* functions.
- Add WinList_* function prototypes
  to <shdocvw_undoc.h>.
- Adapt explorer and rshell to new
  WinList_Init prototype.
2025-02-01 07:14:36 +09:00
Whindmar Saksit
f335322ace [SHELL32] SEE_MASK_IDLIST should not assume the PIDL is always a FS path (#7693)
CORE-16898 CORE-14177
2025-01-31 21:15:13 +01:00
Whindmar Saksit
6265add147 [SHELL32] Don't close Run dialog on execution failure (#7686)
CORE-19983
2025-01-31 12:52:20 +01:00
Katayama Hirofumi MZ
dddceeb10d [SHELL32] Load shell icon size from registry (#7683)
Improve usability. Re-trial of #7679 with different approach.
JIRA issue: CORE-12905
- Add ShellSmallIconSize, ShellLargeIconSize, and
  ShellIconBPP global variables in iconcache.cpp.
- Add SIC_GetMetricsValue, SIC_GetLargeIconSize,
  SIC_GetSmallIconSize, and SIC_GetIconBPP helper
  functions in iconcache.cpp.
- Load shell icon size from registry key
  "HKEY_CURRENT_USER\\Control Panel\\Desktop\\WindowMetrics".
- Load icon BPP (bits per pixel) from registry.
- Fix SIC_Initialize and SIC_LoadIcon functions for icon size.
- Fix SHGetFileInfoW function for SHGFI_SHELLICONSIZE flag.
2025-01-31 08:21:05 +09:00
Katayama Hirofumi MZ
909468c4dc [SDK][SHELL32][SHLWAPI][SHLWAPI_APITEST] Split IShellFolder helpers hack (#7685)
Splitting the hack will improve our code quality.
JIRA issue: N/A
- Add sdk/include/reactos/ishellfolder_helpers.h
  header file.
- Split conflicting code.
2025-01-31 08:15:36 +09:00
Whindmar Saksit
d5ce3d28ab [RAPPS] Don't display Freeware license string if the type is also Freeware (#7689)
License=Freeware, LicenseType=2 should not display as "Freeware (Freeware)"
2025-01-30 21:14:10 +01:00
Whindmar Saksit
a23db39c8a [RAPPS] Allow database to override download filename (#7668)
http://example.com/setup.exe?foo=bar needs to use be able to use setup.exe as the
filename.
2025-01-30 17:46:39 +01:00
Katayama Hirofumi MZ
7e52f64044 [SDK] Define IAssociationElement, IAssociationArray etc. (#7678)
Defining missing interfaces for
file association...
JIRA issue: CORE-19278
- Define IID_IAssociationElementOld,
  and IID_IAssociationElement
  interface IDs in <shlguid_undoc.h>.
- Define ASSOCQUERY, and
  IAssociationElementOld in
  <shlwapi_undoc.h>.
- Define IAssociationElement,
  IEnumAssociationElements,
  IAssociationArrayOld, and
  IAssociationArray interfaces in
  <shlobj_undoc.h>.
- Simplify <shlwapi_undoc.h>
  and <shlobj_undoc.h>.
2025-01-30 22:16:46 +09:00
Timo Kreuzer
de3a6706e7 [UCRT] fenv.h: Fix GCC build of _Fenv1 2025-01-30 11:30:32 +02:00
Timo Kreuzer
a438d7c3b8 [UCRT] Add GCC compatible definition of _CRT_STDIO_INLINE
In C99 mode GCC emits global symbols for inline functions, as soon as the compilation unit contains a declaration that marks the function as "extern". A number of functions like printf are implicitly declared as extern by GCC, which seemingly cannot be disabled. This would lead to the inline function being emitted as a global symbol in every compilation unit. Using static inline prevents duplicate symbol errors.
2025-01-30 11:30:32 +02:00
Timo Kreuzer
4ca68ffb1c [UCRT] Make __local_stdio_printf/scanf_options GCC compatible 2025-01-30 11:30:32 +02:00
Timo Kreuzer
bb9392e4e1 [CMAKE] Define _CRT_SUPPRESS_RESTRICT on GCC builds
This prevents the use of __declspec(restrict) in UCRT headers.
2025-01-30 11:30:32 +02:00
Hervé Poussineau
70bf3bb8fa [NTOS:KDBG] Add back 'cregs' command
This command was removed in commit baa47fa5e0
because there was no way to get the CRx registers from a CONTEXT structure.
Previous code was also displaying current GDTR/LDTR and IDT.

Rewrite the code to use KdSystemDebugControl(SysDbgReadControlSpace, ...)
to get CRx, GDTR/LDTR and IDT values just before entering debugger.
2025-01-29 18:25:24 +01:00
Katayama Hirofumi MZ
2f23e70ad5 Revert "[NTUSER] Enable SM_CXICON etc. settings from registry (#7679)" (#7682)
This reverts commit 3b3741c10a of #7679 .
It seems like the shell icon size is not the
system icon size.

The wide string L"Shell Small Icon Size" is detected in
shell32.dll and themeui.dll.
No L"Shell Small Icon Size" in win32k.sys found.
JIRA issue: CORE-12905
2025-01-29 21:34:19 +09:00
Katayama Hirofumi MZ
3b3741c10a [NTUSER] Enable SM_CXICON etc. settings from registry (#7679)
Improve usability.
JIRA issue: CORE-12905
- Add nIconSize and nSmallIconSize
  values to SPIVALUES structure.
- Load "Shell Icon Size" and "Shell
  Small Icon Size" values from registry.
- Enable changing of SM_CXICON,
  SM_CYICON, SM_CXSMICON, and
  SM_CYSMICON settings.
2025-01-29 20:20:25 +09:00
Justin Miller
a8da29e888 [ACPI] Move CMBATT and COMPBATT out of the acpi directory (#7599)
Move these out of ACPI in preparation for ACPI_NEW so they keep their juicy commit history.
Also both ACPIs can coexist for awhile as I don't see the old driver getting removed anytime soon.
2025-01-29 00:49:35 -08:00
Whindmar Saksit
b35becef2e [RAPPS] Set working directory for zip generated shortcuts (#7674)
Some applications are broken and assume the working directory is the
same as the .exe directory (xrick etc).
2025-01-29 00:46:11 +01:00
Hervé Poussineau
b9852e83d2 [NTOS:EX] HACK: on livecd, disable security features in NtSystemDebugControl
WinDBG can do some local debugging using 'windbg -kl'. In that case,
WinDBG tries to directly use NtSystemDebugControl. If this function
returns an error, WinDBG extracts a driver from its resources.
WinDBG will send IOCTLs to this driver, and this driver will call
KdSystemDebugControl.

However, on livecd (where %SYSTEMROOT% is read-only), WinDBG is unable
to extract the driver from its resources, and can't use the driver to
call KdSystemDebugControl.

As a work-around, allow all control classes in NtSystemDebugControl
in case of livecd.
WinDBG local debugging now also works on livecd (windbg -kl).
2025-01-28 22:00:56 +01:00
Hervé Poussineau
5547b74717 [NTOS:KD64] Fix freezes on first chance exception when KDBG is enabled and KdIgnoreUmExceptions is TRUE
This fixes the following use case:
- Execute 'kdbgctrl.exe -du'
- Execute 'kdbgctrl.exe -cu'
- See that last command never finishes
2025-01-28 22:00:55 +01:00
Hermès Bélusca-Maïto
7068a790b2 [NTOS:KD64] Add a missing KdEnteredDebugger reset in KdExitDebugger() 2025-01-28 22:00:54 +01:00
Hervé Poussineau
6b89a0da11 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetKdBlockEnable/SysDbgSetKdBlockEnable 2025-01-28 22:00:53 +01:00
Hervé Poussineau
d4546753f6 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetKdUmExceptionEnable/SysDbgSetKdUmExceptionEnable 2025-01-28 22:00:53 +01:00
Hervé Poussineau
734a043b22 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetPrintBufferSize 2025-01-28 22:00:51 +01:00
Hervé Poussineau
4dc0e5cc81 [NTOS:EX] Implement NtSystemDebugControl: SysDbgGetAutoKdEnable/SysDbgSetAutoKdEnable 2025-01-28 22:00:50 +01:00
Hervé Poussineau
4bae44e412 [NTOS:EX] Implement NtSystemDebugControl: SysDbgEnableKernelDebugger/SysDbgDisableKernelDebugger 2025-01-28 22:00:49 +01:00
Hervé Poussineau
7b4d618994 [NTOS:EX] Implement NtSystemDebugControl: SysDbgBreakPoint 2025-01-28 22:00:48 +01:00
Hervé Poussineau
1db1bceaa7 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgCheckLowMemory 2025-01-28 22:00:48 +01:00
Hervé Poussineau
2fe3de6c69 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadBusData/SysDbgWriteBusData 2025-01-28 22:00:47 +01:00
Hervé Poussineau
19046a253b [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadMsr/SysDbgWriteMsr 2025-01-28 22:00:46 +01:00
Hervé Poussineau
b187662f39 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadIoSpace/SysDbgWriteIoSpace 2025-01-28 22:00:46 +01:00
Hervé Poussineau
0589c178ba [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadControlSpace/SysDbgWriteControlSpace 2025-01-28 22:00:45 +01:00
Hervé Poussineau
42e038f227 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadPhysical/SysDbgWritePhysical 2025-01-28 22:00:43 +01:00
Hervé Poussineau
2efaa5ea1e [NTOS:KD64] Implement KdSystemDebugControl: SysDbgReadVirtual/SysDbgWriteVirtual 2025-01-28 22:00:42 +01:00
Hervé Poussineau
9f97f0b284 [NTOS:KD64] Implement KdSystemDebugControl: SysDbgQueryVersion 2025-01-28 22:00:40 +01:00
Hervé Poussineau
6338d51353 [NTOS:EX] In NtSystemDebugControl, check for SeDebugPrivilege 2025-01-28 22:00:39 +01:00
Hervé Poussineau
9e7c3770e3 [NTOS:EX] Improve NtSystemDebugControl
- Add SEH probing for user buffer
- Mark some classes as i386 only
- Explicitly return STATUS_NOT_IMPLEMENTED on disabled classes (must use KdSystemDebugControl instead)
- Explicitly return STATUS_NOT_IMPLEMENTED on not implemented classes
- Return STATUS_INVALID_INFO_CLASS on all other classes
2025-01-28 22:00:38 +01:00
Hervé Poussineau
0f36ef3392 [NTOS:KD64] Improve KdSystemDebugControl
- Explicitly return STATUS_NOT_IMPLEMENTED on not implemented classes
- Return STATUS_INVALID_INFO_CLASS on all other classes
2025-01-28 22:00:37 +01:00
Hermès Bélusca-Maïto
a0b009f1ed [NTOS:EX:KD64] Add Doxygen documentation for Nt/KdSystemDebugControl.
Based from external documentation:
https://www.ivanlef0u.tuxfamily.org/?p=21
https://www.ivanlef0u.tuxfamily.org/?p=382
http://pds8.egloos.com/pds/200807/09/51/Subverting_Windows_2003_Service_Pack_1_Kernel_Integrity_Protection.pdf
http://www.nynaeve.net/?p=114
https://media.defcon.org/DEF%20CON%2030/DEF%20CON%2030%20presentations/Eran%20Segal%20-%20The%20COW%20%28Container%20On%20Windows%29%20Who%20Escaped%20the%20Silo.pdf
https://vidstromlabs.com/blog/memory-dumping-with-ntsystemdebugcontrol/
https://www.kernelmode.info/forum/viewtopic0aa3.html?t=5317
2025-01-28 22:00:36 +01:00
Hermès Bélusca-Maïto
317f1e8391 [NDK][NTOS:EX:KD64] Add SAL annotations to Kd/Nt/ZwSystemDebugControl. 2025-01-28 22:00:35 +01:00
Hermès Bélusca-Maïto
5d78952024 [NTOS:KD64] Simplify some code in debugging helpers 2025-01-28 22:00:34 +01:00
Hermès Bélusca-Maïto
1c61d4ce90 [NTOS:KD64] Add annotations to debugger control routines used in Kd/Nt/ZwSystemDebugControl 2025-01-28 22:00:33 +01:00
Hervé Poussineau
20bd5e8a9c [NTOS:MM] Allow not providing MMDBG_COPY_UNSAFE in MmDbgCopyMemory
Replace an assert by a log, as this works most of the times.
2025-01-28 22:00:31 +01:00
Hervé Poussineau
69cd1e107a [NTOS:EX] Allow calling ExLockUserBuffer up to DISPATCH_LEVEL 2025-01-28 22:00:30 +01:00
Hervé Poussineau
d8e25f06b1 [NTOS:EX] Add prototypes for ExLockUserBuffer/ExUnlockUserBuffer 2025-01-28 22:00:29 +01:00
Hermès Bélusca-Maïto
2c59b5b8cf [NDK] SYSDBG: Add SysDbgKdPullRemoteFile enum value and structure (Win10 19041+)
From https://github.com/processhacker/phnt/
2025-01-28 22:00:28 +01:00
Hermès Bélusca-Maïto
4d37135884 [NDK] SYSDBG: Add SysDbgGetLiveKernelDump enum value and structures for kernel live dump.
For more information, see:
https://crashdmp.wordpress.com/2014/08/04/livedump-1-0-is-available/
https://github.com/lilhoser/livedump
https://gary-nebbett.blogspot.com/2016/04/examining-windows-kernel-mode-stacks.html
https://github.com/processhacker/phnt
2025-01-28 22:00:28 +01:00
Hermès Bélusca-Maïto
b5007e09b1 [NDK] SYSDBG: Add versioning info for Vista+ commands. 2025-01-28 22:00:27 +01:00
Timo Kreuzer
ae0fa8ba49 [UCRTSUPPORT] Add wine c++ exception code 2025-01-28 22:50:04 +02:00
Timo Kreuzer
e2d69ad98c [CRT] Split MSVC C++ aliases from cpp.s to cpp_alias.s 2025-01-28 22:50:04 +02:00
3752 changed files with 309234 additions and 132237 deletions

3
.gitattributes vendored
View File

@@ -30,6 +30,9 @@
*.TXT text
*.y text
# Files with these extensions must always have LF (Unix) line endings.
*.sh text eol=lf
# Files with these extensions end up in the built ReactOS system, so they
# need to have CRLF line endings.
*.bat text eol=crlf

View File

@@ -17,3 +17,8 @@ _Use a TODO when your pull request is Work in Progress._
- [ ]
- [ ]
## Testbot runs (Filled in by Devs)
- [ ] KVM x86:
- [ ] KVM x64:

7
.github/labeler.yml vendored
View File

@@ -47,10 +47,7 @@ Win32SS:
"input method":
- changed-files:
- any-glob-to-any-file:
- base/applications/ctfmon/**
- dll/ime/**
- dll/win32/imm32/**
- dll/win32/msctf/**
- dll/win32/msutb/**
- base/ctf/**
- win32ss/user/imm32/**
- win32ss/user/ntuser/ime.c
- win32ss/user/user32/misc/imm.c

View File

@@ -145,11 +145,19 @@ jobs:
build-msvc-arm:
strategy:
matrix:
toolset: ['14','14.2'] # VS 2022, 2019
os: [windows-2022, windows-latest]
toolset: ['14', '14.29'] # VS 2022 (ongoing), 2019 (last)
arch: [arm, arm64]
config: [Debug, Release]
exclude:
# arm64: windows-latest is enough/fine.
- os: windows-2022
arch: arm64
# arm (sdk): only available on windows-2022.
- os: windows-latest
arch: arm
fail-fast: false
runs-on: windows-latest
runs-on: ${{matrix.os}}
steps:
- name: Install ninja
run: choco install -y ninja
@@ -182,9 +190,21 @@ jobs:
- name: Build base module
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target base/all
- name: Build dll:3rdparty
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target dll/3rdparty/all -- -k0
- name: Build control panel applets
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target dll/cpl/all
- name: Build dll:opengl
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target dll/opengl/all -- -k0
- name: Build dll:shellext
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target dll/shellext/all -- -k0
- name: Build drivers:base
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target drivers/base/all -- -k0
- name: Build rosapps
if: ${{ matrix.arch == 'arm' }}
run: cmake --build build --target modules/rosapps/all
@@ -194,13 +214,20 @@ jobs:
- name: Build some applications (arm64)
if: ${{ matrix.arch == 'arm64' }}
run: cmake --build build --target calc magnify mstsc notepad osk regedit taskmgr winmine wordpad base/applications/screensavers/all -- -k0
- name: Build control panel applets (arm64)
if: ${{ matrix.arch == 'arm64' }}
run: cmake --build build --target dll/cpl/all -- -k0
- name: Upload compiled binaries
uses: actions/upload-artifact@v4
with:
name: reactos-msvc${{matrix.toolset}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}}
path: |
build/base
build/dll/3rdparty
build/dll/cpl
build/dll/opengl
build/dll/shellext
build/drivers/base
build/modules/rosapps
build/subsystems
!**/CMakeFiles

View File

@@ -68,6 +68,9 @@ include(sdk/cmake/config.cmake)
# Compiler flags handling
include(sdk/cmake/compilerflags.cmake)
# set_wine_module function
include(sdk/cmake/set_wine_module.cmake)
add_definitions(
-D__REACTOS__
# swprintf without count argument is used in most of the codebase
@@ -157,7 +160,10 @@ if(NOT CMAKE_CROSSCOMPILING)
set(NATIVE_TARGETS asmpp bin2c widl gendib cabman fatten hpp isohybrid mkhive mkisofs obj2bin spec2def geninc mkshelllink utf16le xml2sdb)
if(NOT MSVC)
list(APPEND NATIVE_TARGETS rsym pefixup)
list(APPEND NATIVE_TARGETS pefixup)
if (ARCH STREQUAL "i386")
list(APPEND NATIVE_TARGETS rsym)
endif()
endif()
install(TARGETS ${NATIVE_TARGETS})
@@ -314,22 +320,23 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
include_directories(
sdk/include
sdk/include/crt
sdk/include/ddk
sdk/include/ndk
sdk/include/psdk
sdk/include/dxsdk
sdk/include/reactos
sdk/include/reactos/libs
sdk/include/vcruntime
sdk/include/winrt
${REACTOS_BINARY_DIR}/sdk/include
${REACTOS_BINARY_DIR}/sdk/include/psdk
${REACTOS_BINARY_DIR}/sdk/include/dxsdk
${REACTOS_BINARY_DIR}/sdk/include/ddk
${REACTOS_BINARY_DIR}/sdk/include/dxsdk
${REACTOS_BINARY_DIR}/sdk/include/reactos
${REACTOS_BINARY_DIR}/sdk/include/reactos/mc
sdk/include/crt
sdk/include/vcruntime
sdk/include/ddk
sdk/include/ndk
sdk/include/reactos
sdk/include/reactos/libs
sdk/lib/pseh/include)
sdk/include/dxsdk
sdk/lib/pseh/include
)
if(ARCH STREQUAL "arm")
include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/arm)
@@ -337,13 +344,7 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
add_dependency_header()
add_subdirectory(sdk/include/ndk/tests)
add_subdirectory(sdk/include/xdk)
add_subdirectory(sdk/include/psdk)
add_subdirectory(sdk/include/dxsdk)
add_subdirectory(sdk/include/reactos/wine)
add_subdirectory(sdk/include/reactos/mc)
add_subdirectory(sdk/include/asm)
add_subdirectory(sdk/include)
if(ARCH MATCHES "64$")
include(sdk/cmake/baseaddress64.cmake)

View File

@@ -116,6 +116,20 @@
# S: Abandoned
/ntoskrnl/cache/
# Client/Server Runtime Subsystem
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/sdk/include/reactos/subsys/csr/ @HBelusca
/subsystems/csr/ @HBelusca
/win32ss/user/ntuser/csr.* @HBelusca
# Clipboard Viewer
# M: HBelusca, Hermès Bélusca-Maïto
# R: Mondgestein, Ricardo Hanke
# S: Maintained
/base/applications/clipbrd/ @HBelusca
/base/applications/cmdutils/clip/ @HBelusca
# CMake Build Scripts
# M:
# R: learn-more, learn_more, Mark Jansen
@@ -124,6 +138,58 @@
/sdk/cmake/
*.cmake
# Command-line Utilities
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/applications/cmdutils/attrib/ @HBelusca
/base/applications/cmdutils/chcp/ @HBelusca
/base/applications/cmdutils/doskey/ @HBelusca
/base/applications/cmdutils/eventcreate/ @HBelusca
/base/applications/cmdutils/find/ @HBelusca
/base/applications/cmdutils/help/ @HBelusca
/base/applications/cmdutils/mode/ @HBelusca
/base/applications/cmdutils/more/ @HBelusca
/base/applications/cmdutils/taskkill/ @HBelusca
/base/applications/cmdutils/timeout/ @HBelusca
/sdk/lib/conutils/ @HBelusca
# Command-line Prompt Interpreter
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/shell/cmd/ @HBelusca
# Console Client/Server Subsystem, Terminal Emulator / Text-Mode
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/dll/cpl/console/ @HBelusca
/dll/win32/kernel32/client/console/ @HBelusca
/dll/win32/kernel32/include/console.h @HBelusca
/drivers/base/condrv/ @HBelusca
/drivers/setup/blue/ @HBelusca
/modules/rostests/winetests/kernel32/console.c @HBelusca
/sdk/include/psdk/wincon.h @HBelusca
/sdk/include/reactos/wincon_undoc.h @HBelusca
/sdk/include/reactos/drivers/condrv/ @HBelusca
/sdk/include/reactos/drivers/blue/ @HBelusca
/sdk/include/reactos/subsys/win/conmsg.h @HBelusca
/sdk/include/reactos/subsys/win/console.h @HBelusca
/win32ss/user/ntuser/console.c @HBelusca
/win32ss/user/winsrv/concfg/ @HBelusca
/win32ss/user/winsrv/consrv/ @HBelusca
# Event Log Subsystem
# M: HBelusca, Hermès Bélusca-Maïto
# M: EricKohl, ekohl, Eric Kohl
# S: Maintained
/base/services/eventlog/ @EricKohl @HBelusca
/dll/win32/advapi32/service/eventlog.c @EricKohl @HBelusca
/sdk/lib/evtlib/ @HBelusca
# Event Log Viewer
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/applications/mscutils/eventvwr/ @HBelusca
# File Patch API
# M: learn-more, learn_more, Mark Jansen
# S: Maintained
@@ -150,11 +216,13 @@
/sdk/lib/drivers/ntoskrnl_vista/fsrtl.c @HeisSpiter
# Freeloader
# M:
# M: HBelusca, Hermès Bélusca-Maïto
# R: tkreuzer, ThePhysicist, Timo Kreuzer
# R: Extravert-ir, extravert34, Victor Perevertkin
# S: Maintained
/boot/freeldr/freeldr/ @tkreuzer @Extravert-ir
/boot/freeldr/freeldr/ @HBelusca @tkreuzer @Extravert-ir
/boot/rtl/ @HBelusca
/ntoskrnl/config/cmboot.c @HBelusca
# HAL / APIC
# M: tkreuzer, ThePhysicist, Timo Kreuzer
@@ -187,6 +255,12 @@
# S: Maintained
/drivers/storage/mountmgr/ @HeisSpiter
# MSConfig
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/applications/msconfig/ @HBelusca
/base/applications/msconfig_new/ @HBelusca
# Network Drivers
# M:
# R: ThFabba, Thomas Faber
@@ -215,11 +289,29 @@
# S: Maintained
/dll/ntdll/ @HeisSpiter @learn-more @ThFabba @tkreuzer
# NT Virtual DOS Machine
# M: HBelusca, Hermès Bélusca-Maïto
# R: reactos573, aandrejevic, Aleksandar Andrejevic
# S: Maintained
/dll/win32/kernel32/client/vdm.c @reactos573 @HBelusca
/dll/win32/kernel32/include/vdm.h @reactos573 @HBelusca
/sdk/include/reactos/subsys/win/vdm.h @reactos573 @HBelusca
/ntoskrnl/vdm/ @reactos573 @HBelusca
/sdk/include/reactos/libs/fast486/ @reactos573 @HBelusca
/sdk/lib/fast486/ @reactos573 @HBelusca
/subsystems/mvdm/ @reactos573 @HBelusca
/subsystems/win/basesrv/vdm.* @reactos573 @HBelusca
# Printing
# M: ColinFinck, Colin Finck
# S: Maintained
/win32ss/printing/ @ColinFinck
# Program Manager
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/shell/progman/ @HBelusca
# ReactOS API Tests
# M:
# R: learn-more, learn_more, Mark Jansen
@@ -232,7 +324,25 @@
# S: Maintained
/modules/rostests/kmtests/ @ThFabba
# ROS internals tools
# ReactOS Setup
# M: HBelusca, Hermès Bélusca-Maïto
# R: EricKohl, ekohl, Eric Kohl
# S: Maintained
/base/setup/ @HBelusca
/base/system/winlogon/setup.c @EricKohl
/dll/win32/setupapi/
/dll/win32/syssetup/ @EricKohl
/drivers/setup/ @HBelusca
/sdk/include/reactos/libs/syssetup/ @EricKohl
# ReactOS miscellaneous tools
# M:
# R: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/modules/rosapps/applications/cmdutils/cat/ @HBelusca
/modules/rosapps/applications/sysutils/utils/partinfo/ @HBelusca
# ReactOS internals tools
# M: HeisSpiter, Heis Spiter, Pierre Schweitzer
# S: Maintained
/modules/rosapps/applications/rosinternals/ @HeisSpiter
@@ -252,15 +362,26 @@
/modules/rostests/kmtests/ntos_se/ @GeoB99
/ntoskrnl/se/ @GeoB99
# Session Manager Subsystem
# M: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/system/smss/ @HBelusca
/sdk/include/reactos/subsys/sm/ @HBelusca
/sdk/lib/smlib/ @HBelusca
# Shell
# M:
# R: learn-more, learn_more, Mark Jansen
# R: yagoulas, Giannis Adamopoulos
# R: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/base/shell/explorer/ @learn-more @yagoulas
/base/shell/rshell/ @learn-more @yagoulas
/dll/win32/browseui/ @learn-more @yagoulas
/dll/win32/shell32/ @learn-more @yagoulas
/dll/win32/shell32/CShellLink.* @HBelusca
/dll/win32/shell32/CUserNotification.* @HBelusca
/dll/win32/shell32/systray.cpp @HBelusca
# Shell Extensions
# M:
@@ -309,10 +430,34 @@
/modules/rosapps/applications/cmdutils/vfdcmd/ @HeisSpiter
/modules/rosapps/drivers/vfd/ @HeisSpiter
# Win32 file functions
# Win32 Subsystem
# M:
# R: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/sdk/include/reactos/winbase_undoc.h @HBelusca
/subsystems/win/basesrv/
/win32ss/user/winsrv/
/win32ss/user/winsrv/usersrv/harderror.c @HBelusca
# Win32 Subsystem - File functions
# M: HeisSpiter, Heis Spiter, Pierre Schweitzer
# R: HBelusca, Hermès Bélusca-Maïto
# S: Maintained
/dll/win32/kernel32/client/file/ @HeisSpiter
/dll/win32/kernel32/client/file/find.c @HBelusca
# Win32 Subsystem - Shutdown
# M: HBelusca, Hermès Bélusca-Maïto
# R: EricKohl, ekohl, Eric Kohl
# S: Maintained
/base/system/winlogon/sas.c @EricKohl @HBelusca
/base/system/winlogon/shutdown.c @EricKohl @HBelusca
/dll/win32/advapi32/misc/shutdown.c @EricKohl
/dll/win32/msgina/shutdown.c @EricKohl @HBelusca
/win32ss/user/ntuser/shutdown.* @HBelusca
/win32ss/user/user32/misc/exit.c @HBelusca
/win32ss/user/winsrv/consrv/shutdown.c @HBelusca
/win32ss/user/winsrv/usersrv/shutdown.c @HBelusca
# Windows Network File Systems functions
# M: HeisSpiter, Heis Spiter, Pierre Schweitzer
@@ -338,6 +483,11 @@
amd64/ @tkreuzer
/boot/freeldr/freeldr/arch/realmode/amd64.S @tkreuzer
# Wine DirectX
# M: DarkFire01, The_DarkFire_, Justin Miller
# S: Upstream
/dll/directx/wine/ @DarkFire01
# Translations
# This is the list of translation teams in ReactOS GitHub organization.
# If you want to be part of one - hit us at https://chat.reactos.org/

356
CODING_STYLE.md Normal file
View File

@@ -0,0 +1,356 @@
# Coding Style
This article describes general coding style guidelines, which should be used for new ReactOS code. These guidelines apply exclusively to C and C++ source files. The Members of ReactOS agreed on this document in the October 2013 meeting.
As much existing ReactOS code as possible should be converted to this style unless there are reasons against doing this (like if the code is going to be rewritten from scratch in the near future). See [Notes on reformatting existing code](#notes-on-reformatting-existing-code) for more details.
Code synchronized with other sources (like Wine) must not be rewritten. [3rd Party Files.txt](https://github.com/reactos/reactos/blob/master/media/doc/3rd%20Party%20Files.txt) and [WINESYNC.txt](https://github.com/reactos/reactos/blob/master/media/doc/WINESYNC.txt) files can be used for tracking synchronized files.
## File Structure
1. Every ReactOS source code file should include a file header like this:
```
/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Does cool things like Memory Management
* COPYRIGHT: Copyright 2017 Arno Nymous <abc@mailaddress.com>
* Copyright 2017 Mike Blablabla <mike@blabla.com>
*/
```
Please use SPDX license identifiers available at https://spdx.org/licenses.
This makes our source file parseable by licensing tools!
You should add yourself to the `COPYRIGHT` section of a file if you did a major contribution to it and could take responsibility for the whole file or a part of it. Not more than 3 people shall be in that list for each file.
`FILE` line of the old header should be removed.
2. [Doxygen](https://doxygen.reactos.org/) documentation generator is used for ReactOS codebase, so use a proper header for functions, see [API Documentation](https://reactos.org/wiki/Documentation_Guidelines#API_Documentation) for details.
## Indentation and line width
1. Line width must be at most **100 characters**.
2. Do not add a space or tab at the end of any line.
3. Indent with **4 spaces**, don't use tabs!
4. Indent both a case label and the case statement of a switch statement.
**Right:**
```c
switch (Condition)
{
case 1:
DoSomething();
break;
case 2:
{
DoMany();
ManyMore();
OtherThings();
break;
}
}
```
**Wrong:**
```c
switch(Condition)
{
case 1:
DoSomething();
break;
case 2:
DoMany();
ManyMore();
OtherThings();
break;
}
```
5. When a function call does not fit onto a line, align arguments like this:
```c
FunctionCall(arg1,
arg2,
arg3);
```
6. Function headers should have this format (preserving the order as in the example):
```c
static // scope identifier
CODE_SEG("PAGE") // section placement
// other attributes
BOOLEAN // return type
FASTCALL // calling convention
IsOdd(
_In_ UINT32 Number);
```
## Spacing
1. Do not use spaces around unary operators.
**Right:** `i++;`
**Wrong:** `i ++;`
2. Place spaces around binary and ternary operators.
**Right:** `a = b + c;`
**Wrong:** `a=b+c;`
3. Do not place spaces before comma and semicolon.
**Right:**
```c
for (int i = 0; i < 5; i++)
DoSomething();
func1(a, b);
```
**Wrong:**
```c
for (int i = 0; i < 5 ; i++)
DoSomething();
func1(a , b) ;
```
4. Place spaces between control statements and their parentheses.
**Right:**
```c
if (Condition)
DoSomething();
```
**Wrong:**
```c
if(Condition)
DoSomething();
```
5. Do not place spaces between a function and its parentheses, or between a parenthesis and its content.
**Right:**
```c
func(a, b);
```
**Wrong:**
```c
func (a, b);
func( a, b );
```
## Line breaking
1. Each statement should get its own line.
**Right:**
```c
x++;
y++;
if (Condition)
DoSomething();
```
**Wrong:**
```c
x++; y++;
if (Condition) DoSomething();
```
## Braces
1. Always put braces (`{` and `}`) on their own lines.
2. One-line control clauses may use braces, but this is not a requirement. An exception are one-line control clauses including additional comments.
**Right:**
```c
if (Condition)
DoSomething();
if (Condition)
{
DoSomething();
}
if (Condition)
{
// This is a comment
DoSomething();
}
if (A_Very || (Very && Long || Condition) &&
On_Many && Lines)
{
DoSomething();
}
if (Condition)
DoSomething();
else
DoSomethingElse();
if (Condition)
{
DoSomething();
}
else
{
DoSomethingElse();
YetAnother();
}
```
**Wrong:**
```c
if (Condition) {
DoSomething();
}
if (Condition)
// This is a comment
DoSomething();
if (A_Very || (Very && Long || Condition) &&
On_Many && Lines)
DoSomething();
if (Condition)
DoSomething();
else {
DoSomethingElse();
YetAnother();
}
```
## Control structures
1. Don't use inverse logic in control clauses.
**Right:** `if (i == 1)`
**Wrong:** `if (1 == i)`
2. Avoid too many levels of cascaded control structures. Prefer a "linear style" over a "tree style". Use `goto` when it helps to make the code cleaner (e.g. for cleanup paths).
**Right:**
```c
if (!func1())
return;
i = func2();
if (i == 0)
return;
j = func3();
if (j == 1)
return;
...
```
**Wrong:**
```c
if (func1())
{
i = func2();
if (func2())
{
j = func3();
if (func3())
{
...
}
}
}
```
## Naming
1. Capitalize names of variables and functions. Hungarian Notation may be used when developing for Win32, but it is not required. If you don't use it, the first letter of a name must be a capital too (no lowerCamelCase). Do not use underscores as separators either.
**Right:**
```c
PLIST_ENTRY FirstEntry;
VOID NTAPI IopDeleteIoCompletion(PVOID ObjectBody);
PWSTR pwszTest;
```
**Wrong:**
```c
PLIST_ENTRY first_entry;
VOID NTAPI iop_delete_io_completion(PVOID objectBody);
PWSTR pwsztest;
```
2. Avoid abbreviating function and variable names, use descriptive verbs where possible.
3. Precede boolean values with meaningful verbs like "is" and "did" if possible and if it fits the usage.
**Right:**
```c
BOOLEAN IsValid;
BOOLEAN DidSendData;
```
**Wrong:**
```c
BOOLEAN Valid;
BOOLEAN SentData;
```
## Commenting
1. Avoid line-wasting comments, which could fit into a single line.
**Right:**
```c
// This is a one-line comment
/* This is a C-style comment */
// This is a comment over multiple lines.
// We don't define any strict rules for it.
```
**Wrong:**
```c
//
// This comment wastes two lines
//
```
## Null, false and 0
1. The null pointer should be written as `NULL`. In the rare case that your environment recommends a different null pointer (e.g. C++11 `nullptr`), you may use this one of course. Just don't use the value `0`.
2. Win32/NT Boolean values should be written as `TRUE` and `FALSE`. In the rare case that you use C/C++ `bool` variables, you should write them as `true` and `false`.
3. When you need to terminate ANSI or OEM string, or check for its terminator, use `ANSI_NULL`. If the string is Unicode or Wide string, use `UNICODE_NULL`.
## Notes on reformatting existing code
- Never totally reformat a file and put a code change into it. Do this in separate commits.
- If a commit only consists of formatting changes, say this clearly in the commit message by preceding it with *[FORMATTING]*.
## Other points
- Do not use `LARGE_INTEGER`/`ULARGE_INTEGER` unless needed for using APIs. Use `INT64`/`UINT64` instead
- Use `#pragma once` instead of guard defines in headers
- Don't specify a calling convention for a function unless required (usually for APIs or exported symbols)
## Using an automatic code style tool
TO BE ADDED BY User:Zefklop
## Points deliberately left out
Additional ideas were suggested during the discussion of this document, but a consensus couldn't be reached on them. Therefore we refrain from enforcing any rules on these points:
- TO BE ADDED BY User:Hbelusca
## See also
- [Kernel Coding Style](https://reactos.org/wiki/Kernel_Coding_Style)
- [GNU Indent](https://reactos.org/wiki/GNU_Indent)

View File

@@ -7,8 +7,8 @@
---
<p align=center>
<a href="https://reactos.org/project-news/reactos-0414-released/">
<img alt="ReactOS 0.4.14 Release" src="https://img.shields.io/badge/release-0.4.14-0688CB.svg"></a>
<a href="https://reactos.org/project-news/reactos-0415-released/">
<img alt="ReactOS 0.4.15 Release" src="https://img.shields.io/badge/release-0.4.15-0688CB.svg"></a>
<a href="https://reactos.org/download/">
<img alt="Download ReactOS" src="https://img.shields.io/badge/download-latest-0688CB.svg"></a>
<a href="https://sourceforge.net/projects/reactos/">

View File

@@ -1,5 +1,6 @@
add_subdirectory(applications)
add_subdirectory(ctf)
add_subdirectory(services)
add_subdirectory(setup)
add_subdirectory(shell)

View File

@@ -3,10 +3,10 @@ add_subdirectory(atactl)
add_subdirectory(cacls)
add_subdirectory(calc)
add_subdirectory(charmap)
add_subdirectory(cleanmgr)
add_subdirectory(clipbrd)
add_subdirectory(cmdutils)
add_subdirectory(control)
add_subdirectory(ctfmon)
add_subdirectory(drwtsn32)
add_subdirectory(dxdiag)
add_subdirectory(extrac32)

View File

@@ -801,11 +801,13 @@ MapWndProc(HWND hwnd,
infoPtr->CurrentFont.lfFaceName,
SIZEOF(lfFaceName));
SetFont(infoPtr, lfFaceName);
SetCaretXY(infoPtr, infoPtr->CaretX, infoPtr->CaretY, FALSE, TRUE);
break;
case FM_SETFONT:
infoPtr->CaretX = infoPtr->CaretY = infoPtr->iYStart = 0;
SetFont(infoPtr, (LPWSTR)lParam);
SetCaretXY(infoPtr, infoPtr->CaretX, infoPtr->CaretY, FALSE, TRUE);
break;
case FM_GETCHAR:

View File

@@ -13,7 +13,7 @@ add_library(charmap MODULE
charmap.rc)
set_module_type(charmap win32gui UNICODE)
target_link_libraries(charmap uuid wine cpprt atl_classes)
target_link_libraries(charmap uuid cpprt atl_classes)
set_target_cpp_properties(charmap WITH_EXCEPTIONS WITH_RTTI)
add_importlibs(charmap advapi32 user32 gdi32 comctl32 version msvcrt kernel32 ole32 uxtheme ntdll)
add_pch(charmap precomp.h SOURCE)

View File

@@ -0,0 +1,9 @@
project(cleanmgr)
# The main application
add_subdirectory(cleanmgr)
# Cleanup handlers
#add_subdirectory(dataclen) # Data Driven Cleaner

View File

@@ -0,0 +1,212 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandler implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
CCleanupHandler::CCleanupHandler(CRegKey &subKey, const CStringW &keyName, const GUID &guid)
: hSubKey(subKey)
, KeyName(keyName)
, Guid(guid)
, dwFlags(0)
, Priority(0)
, StateFlags(0)
, SpaceUsed(0)
, ShowHandler(true)
, hIcon(NULL)
{
}
CCleanupHandler::~CCleanupHandler()
{
Deactivate();
::DestroyIcon(hIcon);
}
void
CCleanupHandler::Deactivate()
{
if (Handler)
{
DWORD dwFlags = 0;
Handler->Deactivate(&dwFlags);
if (dwFlags & EVCF_REMOVEFROMLIST)
UNIMPLEMENTED_DBGBREAK();
}
}
bool
CCleanupHandler::Initialize(LPCWSTR pcwszVolume)
{
if (FAILED_UNEXPECTEDLY(
::CoCreateInstance(Guid, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IEmptyVolumeCache, &Handler))))
{
return false;
}
DWORD dwSize = sizeof(Priority);
if (hSubKey.QueryBinaryValue(L"Priority", &Priority, &dwSize) != ERROR_SUCCESS)
{
if (hSubKey.QueryDWORDValue(L"Priority", Priority) != ERROR_SUCCESS)
Priority = 200;
}
dwSize = sizeof(StateFlags);
if (hSubKey.QueryDWORDValue(L"StateFlags", StateFlags) != ERROR_SUCCESS)
StateFlags = 0;
WCHAR PathBuffer[MAX_PATH] = {};
ULONG nChars = _countof(PathBuffer);
if (hSubKey.QueryStringValue(L"IconPath", PathBuffer, &nChars) != ERROR_SUCCESS)
{
CStringW Tmp;
WCHAR GuidStr[50] = {};
if (StringFromGUID2(Guid, GuidStr, _countof(GuidStr)))
{
Tmp.Format(L"CLSID\\%s\\DefaultIcon", GuidStr);
CRegKey clsid;
nChars = _countof(PathBuffer);
if (clsid.Open(HKEY_CLASSES_ROOT, Tmp, KEY_READ) != ERROR_SUCCESS ||
clsid.QueryStringValue(NULL, PathBuffer, &nChars) != ERROR_SUCCESS)
{
PathBuffer[0] = UNICODE_NULL;
}
}
}
if (!PathBuffer[0])
StringCchCopyW(PathBuffer, _countof(PathBuffer), L"%systemroot%\\system32\\shell32.dll");
int Index = 0;
WCHAR *ptr = wcschr(PathBuffer, L',');
if (ptr)
{
*ptr++ = UNICODE_NULL;
Index = wcstol(ptr, NULL, 10);
}
HICON Large, Small;
UINT Result = ExtractIconExW(PathBuffer, Index, &Large, &Small, 1);
if (Result < 1)
Result = ExtractIconExW(L"%systemroot%\\system32\\shell32.dll", 0, &Large, &Small, 1);
if (Result >= 1)
{
hIcon = Small;
if (!hIcon)
{
hIcon = Large;
}
else
{
::DestroyIcon(Large);
}
}
// These options should come from the command line
// dwFlags |= EVCF_SETTINGSMODE;
// dwFlags |= EVCF_OUTOFDISKSPACE;
CComPtr<IEmptyVolumeCache2> spHandler2;
HRESULT hr = Handler->QueryInterface(IID_PPV_ARG(IEmptyVolumeCache2, &spHandler2));
if (SUCCEEDED(hr))
{
hr = spHandler2->InitializeEx(
hSubKey, pcwszVolume, KeyName, &wszDisplayName, &wszDescription, &wszBtnText, &dwFlags);
if (FAILED_UNEXPECTEDLY(hr))
return false;
// No files to clean will return S_FALSE;
if (hr != S_OK)
return false;
}
else
{
// Observed behavior:
// When Initialize is called, wszDescription is actually pointing to data
// wszDescription.AllocateBytes(0x400u);
hr = Handler->Initialize(hSubKey, pcwszVolume, &wszDisplayName, &wszDescription, &dwFlags);
if (FAILED_UNEXPECTEDLY(hr))
return false;
// No files to clean will return S_FALSE;
if (hr != S_OK)
return false;
CComPtr<IPropertyBag> spBag;
WCHAR GuidStr[50] = {};
nChars = _countof(GuidStr);
if (hSubKey.QueryStringValue(L"PropertyBag", GuidStr, &nChars) == ERROR_SUCCESS)
{
GUID guid = {};
if (!FAILED_UNEXPECTEDLY(CLSIDFromString(GuidStr, &guid)))
{
FAILED_UNEXPECTEDLY(
CoCreateInstance(guid, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARG(IPropertyBag, &spBag)));
}
}
ReadProperty(L"Display", spBag, wszDisplayName);
ReadProperty(L"Description", spBag, wszDescription);
if (dwFlags & EVCF_HASSETTINGS)
{
ReadProperty(L"AdvancedButtonText", spBag, wszBtnText);
}
}
if ((dwFlags & EVCF_ENABLEBYDEFAULT) && !(StateFlags & HANDLER_STATE_SELECTED))
{
StateFlags |= HANDLER_STATE_SELECTED;
}
// For convenience
if (!wszDisplayName)
SHStrDupW(KeyName, &wszDisplayName);
return true;
}
void
CCleanupHandler::ReadProperty(LPCWSTR Name, IPropertyBag *pBag, CComHeapPtr<WCHAR> &storage)
{
if (storage)
return;
if (pBag)
{
CComVariant tmp;
tmp.vt = VT_BSTR;
HRESULT hr = pBag->Read(Name, &tmp, NULL);
if (!FAILED_UNEXPECTEDLY(hr) && tmp.vt == VT_BSTR)
{
SHStrDupW(tmp.bstrVal, &storage);
}
}
if (!storage)
{
WCHAR TmpStr[0x200] = {};
DWORD dwSize = _countof(TmpStr);
if (hSubKey.QueryStringValue(Name, TmpStr, &dwSize) == ERROR_SUCCESS)
{
WCHAR ResolvedStr[0x200] = {};
SHLoadIndirectString(TmpStr, ResolvedStr, _countof(ResolvedStr), NULL);
SHStrDupW(ResolvedStr, &storage);
}
}
}
BOOL
CCleanupHandler::HasSettings() const
{
return !!(dwFlags & EVCF_HASSETTINGS);
}
BOOL
CCleanupHandler::DontShowIfZero() const
{
return !!(dwFlags & EVCF_DONTSHOWIFZERO);
}

View File

@@ -0,0 +1,48 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandler definition
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#define HANDLER_STATE_SELECTED 1
struct CCleanupHandler
{
CCleanupHandler(CRegKey &subKey, const CStringW &keyName, const GUID &guid);
~CCleanupHandler();
void Deactivate();
bool
Initialize(LPCWSTR pcwszVolume);
void
ReadProperty(LPCWSTR Name, IPropertyBag *pBag, CComHeapPtr<WCHAR> &storage);
BOOL
HasSettings() const;
BOOL
DontShowIfZero() const;
CRegKey hSubKey;
CStringW KeyName;
GUID Guid;
CComHeapPtr<WCHAR> wszDisplayName;
CComHeapPtr<WCHAR> wszDescription;
CComHeapPtr<WCHAR> wszBtnText;
CStringW IconPath;
DWORD dwFlags;
DWORD Priority;
DWORD StateFlags;
CComPtr<IEmptyVolumeCache> Handler;
DWORDLONG SpaceUsed;
bool ShowHandler;
HICON hIcon;
};

View File

@@ -0,0 +1,163 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandlerList implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
void CCleanupHandlerList::LoadHandlers(WCHAR Drive)
{
m_DriveStr.Format(L"%c:", Drive);
CRegKey VolumeCaches;
if (VolumeCaches.Open(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\VolumeCaches", KEY_READ) != ERROR_SUCCESS)
return;
LONG ItemIndex = 0;
WCHAR szKeyName[MAX_PATH];
WCHAR wszVolume[] = { Drive, L':', L'\\', UNICODE_NULL };
while (TRUE)
{
DWORD dwSize = _countof(szKeyName);
if (VolumeCaches.EnumKey(ItemIndex++, szKeyName, &dwSize) != ERROR_SUCCESS)
{
break;
}
CRegKey hSubKey;
if (hSubKey.Open(VolumeCaches, szKeyName, KEY_READ) == ERROR_SUCCESS)
{
WCHAR GuidStr[50] = {};
dwSize = _countof(GuidStr);
if (hSubKey.QueryStringValue(NULL, GuidStr, &dwSize) != ERROR_SUCCESS)
{
continue;
}
GUID guid = {};
if (FAILED_UNEXPECTEDLY(CLSIDFromString(GuidStr, &guid)))
continue;
CCleanupHandler* handler = new CCleanupHandler(hSubKey, szKeyName, guid);
if (!handler->Initialize(wszVolume))
{
delete handler;
continue;
}
m_Handlers.AddTail(handler);
}
}
// Sort handlers
BOOL fChanged = m_Handlers.GetCount() > 0;
while (fChanged)
{
fChanged = FALSE;
for (size_t n = 0; n < m_Handlers.GetCount() - 1; n++)
{
POSITION leftPos = m_Handlers.FindIndex(n);
POSITION rightPos = m_Handlers.FindIndex(n+1);
CCleanupHandler* left = m_Handlers.GetAt(leftPos);
CCleanupHandler* right = m_Handlers.GetAt(rightPos);
if (right->Priority < left->Priority)
{
m_Handlers.SwapElements(leftPos, rightPos);
fChanged = TRUE;
}
else if (right->Priority == left->Priority)
{
CStringW leftStr(left->wszDisplayName);
if (leftStr.Compare(right->wszDisplayName) > 0)
{
m_Handlers.SwapElements(leftPos, rightPos);
fChanged = TRUE;
}
}
}
}
}
DWORDLONG
CCleanupHandlerList::ScanDrive(IEmptyVolumeCacheCallBack *picb)
{
CProgressDlg progress;
CString Caption;
Caption.Format(IDS_CALCULATING, m_DriveStr.GetString());
CStringW Title(MAKEINTRESOURCE(IDS_DISK_CLEANUP));
progress.Start((DWORD)m_Handlers.GetCount(), Title, Caption);
int ItemIndex = 0;
DWORDLONG TotalSpaceUsed = 0;
ForEach(
[&](CCleanupHandler *current)
{
Caption.Format(IDS_SCANNING, current->wszDisplayName.m_pData);
progress.Step(++ItemIndex, Caption);
HRESULT hr = current->Handler->GetSpaceUsed(&current->SpaceUsed, picb);
if (FAILED_UNEXPECTEDLY(hr))
{
current->ShowHandler = false;
current->StateFlags &= ~HANDLER_STATE_SELECTED;
return;
}
if (current->SpaceUsed == 0 && current->DontShowIfZero())
{
current->ShowHandler = false;
current->StateFlags &= ~HANDLER_STATE_SELECTED;
}
TotalSpaceUsed += current->SpaceUsed;
});
progress.Stop();
return TotalSpaceUsed;
}
void
CCleanupHandlerList::ExecuteCleanup(IEmptyVolumeCacheCallBack *picb)
{
CProgressDlg progress;
CString Caption;
Caption.Format(IDS_CLEANING_CAPTION, m_DriveStr.GetString());
DWORD TotalSelected = 0;
ForEach(
[&](CCleanupHandler *current)
{
if (current->StateFlags & HANDLER_STATE_SELECTED)
TotalSelected++;
});
CStringW Title(MAKEINTRESOURCE(IDS_DISK_CLEANUP));
progress.Start(TotalSelected, Title, Caption);
int ItemIndex = 0;
ForEach(
[&](CCleanupHandler *current)
{
if (!(current->StateFlags & HANDLER_STATE_SELECTED))
return;
Caption.Format(IDS_CLEANING, current->wszDisplayName.m_pData);
progress.Step(++ItemIndex, Caption);
// If there is nothing to clean, we might get STG_E_NOMOREFILES
if (current->SpaceUsed > 0)
{
HRESULT hr = current->Handler->Purge(-1, picb);
if (FAILED_UNEXPECTEDLY(hr))
return;
}
});
progress.Stop();
}

View File

@@ -0,0 +1,31 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CCleanupHandlerList definition
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
class CCleanupHandlerList
{
private:
CAtlList<CCleanupHandler *> m_Handlers;
CStringW m_DriveStr;
public:
void LoadHandlers(WCHAR Drive);
DWORDLONG ScanDrive(IEmptyVolumeCacheCallBack* picb);
void ExecuteCleanup(IEmptyVolumeCacheCallBack *picb);
template<typename Fn>
void ForEach(Fn callback)
{
for (POSITION it = m_Handlers.GetHeadPosition(); it; m_Handlers.GetNext(it))
{
CCleanupHandler *current = m_Handlers.GetAt(it);
callback(current);
}
}
};

View File

@@ -0,0 +1,54 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CEmptyVolumeCacheCallBack definition / implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
// We don't really use this, but some windows handlers crash without it
struct CEmptyVolumeCacheCallBack
: public IEmptyVolumeCacheCallBack
{
STDMETHOD_(ULONG, AddRef)() throw()
{
return 2;
}
STDMETHOD_(ULONG, Release)() throw()
{
return 1;
}
STDMETHOD(QueryInterface)(
REFIID riid,
_COM_Outptr_ void** ppvObject) throw()
{
if (riid == IID_IUnknown || riid == IID_IEmptyVolumeCacheCallBack)
{
*ppvObject = (IUnknown*)this;
return S_OK;
}
*ppvObject = NULL;
return E_NOINTERFACE;
}
STDMETHODIMP ScanProgress(
_In_ DWORDLONG dwlSpaceUsed,
_In_ DWORD dwFlags,
_In_ LPCWSTR pcwszStatus) override
{
DPRINT("dwlSpaceUsed: %lld, dwFlags: %x\n", dwlSpaceUsed, dwFlags);
return S_OK;
}
STDMETHODIMP PurgeProgress(
_In_ DWORDLONG dwlSpaceFreed,
_In_ DWORDLONG dwlSpaceToFree,
_In_ DWORD dwFlags,
_In_ LPCWSTR pcwszStatus) override
{
DPRINT("dwlSpaceFreed: %lld, dwlSpaceToFree: %lld, dwFlags: %x\n", dwlSpaceFreed, dwlSpaceToFree, dwFlags);
return S_OK;
}
};

View File

@@ -0,0 +1,19 @@
add_executable(cleanmgr
cleanmgr.cpp
cleanmgr.h
cleanmgr.rc
resource.h
CEmptyVolumeCacheCallBack.hpp
CProgressDlg.hpp
CSelectDriveDlg.cpp
CCleanupHandler.cpp
CCleanupHandler.hpp
CCleanupHandlerList.cpp
CCleanupHandlerList.hpp
)
set_module_type(cleanmgr win32gui UNICODE)
target_link_libraries(cleanmgr uuid cpprt atl_classes)
add_importlibs(cleanmgr shlwapi oleaut32 ole32 shell32 comctl32 user32 advapi32 msvcrt kernel32 ntdll)
add_dependencies(cleanmgr psdk)
add_cd_file(TARGET cleanmgr DESTINATION reactos/system32 FOR all)

View File

@@ -0,0 +1,50 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Progress dialog implementation
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#pragma once
class CProgressDlg
{
CComPtr<IProgressDialog> m_spProgress;
DWORD m_dwTotal = 0;
public:
~CProgressDlg()
{
Stop();
}
void Start(DWORD dwTotalSteps, LPCWSTR Title, LPCWSTR Text)
{
HRESULT hr = CoCreateInstance(CLSID_ProgressDialog, NULL, CLSCTX_INPROC, IID_PPV_ARG(IProgressDialog, &m_spProgress));
if (FAILED_UNEXPECTEDLY(hr))
return;
m_dwTotal = dwTotalSteps;
m_spProgress->SetTitle(Title);
m_spProgress->SetLine(2, Text, TRUE, NULL);
m_spProgress->StartProgressDialog(NULL, NULL, PROGDLG_NOMINIMIZE, NULL);
m_spProgress->SetProgress(0, m_dwTotal);
}
void Step(DWORD dwProgress, LPCWSTR Text)
{
m_spProgress->SetProgress(dwProgress, m_dwTotal);
m_spProgress->SetLine(1, Text, TRUE, NULL);
}
void Stop()
{
if (m_spProgress)
{
m_spProgress->StopProgressDialog();
m_spProgress.Release();
}
}
};

View File

@@ -0,0 +1,80 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Drive selection dialog
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
class CSelectDriveDlg : public CDialogImpl<CSelectDriveDlg>
{
public:
enum { IDD = IDD_SELECTDRIVE };
BEGIN_MSG_MAP(CSelectDriveDlg)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDOK, OnEndDialog)
COMMAND_ID_HANDLER(IDCANCEL, OnEndDialog)
END_MSG_MAP()
CSelectDriveDlg()
:m_SelectedDrive(UNICODE_NULL)
{
}
LRESULT OnInitDialog(UINT, WPARAM, LPARAM, BOOL&)
{
// Try to find an existing instance of this dialog
WCHAR buf[300];
GetWindowTextW(buf, _countof(buf));
for (HWND hNext = NULL, hFind; (hFind = ::FindWindowExW(NULL, hNext, NULL, buf)) != NULL; hNext = hFind)
{
if (hFind != *this && ::IsWindowVisible(hFind))
{
::SetForegroundWindow(hFind);
EndDialog(IDCANCEL);
return FALSE;
}
}
CWindow cbo = GetDlgItem(IDC_DRIVES);
WCHAR VolumeNameBuffer[MAX_PATH + 1];
CStringW Tmp;
for (WCHAR Drive = 'A'; Drive <= 'Z'; ++Drive)
{
WCHAR RootPathName[] = { Drive,':','\\',0 };
UINT Type = GetDriveTypeW(RootPathName);
if (Type == DRIVE_FIXED)
{
GetVolumeInformationW(RootPathName, VolumeNameBuffer, _countof(VolumeNameBuffer), 0, 0, 0, 0, 0);
Tmp.Format(L"%s (%.2s)", VolumeNameBuffer, RootPathName);
int index = (int)cbo.SendMessage(CB_ADDSTRING, NULL, (LPARAM)Tmp.GetString());
cbo.SendMessage(CB_SETITEMDATA, index, Drive);
}
}
cbo.SendMessage(CB_SETCURSEL, 0);
return 1;
}
LRESULT OnEndDialog(WORD, WORD wID, HWND, BOOL&)
{
CWindow cbo = GetDlgItem(IDC_DRIVES);
m_SelectedDrive = (WCHAR)cbo.SendMessage(CB_GETITEMDATA, cbo.SendMessage(CB_GETCURSEL));
EndDialog(wID);
return 0;
}
WCHAR m_SelectedDrive;
};
void
SelectDrive(WCHAR &Drive)
{
CSelectDriveDlg dlgSelectDrive;
if (dlgSelectDrive.DoModal() == IDOK)
{
Drive = dlgSelectDrive.m_SelectedDrive;
}
}

View File

@@ -0,0 +1,328 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Disk cleanup entrypoint
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include "cleanmgr.h"
// for listview with extend style LVS_EX_CHECKBOXES, State image 1 is the unchecked box, and state image 2 is the
// checked box. see this: https://docs.microsoft.com/en-us/windows/win32/controls/extended-list-view-styles
#define STATEIMAGETOINDEX(x) (((x)&LVIS_STATEIMAGEMASK) >> 12)
#define STATEIMAGE_UNCHECKED 1
#define STATEIMAGE_CHECKED 2
struct CCleanMgrProperties :
public CPropertyPageImpl<CCleanMgrProperties>
{
enum { IDD = IDD_PROPERTIES_MAIN };
CWindow m_HandlerListControl;
WCHAR m_Drive;
DWORDLONG m_TotalSpaceUsed;
CCleanupHandlerList* m_HandlerList;
bool m_IgnoreChanges = true;
CCleanMgrProperties(WCHAR Drive, DWORDLONG TotalSpaceUsed, CCleanupHandlerList *handlerList)
: m_Drive(Drive)
, m_TotalSpaceUsed(TotalSpaceUsed)
, m_HandlerList(handlerList)
{
}
int OnApply()
{
CStringW Title(MAKEINTRESOURCE(IDS_DISK_CLEANUP));
CStringW Text(MAKEINTRESOURCE(IDS_CONFIRM_DELETE));
if (MessageBoxW(Text, Title, MB_YESNO | MB_ICONQUESTION) != IDYES)
return PSNRET_INVALID;
return PSNRET_NOERROR;
}
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HICON hIcon = (HICON)::LoadImageW(
_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDI_CLEANMGR), IMAGE_ICON, 0, 0,
LR_DEFAULTSIZE | LR_SHARED);
SendDlgItemMessage(IDC_DISKICON, STM_SETICON, (WPARAM)hIcon);
m_HandlerListControl = GetDlgItem(IDC_HANDLERLIST);
RECT rc;
m_HandlerListControl.GetClientRect(&rc);
rc.right -= GetSystemMetrics(SM_CXVSCROLL);
LV_COLUMN column = {};
column.mask = LVCF_FMT | LVCF_WIDTH;
column.fmt = LVCFMT_LEFT;
column.cx = rc.right * 80 / 100;
ListView_InsertColumn(m_HandlerListControl, 0, &column);
column.fmt = LVCFMT_RIGHT;
column.cx = rc.right * 20 / 100;
ListView_InsertColumn(m_HandlerListControl, 1, &column);
HIMAGELIST hImagelist = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR32, 1, 1);
ListView_SetImageList(m_HandlerListControl, hImagelist, LVSIL_SMALL);
ListView_SetExtendedListViewStyleEx(m_HandlerListControl, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
m_HandlerList->ForEach(
[&](CCleanupHandler *current)
{
if (!current->ShowHandler)
return;
LV_ITEM item = {};
item.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
item.lParam = (LPARAM)current;
item.pszText = (LPWSTR)current->wszDisplayName;
item.iItem = ListView_GetItemCount(m_HandlerListControl);
item.iImage = ImageList_AddIcon(hImagelist, current->hIcon);
item.iItem = ListView_InsertItem(m_HandlerListControl, &item);
ListView_SetCheckState(
m_HandlerListControl, item.iItem, !!(current->StateFlags & HANDLER_STATE_SELECTED));
item.mask = LVIF_TEXT;
WCHAR ByteSize[100] = {};
StrFormatByteSizeW(current->SpaceUsed, ByteSize, _countof(ByteSize));
ListView_SetItemText(m_HandlerListControl, item.iItem, 1, ByteSize);
});
// Now we should start responding to changes
m_IgnoreChanges = false;
// Select the first item
ListView_SetItemState(m_HandlerListControl, 0, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED);
UpdateSpaceUsed();
return TRUE;
}
CCleanupHandler* GetHandler(int Index)
{
LVITEMW item = {};
item.iItem = Index;
if (item.iItem >= 0)
{
item.mask = LVIF_PARAM;
ListView_GetItem(m_HandlerListControl, &item);
return (CCleanupHandler*)item.lParam;
}
return nullptr;
}
LRESULT OnDetails(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
CCleanupHandler *handler = GetHandler(ListView_GetNextItem(m_HandlerListControl, -1, LVIS_FOCUSED));
if (handler)
{
handler->Handler->ShowProperties(m_hWnd);
}
return 0L;
}
LRESULT OnHandlerItemchanged(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
if (idCtrl == IDC_HANDLERLIST)
{
// We are still initializing, don't respond to changes just yet!
if (m_IgnoreChanges)
return 0L;
LPNMLISTVIEW pnic = (LPNMLISTVIEW)pnmh;
// We only care about state changes
if (!(pnic->uChanged & LVIF_STATE))
return 0L;
INT ItemIndex = pnic->iItem;
if (ItemIndex == -1 || ItemIndex >= ListView_GetItemCount(pnic->hdr.hwndFrom))
{
return 0L;
}
bool GotSelected = (pnic->uNewState & LVIS_SELECTED) && !(pnic->uOldState & LVIS_SELECTED);
if (GotSelected)
{
CWindow DetailsButton = GetDlgItem(IDC_DETAILS);
CCleanupHandler* handler = (CCleanupHandler*)pnic->lParam;
SetDlgItemText(IDC_DESCRIPTION, handler->wszDescription ? handler->wszDescription : L"");
if (handler->HasSettings())
{
DetailsButton.ShowWindow(SW_SHOW);
DetailsButton.SetWindowText(handler->wszBtnText);
}
else
{
DetailsButton.ShowWindow(SW_HIDE);
}
}
int iOldState = STATEIMAGETOINDEX(pnic->uOldState);
int iNewState = STATEIMAGETOINDEX(pnic->uNewState);
if ((iOldState ^ iNewState) == (STATEIMAGE_UNCHECKED ^ STATEIMAGE_CHECKED))
{
CCleanupHandler* handler = (CCleanupHandler*)pnic->lParam;
if (iNewState == STATEIMAGE_CHECKED)
handler->StateFlags |= HANDLER_STATE_SELECTED;
else
handler->StateFlags &= ~HANDLER_STATE_SELECTED;
UpdateSpaceUsed();
}
}
return 0L;
}
void UpdateSpaceUsed()
{
CStringW tmp;
WCHAR ByteSize[100];
StrFormatByteSizeW(m_TotalSpaceUsed, ByteSize, _countof(ByteSize));
tmp.Format(IDS_TOTAL_CLEANABLE_CAPTION, ByteSize, m_Drive);
SetDlgItemText(IDC_TOTAL_CLEANABLE, tmp);
DWORDLONG SelectedGained = 0;
m_HandlerList->ForEach(
[&](CCleanupHandler *current)
{
if (current->StateFlags & HANDLER_STATE_SELECTED)
{
SelectedGained += current->SpaceUsed;
}
});
StrFormatByteSizeW(SelectedGained, ByteSize, _countof(ByteSize));
SetDlgItemText(IDC_SELECTED_GAINED, ByteSize);
}
BEGIN_MSG_MAP(CCleanMgrProperties)
MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
COMMAND_ID_HANDLER(IDC_DETAILS, OnDetails)
NOTIFY_HANDLER(IDC_HANDLERLIST, LVN_ITEMCHANGED, OnHandlerItemchanged)
CHAIN_MSG_MAP(CPropertyPageImpl<CCleanMgrProperties>) // Allow the default handler to call 'OnApply' etc
END_MSG_MAP()
};
class CCleanMgrModule : public ATL::CAtlExeModuleT< CCleanMgrModule >
{
public:
WCHAR m_Drive = UNICODE_NULL;
bool ParseCommandLine(
_In_z_ LPCTSTR lpCmdLine,
_Out_ HRESULT* pnRetCode) throw()
{
int argc = 0;
CLocalPtr<LPWSTR> argv(CommandLineToArgvW(lpCmdLine, &argc));
for (int n = 1; n < argc; ++n)
{
if ((argv[n][0] == '/' || argv[n][0] == '-') && towlower(argv[n][1]) == 'd')
{
if (iswalpha(argv[n][2]))
{
m_Drive = towupper(argv[n][2]);
continue;
}
if ((n + 1) < argc)
{
m_Drive = towupper(argv[n + 1][0]);
++n;
continue;
}
}
}
*pnRetCode = S_OK;
return true;
}
static inline UINT GetWindowProcessId(_In_ HWND hWnd)
{
DWORD pid;
return GetWindowThreadProcessId(hWnd, &pid) ? pid : 0;
}
static BOOL CALLBACK EnumSingleInstanceCallback(_In_ HWND hWnd, _In_ LPARAM lParam)
{
if (::IsWindowVisible(hWnd) && (LPARAM)GetWindowProcessId(hWnd) == lParam)
{
::SetForegroundWindow(hWnd);
return FALSE;
}
return TRUE;
}
HRESULT Run(_In_ int nShowCmd) throw()
{
if (m_Drive == UNICODE_NULL)
{
SelectDrive(m_Drive);
}
if (m_Drive == UNICODE_NULL)
return E_FAIL;
CStringW Title;
Title.Format(IDS_PROPERTIES_MAIN_TITLE, m_Drive);
HWND hWndInstance = ::CreateWindowExW(WS_EX_TOOLWINDOW, WC_STATIC, Title, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
for (HWND hNext = NULL, hFind; (hFind = ::FindWindowExW(NULL, hNext, WC_STATIC, Title)) != NULL; hNext = hFind)
{
if (hFind != hWndInstance)
{
::EnumWindows(EnumSingleInstanceCallback, GetWindowProcessId(hFind));
return S_FALSE;
}
}
CCleanupHandlerList Handlers;
CEmptyVolumeCacheCallBack CacheCallBack;
Handlers.LoadHandlers(m_Drive);
DWORDLONG TotalSpaceUsed = Handlers.ScanDrive(&CacheCallBack);
CCleanMgrProperties cleanMgr(m_Drive, TotalSpaceUsed, &Handlers);
HPROPSHEETPAGE hpsp[1] = { cleanMgr.Create() };
PROPSHEETHEADERW psh = { };
psh.dwSize = sizeof(psh);
psh.dwFlags = PSH_NOAPPLYNOW | PSH_USEICONID | PSH_NOCONTEXTHELP;
psh.hInstance = _AtlBaseModule.GetResourceInstance();
psh.pszIcon = MAKEINTRESOURCEW(IDI_CLEANMGR);
psh.pszCaption = Title;
psh.nPages = _countof(hpsp);
psh.phpage = hpsp;
if (PropertySheetW(&psh) >= 1)
{
::DestroyWindow(hWndInstance); // Allow new "cleanmgr /D" without waiting for these handlers
Handlers.ExecuteCleanup(&CacheCallBack);
}
else
{
::DestroyWindow(hWndInstance);
}
return S_OK;
}
};
CCleanMgrModule _AtlModule;
extern "C" int WINAPI wWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/,
LPWSTR /*lpCmdLine*/, int nShowCmd)
{
return _AtlModule.WinMain(nShowCmd);
}

View File

@@ -0,0 +1,66 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Main header file
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#pragma once
#ifndef STRICT
#define STRICT
#endif
#define _ATL_APARTMENT_THREADED
#define _ATL_NO_AUTOMATIC_NAMESPACE
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#define ATL_NO_ASSERT_ON_DESTROY_NONEXISTENT_WINDOW
#define _FORCENAMELESSUNION
#include <ndk/rtlfuncs.h>
#include <windef.h>
#include <winbase.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlstr.h>
#include <strsafe.h>
#include <emptyvc.h>
#include <atlcoll.h>
using namespace ATL;
#define NDEBUG
#include <reactos/debug.h>
#include <reactos/shellutils.h>
#include <ui/rosdlgs.h>
template <class T> class CLocalPtr
: public CHeapPtr<T, CLocalAllocator>
{
public:
CLocalPtr() throw()
{
}
explicit CLocalPtr(_In_ T* pData) throw() :
CHeapPtr<T, CLocalAllocator>(pData)
{
}
};
#include "resource.h"
#include "CProgressDlg.hpp"
#include "CCleanupHandler.hpp"
#include "CCleanupHandlerList.hpp"
#include "CEmptyVolumeCacheCallBack.hpp"
// CSelectDriveDlg.cpp
void
SelectDrive(WCHAR &Drive);

View File

@@ -0,0 +1,64 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Resources
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#include <windef.h>
#include <winuser.h>
#include <commctrl.h>
#include "resource.h"
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Disk Cleanup"
#define REACTOS_STR_INTERNAL_NAME "cleanmgr"
#define REACTOS_STR_ORIGINAL_FILENAME "cleanmgr.exe"
#include <reactos/version.rc>
#include <reactos/manifest_exe.rc>
IDI_CLEANMGR ICON "resources/cleanmgr.ico"
#pragma code_page(65001)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_PROPERTIES_MAIN_TITLE "Disk Cleanup for (%c:)"
IDS_TOTAL_CLEANABLE_CAPTION "You can use Disk Cleanup to free up to %s of disk space on (%c:)."
IDS_DISK_CLEANUP "Disk Cleanup"
IDS_CONFIRM_DELETE "Are you sure you want to delete these files permanently?"
IDS_CALCULATING "Disk Cleanup is calculating how much space can be gained on (%s)."
IDS_SCANNING "Scanning: %s"
IDS_CLEANING_CAPTION "Disk Cleanup is cleaning up files on %s."
IDS_CLEANING "Cleaning: %s"
END
IDD_PROPERTIES_MAIN DIALOGEX 0, 0, 235, 215
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Disk Cleanup"
FONT 8, "MS Shell Dlg", 400, 0, 0x0
BEGIN
CONTROL "",IDC_DISKICON,"Static",SS_ICON,6,6,20,20
LTEXT "You can use Disk Cleanup to free up to 0.0MB of disk space on drive C.",IDC_TOTAL_CLEANABLE,36,6,192,18
LTEXT "Files to delete:",IDC_STATIC,6,30,222,8
CONTROL "",IDC_HANDLERLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,6,42,222,66
LTEXT "Total amount of disk space gained:",IDC_STATIC,6,114,144,8
RTEXT "",IDC_SELECTED_GAINED,156,114,73,8
GROUPBOX "Description",IDC_STATIC,6,126,222,84
LTEXT "",IDC_DESCRIPTION,12,138,210,54
PUSHBUTTON "Details...",IDC_DETAILS,150,192,74,14
END
IDD_SELECTDRIVE DIALOGEX 0, 0, 177, 74
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Disk Cleanup - Select Drive"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,30,48,50,14
PUSHBUTTON "E&xit",IDCANCEL,96,48,50,14
LTEXT "Select the drive to clean up.",IDC_STATIC,12,6,150,8
COMBOBOX IDC_DRIVES,12,24,150,90,CBS_DROPDOWNLIST | CBS_HASSTRINGS | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
END

View File

@@ -0,0 +1,30 @@
/*
* PROJECT: ReactOS Disk Cleanup
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Resource definitions
* COPYRIGHT: Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
*/
#define IDC_STATIC -1
#define IDI_CLEANMGR 100
#define IDD_PROPERTIES_MAIN 200
#define IDC_DISKICON 201
#define IDC_TOTAL_CLEANABLE 202
#define IDC_HANDLERLIST 203
#define IDC_SELECTED_GAINED 204
#define IDC_DESCRIPTION 205
#define IDC_DETAILS 206
#define IDD_SELECTDRIVE 220
#define IDC_DRIVES 221
#define IDS_PROPERTIES_MAIN_TITLE 1000
#define IDS_TOTAL_CLEANABLE_CAPTION 1001
#define IDS_DISK_CLEANUP 1002
#define IDS_CONFIRM_DELETE 1003
#define IDS_CALCULATING 1004
#define IDS_SCANNING 1005
#define IDS_CLEANING_CAPTION 1006
#define IDS_CLEANING 1007

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@@ -3,6 +3,7 @@
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Implementation of Italian language for Clipboard Viewer
* COPYRIGHT: Copyright 2018 George Bișoc (george.bisoc@reactos.org)
* Copyright 2025 Gabriele Lo Re (gabrolr70@gmail.com)
*/
LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
@@ -39,12 +40,12 @@ END
STRINGTABLE
BEGIN
STRING_CLIPBOARD "Visualizzatore di Clipboard"
STRING_CLIPFILE "Elemento Clipboard"
STRING_DELETE_MSG "Cancella i contenuti del Clipboard?"
STRING_DELETE_TITLE "Cancella Clipboard"
STRING_FORMAT_NT "I file del Clipboard di ReactOS (*.clp)"
STRING_FORMAT_GEN "I file Clipboard (*.clp)"
STRING_CLIPBOARD "Visualizzatore Appunti condivisi"
STRING_CLIPFILE "Elemento appunti condivisi"
STRING_DELETE_MSG "Cancella i contenuti degli appunti condivisi?"
STRING_DELETE_TITLE "Cancella appunti condivisi"
STRING_FORMAT_NT "Appunti condivisi di ReactOS (*.clp)"
STRING_FORMAT_GEN "Appunti condivisi (*.clp)"
END
STRINGTABLE
@@ -67,6 +68,6 @@ END
STRINGTABLE
BEGIN
ERROR_UNSUPPORTED_FORMAT "Il Clipboard contiene informazioni in formato data, che non p essere visualizzato."
ERROR_INVALID_FILE_FORMAT "Il file selezionato non è un file di tipo clipboard valido."
ERROR_UNSUPPORTED_FORMAT "Gli appunti Condivisi contengono informazioni in formato data, che non possono essere visualizzate."
ERROR_INVALID_FILE_FORMAT "Il file selezionato non è un file di tipo appunti condivisi valido."
END

View File

@@ -2,12 +2,14 @@
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
list(APPEND SOURCE
certutil.c
asn.cpp
certutil.cpp
hashfile.cpp
precomp.h)
add_executable(certutil ${SOURCE})
set_module_type(certutil win32cui UNICODE)
target_link_libraries(certutil conutils ${PSEH_LIB})
add_importlibs(certutil advapi32 msvcrt kernel32)
add_importlibs(certutil crypt32 advapi32 msvcrt kernel32)
add_pch(certutil precomp.h SOURCE)
add_cd_file(TARGET certutil DESTINATION reactos/system32 FOR all)

View File

@@ -0,0 +1,508 @@
/*
* PROJECT: ReactOS certutil
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CertUtil asn implementation
* COPYRIGHT: Copyright 2020 Mark Jansen (mark.jansen@reactos.org)
*
* NOTES:
* To keep it simple, Tag and Class are combined in one identifier
* See for more details:
* https://en.wikipedia.org/wiki/X.690#BER_encoding
* https://www.strozhevsky.com/free_docs/asn1_by_simple_words.pdf
* http://mikk.net/~chris/asn1.pdf
*
* And for a test suite:
* https://github.com/YuryStrozhevsky/asn1-test-suite
*/
#include "precomp.h"
#include <math.h>
#include <wincrypt.h>
#include <stdlib.h>
#define ASN_TAG_IS_CONSTRUCTED 0x20
#define ASN_TAG_BITSTRING 0x03
#define ASN_TAG_OCTET_STRING 0x04
#define ASN_TAG_OBJECT_ID 0x06
#define ASN_TAG_SEQUENCE_RAW 0x10
#define ASN_TAG_SET_RAW 0x11
#define ASN_TAG_SEQUENCE 0x30
#define ASN_TAG_SET 0x31
#define ASN_TAG_CONTEXT_SPECIFIC 0x80
#define ASN_TAG_CONTEXT_SPECIFIC_N(n) (ASN_TAG_CONTEXT_SPECIFIC | (n))
#define ASN_TAG_OPTIONAL 0xA0
#define ASN_TAG_OPTIONAL_N(n) (ASN_TAG_OPTIONAL | (n))
/* NOTE: These names are not the names listed in f.e. the wikipedia pages,
they are made to look like MS's names for this */
LPCWSTR TagToName(DWORD dwTag)
{
switch (dwTag)
{
case 0x0: return L"EOC";
case 0x1: return L"BOOL";
case 0x2: return L"INTEGER";
case ASN_TAG_BITSTRING: return L"BIT_STRING";
case ASN_TAG_OCTET_STRING: return L"OCTET_STRING";
case 0x5: return L"NULL";
case ASN_TAG_OBJECT_ID: return L"OBJECT_ID";
case 0x7: return L"Object Descriptor";
case 0x8: return L"EXTERNAL";
case 0x9: return L"REAL";
case 0xA: return L"ENUMERATED";
case 0xB: return L"EMBEDDED PDV";
case 0xC: return L"UTF8String";
case 0xD: return L"RELATIVE-OID";
case 0xE: return L"TIME";
case 0xF: return L"Reserved";
case ASN_TAG_SEQUENCE_RAW: __debugbreak(); return L"SEQUENCE_RAW";
case ASN_TAG_SET_RAW: __debugbreak(); return L"SET_RAW";
case 0x12: return L"NumericString";
case 0x13: return L"PRINTABLE_STRING";
case 0x14: return L"T61String";
case 0x15: return L"VideotexString";
case 0x16: return L"IA5String";
case 0x17: return L"UTC_TIME";
case 0x18: return L"GeneralizedTime";
case 0x19: return L"GraphicString";
case 0x1A: return L"VisibleString";
case 0x1B: return L"GeneralString";
case 0x1C: return L"UniversalString";
case 0x1D: return L"CHARACTER STRING";
case 0x1E: return L"BMPString";
case 0x1F: return L"DATE";
case 0x20: return L"CONSTRUCTED";
case ASN_TAG_SEQUENCE: return L"SEQUENCE";
case ASN_TAG_SET: return L"SET";
case ASN_TAG_CONTEXT_SPECIFIC_N(0): return L"CONTEXT_SPECIFIC[0]";
case ASN_TAG_CONTEXT_SPECIFIC_N(1): return L"CONTEXT_SPECIFIC[1]";
case ASN_TAG_CONTEXT_SPECIFIC_N(2): return L"CONTEXT_SPECIFIC[2]";
case ASN_TAG_CONTEXT_SPECIFIC_N(3): return L"CONTEXT_SPECIFIC[3]";
case ASN_TAG_CONTEXT_SPECIFIC_N(4): return L"CONTEXT_SPECIFIC[4]";
case ASN_TAG_CONTEXT_SPECIFIC_N(5): return L"CONTEXT_SPECIFIC[5]";
case ASN_TAG_CONTEXT_SPECIFIC_N(6): return L"CONTEXT_SPECIFIC[6]";
case ASN_TAG_CONTEXT_SPECIFIC_N(7): return L"CONTEXT_SPECIFIC[7]";
case ASN_TAG_CONTEXT_SPECIFIC_N(8): return L"CONTEXT_SPECIFIC[8]";
case ASN_TAG_CONTEXT_SPECIFIC_N(9): return L"CONTEXT_SPECIFIC[9]";
/* Experiments show that Windows' certutil only goes up to 9 */
case ASN_TAG_OPTIONAL_N(0): return L"OPTIONAL[0]";
case ASN_TAG_OPTIONAL_N(1): return L"OPTIONAL[1]";
case ASN_TAG_OPTIONAL_N(2): return L"OPTIONAL[2]";
case ASN_TAG_OPTIONAL_N(3): return L"OPTIONAL[3]";
case ASN_TAG_OPTIONAL_N(4): return L"OPTIONAL[4]";
case ASN_TAG_OPTIONAL_N(5): return L"OPTIONAL[5]";
case ASN_TAG_OPTIONAL_N(6): return L"OPTIONAL[6]";
case ASN_TAG_OPTIONAL_N(7): return L"OPTIONAL[7]";
case ASN_TAG_OPTIONAL_N(8): return L"OPTIONAL[8]";
case ASN_TAG_OPTIONAL_N(9): return L"OPTIONAL[9]";
/* Experiments show that Windows' certutil only goes up to 9 */
default:
return L"???";
}
}
BOOL Move(DWORD dwLen, PBYTE& pData, DWORD& dwSize)
{
if (dwSize < dwLen)
return FALSE;
pData += dwLen;
dwSize -= dwLen;
return TRUE;
}
BOOL ParseTag(PBYTE& pData, DWORD& dwSize, DWORD& dwTagAndClass)
{
if (dwSize == 0)
return FALSE;
/* Is this a long form? */
if ((pData[0] & 0x1f) != 0x1f)
{
/* No, so extract the tag and class (in one identifier) */
dwTagAndClass = pData[0];
return Move(1, pData, dwSize);
}
DWORD dwClass = (pData[0] & 0xE0) >> 5;
dwTagAndClass = 0;
DWORD n;
for (n = 1; n < dwSize; ++n)
{
dwTagAndClass <<= 7;
dwTagAndClass |= (pData[n] & 0x7f);
if (!(pData[n] & 0x80))
{
break;
}
}
Move(n, pData, dwSize);
/* Any number bigger than this, we shift data out! */
if (n > 4)
return FALSE;
/* Just drop this in the hightest bits*/
dwTagAndClass |= (dwClass << (32-3));
return TRUE;
}
BOOL ParseLength(PBYTE& pData, DWORD& dwSize, DWORD& dwLength)
{
if (dwSize == 0)
return FALSE;
if (!(pData[0] & 0x80))
{
dwLength = pData[0];
return Move(1, pData, dwSize);
}
DWORD dwBytes = pData[0] & 0x7f;
if (dwBytes == 0 || dwBytes > 8 || dwBytes + 1 > dwSize)
{
return FALSE;
}
dwLength = 0;
for (DWORD n = 0; n < dwBytes; ++n)
{
dwLength <<= 8;
dwLength += pData[1 + n];
}
return Move(dwBytes + 1, pData, dwSize);
}
DWORD HexDump(PBYTE pRoot, PBYTE pData, DWORD dwSize, PWSTR wszPrefix)
{
while (TRUE)
{
SIZE_T Address = pData - pRoot;
ConPrintf(StdOut, L"%04x: ", Address);
ConPuts(StdOut, wszPrefix);
for (DWORD n = 0; n < min(dwSize, 0x10); ++n)
{
ConPrintf(StdOut, L"%02x ", pData[n]);
}
if (dwSize <= 0x10)
break;
Move(0x10, pData, dwSize);
ConPuts(StdOut, L"\n");
}
return 3 * dwSize;
}
void PrintTag(PBYTE pRoot, PBYTE pHeader, DWORD dwTag, DWORD dwTagLength, PBYTE pData, PWSTR wszPrefix)
{
DWORD dwRemainder = HexDump(pRoot, pHeader, pData - pHeader, wszPrefix);
LPCWSTR wszTag = TagToName(dwTag);
DWORD dwPadding = dwRemainder + wcslen(wszPrefix);
while (dwPadding > 50)
dwPadding -= 50;
ConPrintf(StdOut, L"%*s; %s (%x Bytes)\n", 50 - dwPadding, L"", wszTag, dwTagLength);
}
struct OID_NAMES
{
CHAR* Oid;
LPCWSTR Names[20];
DWORD NumberOfNames;
};
BOOL WINAPI CryptOIDEnumCallback(_In_ PCCRYPT_OID_INFO pInfo, _Inout_opt_ void *pvArg)
{
OID_NAMES* Names = (OID_NAMES*)pvArg;
if (pInfo && pInfo->pszOID && !_stricmp(pInfo->pszOID, Names->Oid))
{
if (Names->NumberOfNames < RTL_NUMBER_OF(Names->Names))
{
for (DWORD n = 0; n < Names->NumberOfNames; ++n)
{
// We already have this..
if (!_wcsicmp(Names->Names[n], pInfo->pwszName))
return TRUE;
}
Names->Names[Names->NumberOfNames++] = pInfo->pwszName;
}
}
return TRUE;
}
void PrintOID(PBYTE pRoot, PBYTE pHeader, PBYTE pData, DWORD dwSize, PWSTR wszPrefix)
{
/* CryptFindOIDInfo expects the OID to be in ANSI.. */
CHAR szOID[250];
CHAR* ptr = szOID;
size_t cchRemaining = RTL_NUMBER_OF(szOID);
/* CryptFindOIDInfo just returns the first, we want multiple */
OID_NAMES Names = {0};
if (dwSize == 0)
return;
DWORD dwValue = 0, count = 0;
for (DWORD n = 0; n < dwSize; ++n)
{
dwValue <<= 7;
dwValue |= pData[n] & 0x7f;
if (pData[n] & 0x80)
{
if (++count >= 4)
break;
continue;
}
count = 0;
/* First & second octet have a special encoding */
if (ptr == szOID)
{
DWORD id1 = dwValue / 40;
DWORD id2 = dwValue % 40;
/* The first one can only be 0, 1 or 2, so handle special case: tc24.ber */
if (id1 > 2)
{
id2 += (id1 - 2) * 40;
id1 = 2;
}
StringCchPrintfExA(ptr, cchRemaining, &ptr, &cchRemaining, 0, "%d.%d", id1, id2);
}
else
{
StringCchPrintfExA(ptr, cchRemaining, &ptr, &cchRemaining, 0, ".%d", dwValue);
}
dwValue = 0;
}
if (dwValue || count)
{
/* We cannot format this, so just add abort */
return;
}
SIZE_T Address = pData - pRoot;
/* Pad with spaces instead of printing the address again */
DWORD addrDigits = (DWORD)log10((double)Address) + 1;
ConPrintf(StdOut, L"%*s ", max(addrDigits, 4), L"");
ConPrintf(StdOut, L"%s; %S", wszPrefix, szOID);
Names.Oid = szOID;
/* The order does not match a naive call with '0'... */
CryptEnumOIDInfo(0, 0, &Names, CryptOIDEnumCallback);
for (DWORD n = 0; n < Names.NumberOfNames; ++n)
{
if (n == 0)
ConPrintf(StdOut, L" %s", Names.Names[n]);
else if (n == 1)
ConPrintf(StdOut, L" (%s", Names.Names[n]);
else
ConPrintf(StdOut, L" / %s", Names.Names[n]);
}
ConPrintf(StdOut, L"%s\n", Names.NumberOfNames > 1 ? L")" : L"");
}
BOOL ParseAsn(PBYTE pRoot, PBYTE pData, DWORD dwSize, PWSTR wszPrefix, BOOL fPrint)
{
while (dwSize)
{
PBYTE pHeader = pData;
DWORD dwTagAndClass;
if (!ParseTag(pData, dwSize, dwTagAndClass))
{
if (fPrint)
ConPrintf(StdOut, L"CertUtil: -asn command failed to parse tag near 0x%x\n", pHeader - pRoot);
return FALSE;
}
DWORD dwTagLength;
if (!ParseLength(pData, dwSize, dwTagLength))
{
if (fPrint)
ConPrintf(StdOut, L"CertUtil: -asn command failed to parse tag length near 0x%x\n", pHeader - pRoot);
return FALSE;
}
if (dwTagLength > dwSize)
{
if (fPrint)
ConPrintf(StdOut, L"CertUtil: -asn command malformed tag length near 0x%x\n", pHeader - pRoot);
return FALSE;
}
if (fPrint)
PrintTag(pRoot, pHeader, dwTagAndClass, dwTagLength, pData, wszPrefix);
size_t len = wcslen(wszPrefix);
StringCchCatW(wszPrefix, MAX_PATH, dwTagLength != dwSize ? L"| " : L" ");
if (dwTagAndClass & ASN_TAG_IS_CONSTRUCTED)
{
if (!ParseAsn(pRoot, pData, dwTagLength, wszPrefix, fPrint))
{
return FALSE;
}
}
else
{
if (fPrint)
{
/* Special case for a bit string / octet string */
if ((dwTagAndClass == ASN_TAG_BITSTRING || dwTagAndClass == ASN_TAG_OCTET_STRING) && dwTagLength)
{
if (dwTagAndClass == ASN_TAG_BITSTRING)
{
/* First, we print the 'unused bits' field of the bit string */
HexDump(pRoot, pData, 1, wszPrefix);
ConPuts(StdOut, L"\n");
/* Move past it */
Move(1, pData, dwSize);
dwTagLength--;
}
/* Do we have any data left? */
if (dwTagLength)
{
/* Try to parse this as ASN */
if (ParseAsn(pRoot, pData, dwTagLength, wszPrefix, FALSE))
{
/* We succeeded, this _could_ be ASN, so display it as if it is */
if (!ParseAsn(pRoot, pData, dwTagLength, wszPrefix, TRUE))
{
/* Uhhh, did someone edit the data? */
ConPrintf(StdOut, L"CertUtil: -asn command unexpected failure parsing tag near 0x%x\n", pData - pRoot);
return FALSE;
}
/* Move past what we just parsed */
Move(dwTagLength, pData, dwSize);
/* Lie about this so that we don't also print a hexdump */
dwTagLength = 0;
}
}
}
/* Is there any data (left) to print? */
if (dwTagLength)
{
HexDump(pRoot, pData, dwTagLength, wszPrefix);
ConPuts(StdOut, L"\n");
StringCchCatW(wszPrefix, MAX_PATH, L" ");
/* Do we have additional formatters? */
switch (dwTagAndClass)
{
case ASN_TAG_OBJECT_ID:
PrintOID(pRoot, pHeader, pData, dwTagLength, wszPrefix);
break;
default:
break;
}
}
}
}
wszPrefix[len] = '\0';
if (!Move(dwTagLength, pData, dwSize))
{
/* This should not be possible, it was checked before! */
return FALSE;
}
}
return TRUE;
}
BOOL asn_dump(LPCWSTR Filename)
{
HANDLE hFile = CreateFileW(Filename, GENERIC_READ, FILE_SHARE_READ, NULL,
OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
if (hFile == INVALID_HANDLE_VALUE)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to open: %d\n", GetLastError());
return FALSE;
}
DWORD dwSize = GetFileSize(hFile, NULL);
if (dwSize == INVALID_FILE_SIZE)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to get file size: %d\n", GetLastError());
CloseHandle(hFile);
return FALSE;
}
if (dwSize == 0)
{
ConPrintf(StdOut, L"CertUtil: -asn command got an empty file\n");
CloseHandle(hFile);
return FALSE;
}
PBYTE pData = (PBYTE)LocalAlloc(0, dwSize);
if (!pData)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to allocate: %d\n", GetLastError());
CloseHandle(hFile);
return FALSE;
}
DWORD cbRead;
BOOL fRead = ReadFile(hFile, pData, dwSize, &cbRead, NULL);
DWORD dwErr = GetLastError();
CloseHandle(hFile);
if (!fRead || cbRead != dwSize)
{
ConPrintf(StdOut, L"CertUtil: -asn command failed to read: %d\n", dwErr);
LocalFree(pData);
return FALSE;
}
WCHAR Buffer[MAX_PATH] = {0};
BOOL fSucceeded = ParseAsn(pData, pData, dwSize, Buffer, TRUE);
LocalFree(pData);
return fSucceeded;
}

View File

@@ -0,0 +1,107 @@
/*
* PROJECT: ReactOS certutil
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CertUtil commandline handling
* COPYRIGHT: Copyright 2020 Mark Jansen (mark.jansen@reactos.org)
*
* Note: Only -hashfile and -asn are implemented for now, the rest is not present!
*/
#include "precomp.h"
#include <wincrypt.h>
#include <stdlib.h>
typedef struct
{
LPCWSTR Name;
BOOL (*pfn)(LPCWSTR Filename);
} Verb;
Verb verbs[] = {
{ L"hashfile", hash_file },
{ L"asn", asn_dump },
};
static void print_usage()
{
ConPuts(StdOut, L"Verbs:\n");
ConPuts(StdOut, L" -hashfile -- Display cryptographic hash over a file\n");
ConPuts(StdOut, L" -asn -- Display ASN.1 encoding of a file\n");
ConPuts(StdOut, L"\n");
ConPuts(StdOut, L"CertUtil -? -- Display a list of all verbs\n");
ConPuts(StdOut, L"CertUtil -hashfile -? -- Display help text for the 'hashfile' verb\n");
}
Verb* MatchVerb(LPCWSTR arg)
{
if (arg[0] != '-' && arg[0] != '/')
return NULL;
for (size_t n = 0; n < RTL_NUMBER_OF(verbs); ++n)
{
if (!_wcsicmp(verbs[n].Name, arg + 1))
{
return verbs + n;
}
}
return NULL;
}
int wmain(int argc, WCHAR *argv[])
{
int n;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
if (argc == 1) /* i.e. no commandline arguments given */
{
print_usage();
return EXIT_SUCCESS;
}
for (n = 1; n < argc; ++n)
{
if (!_wcsicmp(argv[n], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
Verb* verb = MatchVerb(argv[n]);
if (verb)
{
if (argc != 3)
{
ConPrintf(StdOut, L"CertUtil: -%s expected 1 argument, got %d\n", verb->Name, argc - 2);
return EXIT_FAILURE;
}
if (!_wcsicmp(argv[n+1], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
if (!verb->pfn(argv[n+1]))
{
/* The verb prints the failure */
return EXIT_FAILURE;
}
ConPrintf(StdOut, L"CertUtil: -%s command completed successfully\n", verb->Name);
return EXIT_SUCCESS;
}
else
{
ConPrintf(StdOut, L"CertUtil: Unknown verb: %s\n", argv[n]);
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}

View File

@@ -1,10 +1,8 @@
/*
* PROJECT: ReactOS certutil
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: CertUtil stub
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: CertUtil hashfile implementation
* COPYRIGHT: Copyright 2020 Mark Jansen (mark.jansen@reactos.org)
*
* Note: Only -hashfile is implemented for now, the rest is not present!
*/
#include "precomp.h"
@@ -12,7 +10,7 @@
#include <stdlib.h>
static BOOL hash_file(LPCWSTR Filename)
BOOL hash_file(LPCWSTR Filename)
{
HCRYPTPROV hProv;
BOOL bSuccess = FALSE;
@@ -87,69 +85,3 @@ static BOOL hash_file(LPCWSTR Filename)
return bSuccess;
}
static void print_usage()
{
ConPuts(StdOut, L"Verbs:\n");
ConPuts(StdOut, L" -hashfile -- Display cryptographic hash over a file\n");
ConPuts(StdOut, L"\n");
ConPuts(StdOut, L"CertUtil -? -- Display a list of all verbs\n");
ConPuts(StdOut, L"CertUtil -hashfile -? -- Display help text for the 'hashfile' verb\n");
}
int wmain(int argc, WCHAR *argv[])
{
int n;
/* Initialize the Console Standard Streams */
ConInitStdStreams();
if (argc == 1) /* i.e. no commandline arguments given */
{
print_usage();
return EXIT_SUCCESS;
}
for (n = 1; n < argc; ++n)
{
if (!_wcsicmp(argv[n], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
else if (!_wcsicmp(argv[n], L"-hashfile"))
{
if (argc == 3)
{
if (!_wcsicmp(argv[n+1], L"-?"))
{
print_usage();
return EXIT_SUCCESS;
}
else
{
if (!hash_file(argv[n+1]))
{
/* hash_file prints the failure itself */
return EXIT_FAILURE;
}
ConPuts(StdOut, L"CertUtil: -hashfile command completed successfully\n");
return EXIT_SUCCESS;
}
}
else
{
ConPrintf(StdOut, L"CertUtil: -hashfile expected 1 argument, got %d\n", argc - 2);
return EXIT_FAILURE;
}
}
else
{
ConPrintf(StdOut, L"CertUtil: Unknown verb: %s\n", argv[n]);
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}

View File

@@ -7,10 +7,14 @@
#include <windef.h>
#include <winbase.h>
#include <winreg.h>
#include <winuser.h>
#include <strsafe.h>
#include <conutils.h>
BOOL hash_file(LPCWSTR Filename);
BOOL asn_dump(LPCWSTR Filename);
#endif /* __CERTUTIL_PRECOMP_H */

View File

@@ -1,5 +1,5 @@
add_definitions(-DCSCRIPT_BUILD -D__WINESRC__)
add_definitions(-DCSCRIPT_BUILD)
set(wscript_folder ${REACTOS_SOURCE_DIR}/base/applications/cmdutils/wscript)
include_directories(${wscript_folder})
@@ -20,3 +20,4 @@ add_importlibs(cscript shell32 oleaut32 ole32 advapi32 user32 msvcrt kernel32 nt
add_dependencies(cscript stdole2 cscript_idlheader)
add_pch(cscript ${wscript_folder}/precomp.h SOURCE)
add_cd_file(TARGET cscript DESTINATION reactos/system32 FOR all)
set_wine_module_FIXME(cscript) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -15,28 +15,7 @@
#include <winbase.h>
#include <winuser.h>
#include <wincon.h>
/* Console API functions which are absent from wincon.h */
#define EXENAME_LENGTH (255 + 1)
VOID
WINAPI
ExpungeConsoleCommandHistoryW(LPCWSTR lpExeName);
DWORD
WINAPI
GetConsoleCommandHistoryW(LPWSTR lpHistory,
DWORD cbHistory,
LPCWSTR lpExeName);
DWORD
WINAPI
GetConsoleCommandHistoryLengthW(LPCWSTR lpExeName);
BOOL
WINAPI
SetConsoleNumberOfCommandsW(DWORD dwNumCommands,
LPCWSTR lpExeName);
#include <wincon_undoc.h>
#include "doskey.h"

View File

@@ -2,40 +2,40 @@ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE
BEGIN
IDS_USAGE "Compares two files or sets of files and displays the differences between\n\
them.\n\
IDS_USAGE "Compare deux fichiers ou un ensemble de fichiers et affiche les différences\n\
entre eux.\n\
\n\
FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]\n\
[drive1:][path1]filename1 [drive2:][path2]filename2\n\
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
\n\
/A Displays only first and last lines for each set of differences.\n\
/B Performs a binary comparison.\n\
/C Disregards the case of letters.\n\
/L Compares files as ASCII text.\n\
/LBn Sets the maximum consecutive mismatches to the specified\n\
number of lines (default: 100).\n\
/N Displays the line numbers on an ASCII comparison.\n\
/OFF[LINE] Doesn't skip files with offline attribute set.\n\
/T Doesn't expand tabs to spaces (default: expand).\n\
/U Compare files as UNICODE text files.\n\
/W Compresses white space (tabs and spaces) for comparison.\n\
/nnnn Specifies the number of consecutive lines that must match\n\
after a mismatch (default: 2).\n\
/A Affiche uniquement la première et la dernière ligne pour chaque ensemble de différences.\n\
/B Effectue une comparaison binaire.\n\
/C Ne tient pas compte de la casse des lettres.\n\
/L Compare les fichiers sous forme de texte ASCII.\n\
/LBn Définit le nombre maximal de différences consécutives\n\
au nombre de lignes spécifié (par défaut : 100).\n\
/N Affiche les numéros de ligne sur une comparaison ASCII.\n\
/OFF[LINE] N'ignore pas les fichiers ayant l'attribut hors-ligne.\n\
/T Ne transforme pas les tabulations en espaces (par défaut : transformer).\n\
/U Compare les fichiers en tant que fichiers texte UNICODE.\n\
/W Compresse les espaces blancs (tabulations et espaces) pour la comparaison.\n\
/nnnn Spécifie le nombre de lignes consécutives qui doivent correspondre\n\
après une différence (par défaut : 2).\n\
[drive1:][path1]filename1\n\
Specifies the first file or set of files to compare.\n\
Spécifie le premier fichier ou ensemble de fichiers à comparer.\n\
[drive2:][path2]filename2\n\
Specifies the second file or set of files to compare.\n"
IDS_NO_DIFFERENCE "FC: no differences encountered\n"
IDS_LONGER_THAN "FC: %ls longer than %ls\n"
IDS_COMPARING "Comparing files %ls and %ls\n"
IDS_OUT_OF_MEMORY "FC: Out of memory\n"
IDS_CANNOT_READ "FC: cannot read from %ls\n"
IDS_INVALID_SWITCH "FC: Invalid Switch\n"
IDS_CANNOT_OPEN "FC: cannot open %ls - No such file or folder\n"
IDS_NEEDS_FILES "FC: Insufficient number of file specifications\n"
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
IDS_RESYNC_FAILED "Resync failed. Files are too different.\n"
Spécifie le second fichier ou ensemble de fichiers à comparer.\n"
IDS_NO_DIFFERENCE "FC: Aucune différence constatée\n"
IDS_LONGER_THAN "FC: %ls plus grand que %ls\n"
IDS_COMPARING "Compare les fichiers %ls et %ls\n"
IDS_OUT_OF_MEMORY "FC: Dépassement de mémoire\n"
IDS_CANNOT_READ "FC: Ne peut pas lire depuis %ls\n"
IDS_INVALID_SWITCH "FC: Option invalide\n"
IDS_CANNOT_OPEN "FC: Ne peut pas ouvrir %ls - Fichier ou répertoire inexistant\n"
IDS_NEEDS_FILES "FC: Nombre insuffisant de fichiers spécifiés\n"
IDS_CANT_USE_WILDCARD "Les caractères joker ('*' et '?') ne sont pas encore supportés\n"
IDS_DIFFERENT "FC: Les fichiers %ls et %ls sont différents\n"
IDS_TOO_LARGE "FC: Fichier %ls trop grand\n"
IDS_RESYNC_FAILED "La resynchronisation a échoué. Les fichiers sont trop différents.\n"
END

View File

@@ -2,40 +2,39 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Compares two files or sets of files and displays the differences between\n\
them.\n\
IDS_USAGE "2つのファイルまたはファイル セットを比較し、それらの違いを表示します。\n\
\n\
FC [/A] [/C] [/L] [/LBn] [/N] [/OFF[LINE]] [/T] [/U] [/W] [/nnnn]\n\
[drive1:][path1]filename1 [drive2:][path2]filename2\n\
FC /B [drive1:][path1]filename1 [drive2:][path2]filename2\n\
[ドライブ1:][パス1]ファイル名1 [ドライブ2:][パス2]ファイル名2\n\
FC /B [ドライブ1:][パス1]ファイル名1 [ドライブ2:][パス2]ファイル名2\n\
\n\
/A Displays only first and last lines for each set of differences.\n\
/B Performs a binary comparison.\n\
/C Disregards the case of letters.\n\
/L Compares files as ASCII text.\n\
/LBn Sets the maximum consecutive mismatches to the specified\n\
number of lines (default: 100).\n\
/N Displays the line numbers on an ASCII comparison.\n\
/OFF[LINE] Doesn't skip files with offline attribute set.\n\
/T Doesn't expand tabs to spaces (default: expand).\n\
/U Compare files as UNICODE text files.\n\
/W Compresses white space (tabs and spaces) for comparison.\n\
/nnnn Specifies the number of consecutive lines that must match\n\
after a mismatch (default: 2).\n\
[drive1:][path1]filename1\n\
Specifies the first file or set of files to compare.\n\
[drive2:][path2]filename2\n\
Specifies the second file or set of files to compare.\n"
IDS_NO_DIFFERENCE "FC: no differences encountered\n"
IDS_LONGER_THAN "FC: %ls longer than %ls\n"
IDS_COMPARING "Comparing files %ls and %ls\n"
IDS_OUT_OF_MEMORY "FC: Out of memory\n"
IDS_CANNOT_READ "FC: cannot read from %ls\n"
IDS_INVALID_SWITCH "FC: Invalid Switch\n"
IDS_CANNOT_OPEN "FC: cannot open %ls - No such file or folder\n"
IDS_NEEDS_FILES "FC: Insufficient number of file specifications\n"
IDS_CANT_USE_WILDCARD "Wildcard ('*' and '?') are not supported yet\n"
IDS_DIFFERENT "FC: File %ls and %ls are different\n"
IDS_TOO_LARGE "FC: File %ls too large\n"
IDS_RESYNC_FAILED "Resync failed. Files are too different.\n"
/A 各差分集合の最初の行と最後の行のみを表示します。\n\
/B バイナリ比較を実行します。\n\
/C 大文字と小文字を区別しません。\n\
/L ファイルを ASCII テキストとして比較します。\n\
/LBn 連続する不一致の最大数を指定された行数に設定します\n\
(デフォルト: 100)\n\
/N ASCII 比較の行番号を表示します。\n\
/OFF[LINE] オフライン属性が設定されたファイルをスキップしません。\n\
/T タブをスペースに展開しません (デフォルト: 展開する)。\n\
/U ファイルを UNICODE テキスト ファイルとして比較します。\n\
/W 比較のために空白 (タブとスペース) を圧縮します。\n\
/nnnn 不一致の後に一致する必要がある連続行の数を指定します\n\
(デフォルト: 2)\n\
[ドライブ1:][パス1]ファイル名1\n\
比較する最初のファイルまたはファイル集合を指定します。\n\
[ドライブ2:][パス2]ファイル名2\n\
比較する 2 番目のファイルまたはファイル集合を指定します。\n"
IDS_NO_DIFFERENCE "FC: 違いは見つかりませんでした\n"
IDS_LONGER_THAN "FC: %ls は %ls より長いです\n"
IDS_COMPARING "ファイル %ls %ls を比較しています\n"
IDS_OUT_OF_MEMORY "FC: メモリ不足\n"
IDS_CANNOT_READ "FC: %ls から読み取れません\n"
IDS_INVALID_SWITCH "FC: 無効なスイッチ\n"
IDS_CANNOT_OPEN "FC: %ls を開けません - そのようなファイルまたはフォルダはありません\n"
IDS_NEEDS_FILES "FC: ファイル指定が必要です\n"
IDS_CANT_USE_WILDCARD "ワイルドカード(「*」と「?」)はまだサポートされていません\n"
IDS_DIFFERENT "FC: ファイル %ls %ls は異なります\n"
IDS_TOO_LARGE "FC: ファイル %ls が大きすぎます\n"
IDS_RESYNC_FAILED "再同期に失敗しました。ファイルが違いすぎます。\n"
END

View File

@@ -4,14 +4,14 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_NO_ENTRY "This command is not supported by the help utility.\nTry ""%s /?"".\n"
IDS_NO_ENTRY "このコマンドはヘルプ ユーティリティではサポートされていません。\n「%s /?」を試してください。\n"
END
STRINGTABLE
BEGIN
IDS_USAGE "Provides Help information for ReactOS commands.\n\n\
HELP [command]\n\n\
command - Display help information for this command.\n"
IDS_USAGE "ReactOS コマンドのヘルプ情報を提供します。\n\n\
HELP [コマンド]\n\n\
コマンド - このコマンドのヘルプ情報を表示します。\n"
IDS_HELP1 "利用可能なすべてのコマンドの一覧と、その説明。\n\n\
help コマンド\n\
コマンド /? 特定のコマンドに関する詳細情報\n\n\
@@ -43,7 +43,7 @@ IF バッチ プログラム中で条件処理を実行します。\n\
LABEL ディスクのボリューム ラベルを表示または変更します。\n\
MD ディレクトリを作成します。\n\
MKDIR ディレクトリを作成します。\n\
MKLINK Creates a filesystem link object.\n\
MKLINK ファイルシステム リンク オブジェクトを作成します。\n\
MOVE ファイルを移動およびファイルとディレクトリ名を変更します。\n\
PATH 実行可能ファイルの検索パスを表示または設定します。\n\
PAUSE バッチ プログラムの処理を一時停止し、メッセージを表示します。\n\

View File

@@ -2,9 +2,9 @@
remove_definitions(-D_WIN32_WINNT=0x502)
add_definitions(-D_WIN32_WINNT=0x600)
add_definitions(-D__WINESRC__)
add_executable(reg add.c copy.c delete.c export.c import.c query.c reg.c reg.rc)
set_module_type(reg win32cui UNICODE)
target_link_libraries(reg wine oldnames)
add_importlibs(reg advapi32 advapi32_vista user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET reg DESTINATION reactos/system32 FOR all)
set_wine_module_FIXME(reg) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -2,180 +2,180 @@ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Usage:\n\
REG [operation] [parameters]\n\n\
Supported operations:\n\
STRING_USAGE, "使い方:\n\
REG [操作] [引数]\n\n\
サポートされた操作:\n\
ADD | COPY | DELETE | EXPORT | IMPORT | QUERY\n\n\
For help on a specific operation, type:\n\
REG [operation] /?\n\n"
特定の操作に関するヘルプを表示するには、次のように入力します。\n\
REG [操作] /?\n\n"
STRING_ADD_USAGE, "REG ADD <key> [/v value_name | /ve] [/t type] [/s separator] [/d data] [/f]\n\n\
Adds a key to the registry or adds a new value to a given registry key.\n\n\
<key>\n\
The registry key to add or, if either [/v] or [/ve] is specified,\n\
the key in which to add the new registry data.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_ADD_USAGE, "REG ADD <キー> [/v 値名 | /ve] [/t 種類] [/s 区切り] [/d データ] [/f]\n\n\
レジストリにキーを追加するか、指定されたレジストリ キーに新しい値を追加します。\n\n\
<キー>\n\
追加するレジストリ キー、または [/v] または [/ve] のいずれかが指定されて\n\
いる場合は、新しいレジストリ データを追加するキー。\n\n\
形式: <ルート>\\<サブキー>\n\n\
<ルート>: 定義済みのレジストリ キー。次のいずれかである必要があります。\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
/v <value_name>\n\
The name of the registry value to add.\n\n\
<サブキー>: 指定された <ルート> キーの下のレジストリ キーへの完全なパス。\n\n\
/v <値名>\n\
追加するレジストリ値の名前。\n\n\
/ve\n\
Add an unnamed registry value. This option modifies the (Default)\n\
registry value.\n\n\
/t <type>\n\
The type of data to add to the registry. If [/t] is specified,\n\
<type> must be one of the following:\n\n\
名前のないレジストリ値を追加します。このオプションは(既定の)レジストリ\n\
値を変更します。\n\n\
/t <種類>\n\
レジストリに追加するデータの種類。 [/t] が指定されている場合、<種類> は\n\
次のいずれかである必要があります。\n\n\
REG_SZ | REG_MULTI_SZ | REG_EXPAND_SZ\n\
REG_DWORD | REG_BINARY | REG_NONE\n\n\
If [/t] is not specified, the default data type is REG_SZ.\n\n\
/s <separator>\n\
The character used to separate strings in REG_MULTI_SZ data.\n\
If [/s] is not specified, the default separator is \\0.\n\n\
/d <data>\n\
The data to add to the new registry value.\n\n\
[/t]が指定されていない場合、デフォルトのデータ型は REG_SZ になります。\n\n\
/s <区切り>\n\
REG_MULTI_SZ データ内の文字列を区切るために使用される文字。\n\
[/s] が指定されていない場合、デフォルトの区切り文字は \\0 になります。\n\n\
/d <データ>\n\
新しいレジストリ値に追加するデータ。\n\n\
/f\n\
Modify the registry without prompting for confirmation.\n\n"
確認を求めずにレジストリを変更します。\n\n"
STRING_DELETE_USAGE, "REG DELETE <key> [/v value_name | /ve | /va] [/f]\n\n\
Deletes a registry key (including all subkeys and values), or deletes\n\
one or more values from a given registry key.\n\n\
STRING_DELETE_USAGE, "REG DELETE <キー> [/v 値名 | /ve | /va] [/f]\n\n\
レジストリ キー (すべてのサブキーと値を含む) を削除するか、指定された\n\
レジストリ キーから 1 つ以上の値を削除します。\n\n\
<key>\n\
The registry key to delete or, if one of [/v], [/ve] or [/va] is\n\
specified, the registry key in which to delete one or more values.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
削除するレジストリ キー、または [/v][/ve][/va] のいずれかが指定されて\n\
いる場合は、1 つ以上の値を削除するレジストリ キー。\n\n\
形式: <ルート>\\<サブキー>\n\n\
ルート: 定義済みのレジストリ キー。次のいずれかである必要があります。\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
/v <value_name>\n\
The name of the registry value to delete.\n\n\
サブキー: 指定された <ルート> キーの下のレジストリ キーへの完全なパス。\n\n\
/v <値名>\n\
削除するレジストリ値の名前。\n\n\
/ve\n\
Delete an unnamed registry value. This option deletes the (Default)\n\
registry value.\n\n\
名前のないレジストリ値を削除します。このオプションは、(既定の) \n\
レジストリ値を削除します。\n\n\
/va\n\
Delete all values from a registry key.\n\n\
レジストリ キーからすべての値を削除します。\n\n\
/f\n\
Delete a registry key (including all subkeys and values) without\n\
prompting for confirmation.\n\n"
確認を求めることなくレジストリ キー (すべてのサブキーと値を含む) を削除します。\n\n"
STRING_QUERY_USAGE, "REG QUERY <key> [/v value_name | /ve] [/s]\n\n\
Queries a specified registry key and lists all immediate subkeys, values\n\
and data within that key. Use [/s] to recursively query each subkey.\n\n\
<key>\n\
The registry key to query.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_QUERY_USAGE, "REG QUERY <キー> [/v 値名 | /ve] [/s]\n\n\
指定されたレジストリキーを照会し、そのキーに含まれるすべてのサブキー、値、\n\
およびデータを一覧表示します。[/s] を使用すると、各サブキーを再帰的に照会できます。\n\n\
<キー>\n\
照会するレジストリ キー。\n\n\
形式: <ルート>\\<サブキー>\n\n\
<ルート>: 定義済みのレジストリ キー。次のいずれかである必要があります。\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
/v <value_name>\n\
The name of the registry value to query. If neither [/v] nor [/ve] is\n\
specified, all values under <key> are listed.\n\n\
<サブキー>: 指定された <ルート> キーの下のレジストリ キーへの完全なパス。\n\n\
/v <値名>\n\
照会するレジストリ値の名前。[/v] [/ve] も指定されていない場合は、\n\
<キー> の下のすべての値がリストされます。\n\n\
/ve\n\
Query an unnamed registry value. This option queries the (Default)\n\
registry value.\n\n\
名前のないレジストリ値を照会します。このオプションは、(既定の) \n\
レジストリ値を照会します。\n\n\
/s\n\
List all registry entries under <key> and its subkeys.\n\n"
<キー> とそのサブキーの下にあるすべてのレジストリ エントリを一覧表示します。\n\n"
STRING_SUCCESS, "操作は正常に完了しました\n"
STRING_INVALID_KEY, "エラー: キー名が無効です\n"
STRING_INVALID_CMDLINE, "エラー: コマンド ライン引数が無効です\n"
STRING_NO_REMOTE, "エラー: リモート マシンにキーを追加できませんでした\n"
STRING_VALUE_NONEXIST, "エラー: システムは指定されたキーまたは値を見つけられませんでした\n"
STRING_UNSUPPORTED_TYPE, "reg: Unsupported registry data type [%1]\n"
STRING_MISSING_NUMBER, "reg: The option [/d] must be followed by a valid numeric value\n"
STRING_MISSING_HEXDATA, "reg: The option [/d] must be followed by a valid hexadecimal value\n"
STRING_UNHANDLED_TYPE, "reg: Unhandled registry data type [/t 0x%1!x!, /d %2]\n"
STRING_OVERWRITE_VALUE, "The registry value '%1' already exists. Do you want to overwrite it?"
STRING_UNSUPPORTED_TYPE, "reg: サポートされていないレジストリ データ型 [%1]\n"
STRING_MISSING_NUMBER, "reg: オプション[/d]の後には有効な数値を続ける必要があります\n"
STRING_MISSING_HEXDATA, "reg: オプション[/d]の後には有効な16進数値を続ける必要があります\n"
STRING_UNHANDLED_TYPE, "reg: 未処理のレジストリデータ型 [/t 0x%1!x!, /d %2]\n"
STRING_OVERWRITE_VALUE, "レジストリ値 '%1' は既に存在します。上書きしますか?"
STRING_YES, "Y"
STRING_NO, "N"
STRING_ALL, "A"
STRING_YESNO, " (Yes|No)"
STRING_YESNOALL, " (Yes|No|All)"
STRING_CANCELLED, "reg: The registry operation was cancelled\n"
STRING_DEFAULT_VALUE, "(Default)"
STRING_DELETE_VALUE, "Are you sure you want to delete the registry value '%1'?"
STRING_DELETE_VALUEALL, "Are you sure you want to delete all registry values in '%1'?"
STRING_DELETE_SUBKEY, "Are you sure you want to delete the registry key '%1'?"
STRING_INVALID_STRING, "reg: The option [/d] must be followed by a valid string\n"
STRING_VALUEALL_FAILED, "reg: Unable to delete all registry values in '%1'\n"
STRING_MATCHES_FOUND, "Search complete. Number of matches found: %1!d!\n"
STRING_INVALID_SYNTAX, "reg: Invalid syntax. "
STRING_INVALID_OPTION, "reg: Invalid option [%1]. "
STRING_REG_HELP, "Type ""REG /?"" for help.\n"
STRING_FUNC_HELP, "Type ""REG %1 /?"" for help.\n"
STRING_VALUE_NOT_SET, "(value not set)"
STRING_YESNO, " (はい(Y)|いいえ(N))"
STRING_YESNOALL, " (はい(Y)|いいえ(N)|すべて(A))"
STRING_CANCELLED, "reg: レジストリ操作はキャンセルされました\n"
STRING_DEFAULT_VALUE, "(デフォルト)"
STRING_DELETE_VALUE, "レジストリ値 '%1' を削除してもよろしいですか?"
STRING_DELETE_VALUEALL, "'%1' 内のすべてのレジストリ値を削除してもよろしいですか?"
STRING_DELETE_SUBKEY, "レジストリ キー '%1' を削除してもよろしいですか?"
STRING_INVALID_STRING, "reg: オプション[/d]の後に有効な文字列を続ける必要があります\n"
STRING_VALUEALL_FAILED, "reg: '%1' のすべてのレジストリ値を削除できません\n"
STRING_MATCHES_FOUND, "検索が完了しました。一致した件数: %1!d!\n"
STRING_INVALID_SYNTAX, "reg: 無効な文法"
STRING_INVALID_OPTION, "reg: 無効なオプション [%1]. "
STRING_REG_HELP, "ヘルプを表示するには、「REG /?」と入力してください。\n"
STRING_FUNC_HELP, "ヘルプを表示するには「REG %1 /?」と入力してください.\n"
STRING_VALUE_NOT_SET, "(未設定の値)"
STRING_IMPORT_USAGE, "REG IMPORT <file>\n\n\
Imports keys, values and data from a given file into the registry.\n\n\
<file>\n\
The name and path of the registry file to import.\n\n"
STRING_IMPORT_USAGE, "REG IMPORT <ファイル>\n\n\
指定されたファイルからキー、値、データをレジストリにインポートします。\n\n\
<ファイル>\n\
インポートするレジストリ ファイルの名前とパス。\n\n"
STRING_FILE_NOT_FOUND, "reg: The file '%1' was not found.\n"
STRING_ESCAPE_SEQUENCE, "reg: Unrecognized escape sequence [\\%1!c!]\n"
STRING_FILE_NOT_FOUND, "reg: ファイル '%1' が見つかりませんでした。\n"
STRING_ESCAPE_SEQUENCE, "reg: 認識されないエスケープシーケンス [\\%1!c!]\n"
STRING_EXPORT_USAGE, "REG EXPORT <key> <file> [/y]\n\n\
Exports a specified registry key (including all subkeys and values)\n\
to a file.\n\n\
<key>\n\
The registry key to export.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_EXPORT_USAGE, "REG EXPORT <キー> <ファイル> [/y]\n\n\
指定されたレジストリ キー (すべてのサブキーと値を含む) をファイルに\n\
エクスポートします。\n\n\
<キー>\n\
エクスポートするレジストリ キー。\n\n\
形式: <ルート>\\<サブキー>\n\n\
<ルート>: 定義済みのレジストリ キー。次のいずれかである必要があります。\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
<file>\n\
The name and path of the registry file that will be created.\n\
This file must have a .reg extension.\n\n\
<サブキー>: 指定された <ルート> キーの下のレジストリ キーへの完全なパス。\n\n\
<ファイル>\n\
作成されるレジストリ ファイルの名前とパス。\n\
このファイルには .reg 拡張子が必要です。\n\n\
/y\n\
Overwrite <file> without prompting for confirmation.\n\n"
確認のプロンプトを表示せずに <ファイル> を上書きします。\n\n"
STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key\n"
STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?"
STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n"
STRING_KEY_IMPORT_FAILED, "reg: Unable to import the registry key '%1'\n"
STRING_INVALID_SYSTEM_KEY, "reg: 無効なシステム キー\n"
STRING_OVERWRITE_FILE, "ファイル '%1' は既に存在します。上書きしますか?"
STRING_KEY_NONEXIST, "reg: 指定されたレジストリキーが見つかりません\n"
STRING_KEY_IMPORT_FAILED, "reg: レジストリキーをインポートできません '%1'\n"
STRING_REG_VIEW_USAGE, " /reg:32\n\
Access the registry using the 32-bit view.\n\n\
32 ビット ビューを使用してレジストリにアクセスします。\n\n\
/reg:64\n\
Access the registry using the 64-bit view.\n\n"
STRING_ACCESS_DENIED, "reg: Unable to access or create the specified registry key\n"
64 ビット ビューを使用してレジストリにアクセスします。\n\n"
STRING_ACCESS_DENIED, "reg: 指定されたレジストリキーにアクセスまたは作成できません\n"
STRING_COPY_USAGE, "REG COPY <key1> <key2> [/s] [/f]\n\n\
Copies the contents of a specified registry key to another location.\n\
By default, this operation only copies registry values. Use [/s] to\n\
recursively copy all subkeys and values.\n\n\
<key1>, <key2>\n\
Registry keys specifying the source (<key1>) and destination (<key2>)\n\
of the data. If <key2> does not exist, it is created.\n\n\
Format: ROOT\\Subkey\n\n\
ROOT: A predefined registry key. This must be one of the following:\n\n\
STRING_COPY_USAGE, "REG COPY <キー1> <キー2> [/s] [/f]\n\n\
指定されたレジストリ キーの内容を別の場所にコピーします。\n\
デフォルトでは、この操作はレジストリ値のみをコピーします。[/s] を使用して、\n\
すべてのサブキーと値を再帰的にコピーします。\n\n\
<キー1>, <キー2>\n\
データのコピー元(<キー1>) とコピー先 (<キー2>) を指定するレジストリ キー。\n\
<キー2> が存在しない場合は作成されます。\n\n\
形式: <ルート>\\<サブキー>\n\n\
<ルート>: 定義済みのレジストリ キー。次のいずれかである必要があります。\n\n\
HKEY_LOCAL_MACHINE | HKLM\n\
HKEY_CURRENT_USER | HKCU\n\
HKEY_CLASSES_ROOT | HKCR\n\
HKEY_USERS | HKU\n\
HKEY_CURRENT_CONFIG | HKCC\n\n\
Subkey: The full path to a registry key under a given ROOT key.\n\n\
<サブキー>: 指定された <ルート> キーの下のレジストリ キーへの完全なパス。\n\n\
/s\n\
Copy all subkeys and values from <key1> to <key2>.\n\n\
<キー1> から <キー2> にすべてのサブキーと値をコピーします。\n\n\
/f\n\
Overwrite all registry data in <key2> without prompting for confirmation.\n\
This option does not modify subkeys and values that only exist in <key2>.\n\n"
確認のプロンプトを表示せずに、<キー2> 内のすべてのレジストリ\n\
データを上書きします。\n\
このオプションは、<キー2> にのみ存在するサブキーと値を変更しません。\n\n"
STRING_COPY_SRC_DEST_SAME, "reg: The source and destination keys cannot be the same\n"
STRING_COPY_CONFIRM, "The value '%1\\%2' already exists in the destination key. Do you want to overwrite it?"
STRING_COPY_SRC_DEST_SAME, "reg: コピー元キーとコピー先キーは同じにすることはできません\n"
STRING_COPY_CONFIRM, " '%1\\%2' はコピー先キーに既に存在します。上書きしますか?"
}

View File

@@ -1,7 +1,7 @@
add_definitions(-D__WINESRC__)
add_executable(taskkill taskkill.c taskkill.rc)
target_link_libraries(taskkill wine)
set_module_type(taskkill win32cui UNICODE)
add_importlibs(taskkill psapi user32 msvcrt kernel32 ntdll)
add_importlibs(taskkill user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET taskkill DESTINATION reactos/system32 FOR all)
set_wine_module_FIXME(taskkill) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -2,7 +2,7 @@ LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im Prozess Name | /pid Prozess ID]\n"
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im Prozess Name | /pid Prozess ID] [/t]\n"
STRING_INVALID_OPTION, "Fehler: Unbekannte oder ungülige Kommandozeilenoption angegeben.\n"
STRING_INVALID_PARAM, "Fehler: Ungültiger Kommandozeilenparameter angegeben.\n"
STRING_MISSING_OPTION, "Fehler: Eine der Optionen /im oder /pid muss angegeben werden.\n"
@@ -16,6 +16,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Fehler: Prozessliste kann nicht aufgebaut werden.\n"
STRING_TERMINATE_FAILED, "Fehler: Prozess ""%1"" kann nicht beendet werden.\n"
STRING_SELF_TERMINATION, "Fehler: Der Prozess kann sich nicht selbst beenden.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -2,7 +2,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID]\n"
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID] [/t]\n"
STRING_INVALID_OPTION, "Error: Unknown or invalid command line option specified.\n"
STRING_INVALID_PARAM, "Error: Invalid command line parameter specified.\n"
STRING_MISSING_OPTION, "Error: One of options /im or /pid must be specified.\n"
@@ -10,12 +10,16 @@ STRINGTABLE
STRING_MUTUAL_EXCLUSIVE, "Error: Options /im and /pid are mutually exclusive.\n"
STRING_CLOSE_PID_SEARCH, "Close message sent to top-level windows of process with PID %1!u!.\n"
STRING_CLOSE_PROC_SRCH, "Close message sent to top-level windows of process ""%1"" with PID %2!u!.\n"
STRING_TERM_PID_SEARCH, "Process with PID %1!u! was forcibly terminated.\n"
STRING_TERM_PROC_SEARCH, "Process ""%1"" with PID %2!u! was forcibly terminated.\n"
STRING_TERM_PID_SEARCH, "The process with PID %1!u! has been terminated.\n"
STRING_TERM_PROC_SEARCH, "The process ""%1"" with PID %2!u! has been terminated.\n"
STRING_SEARCH_FAILED, "Error: Could not find process ""%1"".\n"
STRING_ENUM_FAILED, "Error: Unable to enumerate the process list.\n"
STRING_TERMINATE_FAILED, "Error: Unable to terminate process ""%1"".\n"
STRING_SELF_TERMINATION, "Error: Process self-termination is not permitted.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -9,7 +9,7 @@ LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Uso: taskkill [/?] [/f] [/im NomeProcesso | /pid IDProcesso]\n"
STRING_USAGE, "Uso: taskkill [/?] [/f] [/im NomeProcesso | /pid IDProcesso] [/t]\n"
STRING_INVALID_OPTION, "Errore: L'opzione specificata è invalida o sconosciuta.\n"
STRING_INVALID_PARAM, "Errore: Il parametro di comando a riga è invalido.\n"
STRING_MISSING_OPTION, "Errore: Specifica una delle opzioni /im oppure /pid.\n"
@@ -23,6 +23,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Errore: Impossibile enumerare la lista dei processi.\n"
STRING_TERMINATE_FAILED, "Errore: Impossibile terminare il processo ""%1"".\n"
STRING_SELF_TERMINATION, "Errore: L'auto-terminazione non è consentita.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -1,15 +1,16 @@
/*
* PROJECT: Kończy procesy
* LICENSE: See COPYING in the top level directory
* PROJECT: Task termination utility
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
* PURPOSE: Polish resource file
* COPYRIGHT: Copyright 2018 George Bișoc (george.bisoc@reactos.org)
* Updated by pithwz - Piotr Hetnarowicz (piotrhwz@gmail.com) (April, 2020)
* TRANSLATORS: Copyright 2018 Adam Słaboń <asaillen456esx@gmail.com>
* Copyright 2020-2025 Piotr Hetnarowicz <piotrhwz@gmail.com>
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Sposób użycia: taskkill [/?] [/f] [/im nazwa_procesu | /pid id_procesu]\n"
STRING_USAGE, "Sposób użycia: taskkill [/?] [/f] [/im nazwa_procesu | /pid id_procesu] [/t]\n"
STRING_INVALID_OPTION, "Błąd: Określono nieznaną lub nieprawidłową opcję.\n"
STRING_INVALID_PARAM, "Błąd: Nieprawidłowy parametr.\n"
STRING_MISSING_OPTION, "Błąd: Nie określono opcji /im ani /pid.\n"
@@ -23,6 +24,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Błąd: Nie można wyliczyć listy procesów.\n"
STRING_TERMINATE_FAILED, "Błąd: Nie można zakończyć procesu ""%1"".\n"
STRING_SELF_TERMINATION, "Błąd: Proces nie może zakończyć sam siebie.\n"
// STRING_CLOSE_CHILD, "Wysłano sygnał zakończenia do procesu o identyfikatorze PID %1!u!, będącego procesem podrzędnym procesu PID %2!u!.\n"
STRING_CLOSE_CHILD, "Wysłano komunikat zamknięcia do okien najwyższego poziomu procesu PID %1!u!, będącego procesem podrzędnym procesu PID %2!u!.\n"
STRING_TERM_CHILD, "Proces o identyfikatorze PID %1!u! (podrzędny procesowi PID %2!u!) został zakończony.\n"
STRING_TERM_CHILD_FAILED, "Błąd: Nie można zakończyć procesu PID %1!u!, będącego procesem podrzędnym PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Błąd: Nieprawidłowa składnia. Opcja '%1' nie jest dozwolona więcej niż '%2!d!' razy.\n"
STRING_INVALID_SYNTAX, "Błąd: Nieprawidłowa składnia.\n"
}

View File

@@ -10,7 +10,7 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Utilizare: taskkill [/?] [/f] [/im NumeProces | /pid IdProces]\n"
STRING_USAGE, "Utilizare: taskkill [/?] [/f] [/im NumeProces | /pid IdProces] [/t]\n"
STRING_INVALID_OPTION, "Eroare: Opțiune specificată nevalidă sau necunoscută.\n"
STRING_INVALID_PARAM, "Eroare: Parametrul de comandă specificat este nevalid.\n"
STRING_MISSING_OPTION, "Eroare: Trebuie specificată una dintre opțiunile /im sau /pid.\n"
@@ -24,6 +24,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Eroare: Nu se poate enumera lista de procese.\n"
STRING_TERMINATE_FAILED, "Eroare: Procesul «%1» nu poate fi oprit.\n"
STRING_SELF_TERMINATION, "Eroare: Auto-terminarea nu este permisă.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Eroare: Sintaxă nevalidă. Opțiunea '%1' nu este permisă mai mult de '%2!d!' dată(dăți).\n"
STRING_INVALID_SYNTAX, "Eroare: Sintaxă nevalidă.\n"
}

View File

@@ -4,7 +4,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
STRINGTABLE
{
STRING_USAGE, "Использование: TASKKILL [/F] [/IM <образ> | /PID <процесс>]\n"
STRING_USAGE, "Использование: TASKKILL [/F] [/IM <образ> | /PID <процесс>] [/t]\n"
STRING_INVALID_OPTION, "Ошибка: Указаны неверные параметры командной строки.\n"
STRING_INVALID_PARAM, "Ошибка: Указаны неверные параметры командной строки.\n"
STRING_MISSING_OPTION, "Ошибка: Должен быть указан параметр /im или /pid.\n"
@@ -18,6 +18,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Ошибка: Не удается получить список процессов.\n"
STRING_TERMINATE_FAILED, "Ошибка: Не удается завершить процесс ""%1"".\n"
STRING_SELF_TERMINATION, "Ошибка: Процесс не может завершить сам себя.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Ошибка: Неверный синтаксис. Нельзя использовать опцию '%1' больше '%2!d!' раз(а).\n"
STRING_INVALID_SYNTAX, "Ошибка: Неверный синтаксис.\n"
}

View File

@@ -6,7 +6,7 @@ LANGUAGE LANG_ALBANIAN, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID]\n"
STRING_USAGE, "Usage: taskkill [/?] [/f] [/im ProcessName | /pid ProcessID] [/t]\n"
STRING_INVALID_OPTION, "Gabim: Panjohur ose i pavlefshëm opsioni linjes komandes i specifikuar.\n"
STRING_INVALID_PARAM, "Gabim: Pavlefshëm parametri i specifikuar ne linjen e komandes.\n"
STRING_MISSING_OPTION, "Gabim: Njera nga opsionet /im ose /pid duhet te specifikohet.\n"
@@ -20,6 +20,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Gabim: Në pamundësi për të numëruar listën proceseve.\n"
STRING_TERMINATE_FAILED, "Gabim: Pamundur mbyllja e proceseve ""%1"".\n"
STRING_SELF_TERMINATION, "Gabim: Procesi vetë-përfundimi nuk është i lejuar.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Error: Invalid syntax. '%1' option is not allowed more than '%2!d!' time(s).\n"
STRING_INVALID_SYNTAX, "Error: Invalid syntax.\n"
}

View File

@@ -4,7 +4,7 @@ LANGUAGE LANG_TURKISH, SUBLANG_NEUTRAL
STRINGTABLE
{
STRING_USAGE, "Kullanım: taskkill [/?] [/f] [/im işlem adı | /pid işlem kimliği]\n"
STRING_USAGE, "Kullanım: taskkill [/?] [/f] [/im işlem adı | /pid işlem kimliği] [/t]\n"
STRING_INVALID_OPTION, "Hata: Bilinmeyen veya geçersiz komut satırı seçeneği belirtildi.\n"
STRING_INVALID_PARAM, "Hata: Geçersiz komut satırı değişkeni belirtildi.\n"
STRING_MISSING_OPTION, "Hata: /im ve /pid seçeneklerinden biri belirtilmeli.\n"
@@ -18,6 +18,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "Hata: İşlem numaralandırılamıyor.\n"
STRING_TERMINATE_FAILED, "Hata: ""%1"" işlemi sonlandırılamıyor.\n"
STRING_SELF_TERMINATION, "Hata: İşlemi kendi kendine sonlandırmaya izin verilmedi.\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "Hata: Geçersiz sözdizimi. '%1' seçeneğine '%2!d!'den fazla kez izin verilmiyor..\n"
STRING_INVALID_SYNTAX, "Hata: Geçersiz sözdizimi.\n"
}

View File

@@ -7,7 +7,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
STRINGTABLE
{
STRING_USAGE, "用法taskkill [/?] [/f] [/im 进程名称 | /pid 进程 ID]\n"
STRING_USAGE, "用法taskkill [/?] [/f] [/im 进程名称 | /pid 进程 ID] [/t]\n"
STRING_INVALID_OPTION, "错误:指定了未知或无效的命令行选项。\n"
STRING_INVALID_PARAM, "错误:指定了无效的命令行参数。\n"
STRING_MISSING_OPTION, "错误:必须指定选项 /im 或 /pid。\n"
@@ -21,6 +21,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "错误:无法枚举进程列表。\n"
STRING_TERMINATE_FAILED, "错误:无法终止进程“%1”。\n"
STRING_SELF_TERMINATION, "错误:不允许终止自身。\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "错误:无效语法。选项“%1”不允许超过“%2!d!”次。\n"
STRING_INVALID_SYNTAX, "错误:无效语法。\n"
}

View File

@@ -11,7 +11,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
STRINGTABLE
{
STRING_USAGE, "用法: taskkill [/?] [/f] [/im 處理程序名稱 | /pid PID]\n"
STRING_USAGE, "用法: taskkill [/?] [/f] [/im 處理程序名稱 | /pid PID] [/t]\n"
STRING_INVALID_OPTION, "錯誤: 指定了不明或不正確的命令列選項。\n"
STRING_INVALID_PARAM, "錯誤: 指定了不正確的命令列參數。\n"
STRING_MISSING_OPTION, "錯誤: 必須指定選項 /im 或 /pid 的其中之一。\n"
@@ -25,6 +25,10 @@ STRINGTABLE
STRING_ENUM_FAILED, "錯誤: 無法列舉處理程序清單。\n"
STRING_TERMINATE_FAILED, "錯誤: 無法終止處理程序 '%1'。\n"
STRING_SELF_TERMINATION, "錯誤: 處理程序不允許自我終止。\n"
// STRING_CLOSE_CHILD, "Sent termination signal to process with PID %1!u!, child of PID %2!u!.\n"
STRING_CLOSE_CHILD, "Close message sent to top-level windows of process with PID %1!u!, child of PID %2!u!.\n"
STRING_TERM_CHILD, "The process with PID %1!u! (child process of PID %2!u!) has been terminated.\n"
STRING_TERM_CHILD_FAILED, "Error: Unable to terminate process with PID %1!u!, child of PID %2!u!.\n"
STRING_PARAM_TOO_MUCH, "錯誤: 無效的語法。'%1' 選項不允許超過 '%2!d!' 次。\n"
STRING_INVALID_SYNTAX, "錯誤: 無效的語法。\n"
}

View File

@@ -4,6 +4,7 @@
* Copyright 2008 Andrew Riedi
* Copyright 2010 Andrew Nguyen
* Copyright 2020 He Yang
* Copyright 2025 Hermès Bélusca-Maïto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -22,28 +23,47 @@
#include <stdlib.h>
#include <windows.h>
#include <psapi.h>
#include <tlhelp32.h>
#include <wine/debug.h>
#include <wine/unicode.h>
#ifdef __REACTOS__
#define wcsicmp _wcsicmp
#endif
#include "taskkill.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskkill);
static BOOL force_termination = FALSE;
static BOOL kill_child_processes = FALSE;
static WCHAR **task_list;
static unsigned int task_count;
static struct
{
PROCESSENTRY32W p;
BOOL matched;
BOOL is_numeric;
}
*process_list;
static unsigned int process_count;
struct pid_close_info
{
DWORD pid;
BOOL found;
};
#ifdef __REACTOS__
unsigned int* pkill_list;
DWORD pkill_size;
DWORD self_pid;
#endif
#ifdef __REACTOS__
static WCHAR opForceTerminate[] = L"f";
static WCHAR opImage[] = L"im";
static WCHAR opPID[] = L"pid";
static WCHAR opHelp[] = L"?";
static WCHAR opTerminateChildren[] = L"t";
static PWCHAR opList[] = {opForceTerminate, opImage, opPID, opHelp, opTerminateChildren};
static PWCHAR opList[] = {L"f", L"im", L"pid", L"?", L"t"};
#define OP_PARAM_INVALID -1
@@ -55,41 +75,32 @@ static PWCHAR opList[] = {opForceTerminate, opImage, opPID, opHelp, opTerminateC
#endif // __REACTOS__
struct pid_close_info
{
DWORD pid;
BOOL found;
};
static int taskkill_vprintfW(const WCHAR *msg, __ms_va_list va_args)
static int taskkill_vprintfW(const WCHAR *msg, va_list va_args)
{
int wlen;
DWORD count, ret;
DWORD count;
WCHAR msg_buffer[8192];
wlen = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, msg, 0, 0, msg_buffer,
ARRAY_SIZE(msg_buffer), &va_args);
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL);
if (!ret)
if (!WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), msg_buffer, wlen, &count, NULL))
{
DWORD len;
char *msgA;
/* On Windows WriteConsoleW() fails if the output is redirected. So fall
* back to WriteFile(), assuming the console encoding is still the right
* one in that case.
* back to WriteFile() using OEM code page.
*/
len = WideCharToMultiByte(GetConsoleOutputCP(), 0, msg_buffer, wlen,
len = WideCharToMultiByte(GetOEMCP(), 0, msg_buffer, wlen,
NULL, 0, NULL, NULL);
msgA = HeapAlloc(GetProcessHeap(), 0, len);
msgA = malloc(len);
if (!msgA)
return 0;
WideCharToMultiByte(GetConsoleOutputCP(), 0, msg_buffer, wlen, msgA, len,
NULL, NULL);
WideCharToMultiByte(GetOEMCP(), 0, msg_buffer, wlen, msgA, len, NULL, NULL);
WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), msgA, len, &count, FALSE);
HeapFree(GetProcessHeap(), 0, msgA);
free(msgA);
}
return count;
@@ -97,39 +108,38 @@ static int taskkill_vprintfW(const WCHAR *msg, __ms_va_list va_args)
static int WINAPIV taskkill_printfW(const WCHAR *msg, ...)
{
__ms_va_list va_args;
va_list va_args;
int len;
__ms_va_start(va_args, msg);
va_start(va_args, msg);
len = taskkill_vprintfW(msg, va_args);
__ms_va_end(va_args);
va_end(va_args);
return len;
}
static int WINAPIV taskkill_message_printfW(int msg, ...)
{
__ms_va_list va_args;
va_list va_args;
WCHAR msg_buffer[8192];
int len;
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer));
__ms_va_start(va_args, msg);
va_start(va_args, msg);
len = taskkill_vprintfW(msg_buffer, va_args);
__ms_va_end(va_args);
va_end(va_args);
return len;
}
static int taskkill_message(int msg)
{
static const WCHAR formatW[] = {'%','1',0};
WCHAR msg_buffer[8192];
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, ARRAY_SIZE(msg_buffer));
return taskkill_printfW(formatW, msg_buffer);
return taskkill_printfW(L"%1", msg_buffer);
}
/* Post WM_CLOSE to all top-level windows belonging to the process with specified PID. */
@@ -149,72 +159,204 @@ static BOOL CALLBACK pid_enum_proc(HWND hwnd, LPARAM lParam)
return TRUE;
}
static DWORD *enumerate_processes(DWORD *list_count)
static BOOL enumerate_processes(void)
{
DWORD *pid_list, alloc_bytes = 1024 * sizeof(*pid_list), needed_bytes;
unsigned int alloc_count = 128;
void *realloc_list;
HANDLE snapshot;
pid_list = HeapAlloc(GetProcessHeap(), 0, alloc_bytes);
if (!pid_list)
return NULL;
snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
if (snapshot == INVALID_HANDLE_VALUE)
return FALSE;
for (;;)
process_list = malloc(alloc_count * sizeof(*process_list));
if (!process_list)
return FALSE;
process_list[0].p.dwSize = sizeof(process_list[0].p);
if (!Process32FirstW(snapshot, &process_list[0].p))
return FALSE;
do
{
DWORD *realloc_list;
if (!EnumProcesses(pid_list, alloc_bytes, &needed_bytes))
process_list[process_count].is_numeric = FALSE;
process_list[process_count++].matched = FALSE;
if (process_count == alloc_count)
{
HeapFree(GetProcessHeap(), 0, pid_list);
return NULL;
}
/* EnumProcesses can't signal an insufficient buffer condition, so the
* only way to possibly determine whether a larger buffer is required
* is to see whether the written number of bytes is the same as the
* buffer size. If so, the buffer will be reallocated to twice the
* size. */
if (alloc_bytes != needed_bytes)
break;
alloc_bytes *= 2;
realloc_list = HeapReAlloc(GetProcessHeap(), 0, pid_list, alloc_bytes);
alloc_count *= 2;
realloc_list = realloc(process_list, alloc_count * sizeof(*process_list));
if (!realloc_list)
{
HeapFree(GetProcessHeap(), 0, pid_list);
return NULL;
}
pid_list = realloc_list;
}
*list_count = needed_bytes / sizeof(*pid_list);
return pid_list;
}
static BOOL get_process_name_from_pid(DWORD pid, WCHAR *buf, DWORD chars)
{
HANDLE process;
HMODULE module;
DWORD required_size;
process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid);
if (!process)
return FALSE;
if (!EnumProcessModules(process, &module, sizeof(module), &required_size))
{
CloseHandle(process);
return FALSE;
process_list = realloc_list;
}
if (!GetModuleBaseNameW(process, module, buf, chars))
{
CloseHandle(process);
return FALSE;
}
CloseHandle(process);
process_list[process_count].p.dwSize = sizeof(process_list[process_count].p);
} while (Process32NextW(snapshot, &process_list[process_count].p));
CloseHandle(snapshot);
return TRUE;
}
static void mark_task_process(const WCHAR *str, int *status_code)
{
#ifndef __REACTOS__
DWORD self_pid = GetCurrentProcessId();
#endif
const WCHAR *p = str;
BOOL is_numeric;
unsigned int i;
DWORD pid;
is_numeric = TRUE;
while (*p)
{
if (!iswdigit(*p++))
{
is_numeric = FALSE;
break;
}
}
if (is_numeric)
{
pid = wcstol(str, NULL, 10);
for (i = 0; i < process_count; ++i)
{
if (process_list[i].p.th32ProcessID == pid)
break;
}
if (i == process_count || process_list[i].matched)
goto not_found;
process_list[i].matched = TRUE;
process_list[i].is_numeric = TRUE;
if (pid == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
*status_code = 1;
}
#ifdef __REACTOS__
else
{
pkill_list[pkill_size++] = i;
}
#endif
return;
}
for (i = 0; i < process_count; ++i)
{
if (!wcsicmp(process_list[i].p.szExeFile, str) && !process_list[i].matched)
{
process_list[i].matched = TRUE;
if (process_list[i].p.th32ProcessID == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
*status_code = 1;
}
#ifdef __REACTOS__
else
{
pkill_list[pkill_size++] = i;
continue;
}
#endif
return;
}
}
#ifdef __REACTOS__
// Cannot find any process matching the PID or name
if (pkill_size == 0)
{
#endif
not_found:
taskkill_message_printfW(STRING_SEARCH_FAILED, str);
*status_code = 128;
#ifdef __REACTOS__
}
#endif
}
static void taskkill_message_print_process(int msg, unsigned int index)
{
WCHAR pid_str[16];
if (!process_list[index].is_numeric)
{
taskkill_message_printfW(msg, process_list[index].p.szExeFile);
return;
}
wsprintfW(pid_str, L"%lu", process_list[index].p.th32ProcessID);
taskkill_message_printfW(msg, pid_str);
}
#ifndef __REACTOS__
/*
* Below is the Wine method of terminating child processes.
* Its problem is that it doesn't terminate them in either a parent-to-children
* or children-to-parent relationship, but instead in the order in which they
* appear in the process list. This differs from Windows' (or ReactOS) method.
* Wine's termination ordering can cause problems in scenarii where e.g. a
* parent process could re-spawn killed children processes, or, where it is
* of interest to kill the parent process first and then its children.
*
* NOTE: The following two functions implicitly assume that the process list
* obtained from the system, is such that any child process P[j] of a given
* parent process P[i] is enumerated *AFTER* its parent (i.e. i < j).
*
* Because of these facts, the ReactOS method is employed instead.
* Note however that the Wine method (below) has been adapted for
* ease of usage and comparison with that of ReactOS.
*/
static BOOL find_parent(unsigned int process_index, unsigned int *parent_index)
{
DWORD parent_id = process_list[process_index].p.th32ParentProcessID;
unsigned int i;
if (!parent_id)
return FALSE;
for (i = 0; i < process_count; ++i)
{
if (process_list[i].p.th32ProcessID == parent_id)
{
*parent_index = i;
return TRUE;
}
}
return FALSE;
}
static void mark_child_processes(void)
{
unsigned int i, parent;
for (i = 0; i < process_count; ++i)
{
if (process_list[i].matched)
continue;
#ifdef __REACTOS__
// Prevent self-termination if we are in the process tree
if (process_list[i].p.th32ProcessID == self_pid)
continue;
#endif
parent = i;
while (find_parent(parent, &parent))
{
if (process_list[parent].matched)
{
WINE_TRACE("Adding child %04lx.\n", process_list[i].p.th32ProcessID);
process_list[i].matched = TRUE;
#ifdef __REACTOS__
pkill_list[pkill_size++] = i;
#endif
break;
}
}
}
}
#endif // !__REACTOS__
/* The implemented task enumeration and termination behavior does not
* exactly match native behavior. On Windows:
*
@@ -230,258 +372,202 @@ static BOOL get_process_name_from_pid(DWORD pid, WCHAR *buf, DWORD chars)
* A PID of zero causes taskkill to warn about the inability to terminate
* system processes. */
#ifndef __REACTOS__
#ifdef __REACTOS__
static int send_close_messages(void)
static BOOL get_pid_creation_time(DWORD pid, FILETIME *time)
{
DWORD *pid_list, pid_list_size;
DWORD self_pid = GetCurrentProcessId();
HANDLE process;
FILETIME t1, t2, t3;
BOOL success;
process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
if (!process)
return FALSE;
success = GetProcessTimes(process, time, &t1, &t2, &t3);
CloseHandle(process);
return success;
}
static void queue_children(DWORD ppid)
{
FILETIME parent_creation_time;
unsigned int i;
int status_code = 0;
pid_list = enumerate_processes(&pid_list_size);
if (!pid_list)
{
taskkill_message(STRING_ENUM_FAILED);
return 1;
}
if (!get_pid_creation_time(ppid, &parent_creation_time))
return;
for (i = 0; i < task_count; i++)
for (i = 0; i < process_count; ++i)
{
WCHAR *p = task_list[i];
BOOL is_numeric = TRUE;
FILETIME child_creation_time;
DWORD pid;
/* Determine whether the string is not numeric. */
while (*p)
{
if (!isdigitW(*p++))
{
is_numeric = FALSE;
break;
}
}
if (is_numeric)
{
DWORD pid = atoiW(task_list[i]);
struct pid_close_info info = { pid };
// Ignore processes already marked for termination
if (process_list[i].matched)
continue;
// Prevent self-termination if we are in the process tree
pid = process_list[i].p.th32ProcessID;
if (pid == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
status_code = 1;
continue;
}
EnumWindows(pid_enum_proc, (LPARAM)&info);
if (info.found)
taskkill_message_printfW(STRING_CLOSE_PID_SEARCH, pid);
else
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
}
else
{
DWORD index;
BOOL found_process = FALSE;
for (index = 0; index < pid_list_size; index++)
{
WCHAR process_name[MAX_PATH];
if (get_process_name_from_pid(pid_list[index], process_name, MAX_PATH) &&
!strcmpiW(process_name, task_list[i]))
{
struct pid_close_info info = { pid_list[index] };
found_process = TRUE;
if (pid_list[index] == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
status_code = 1;
if (!get_pid_creation_time(pid, &child_creation_time))
continue;
}
EnumWindows(pid_enum_proc, (LPARAM)&info);
taskkill_message_printfW(STRING_CLOSE_PROC_SRCH, process_name, pid_list[index]);
}
}
if (!found_process)
// Compare creation time to avoid PID reuse cases
if (process_list[i].p.th32ParentProcessID == ppid &&
CompareFileTime(&parent_creation_time, &child_creation_time) < 0)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
// Process marked for termination
WINE_TRACE("Adding child %04lx.\n", pid);
process_list[i].matched = TRUE;
pkill_list[pkill_size++] = i;
}
}
}
HeapFree(GetProcessHeap(), 0, pid_list);
return status_code;
/*
* Based on the root processes to terminate, we perform a level order traversal
* (Breadth First Search) of the corresponding process trees, building the list
* of all processes and children to terminate,
* This allows terminating the processes, starting from parents down to their
* children. Note that this is in the reverse order than what Windows' taskkill
* does. The reason why we chose to do the reverse, is because there exist
* (parent) processes that detect whether their children are terminated, and
* if so, attempt to restart their terminated children. We want to avoid this
* scenario in order to ensure no extra processes get started, while the user
* wanted to terminate them.
*/
static void mark_child_processes(void)
{
/*
* The temporary FIFO queue for BFS (starting empty), is embedded
* inside the result list. The queue resides between the [front, end)
* indices (if front == end, the queue is empty), and moves down
* through the result list, generating the sought values in order.
*/
unsigned int front = 0; // end = 0; given by pkill_size
/* The root processes have already been
* enqueued in pkill_list[0..pkill_size] */
/* Now, find and enqueue the children processes */
while (pkill_size - front > 0)
{
/* Begin search at the next level */
unsigned int len = pkill_size - front;
unsigned int i;
for (i = 0; i < len; ++i)
{
/* Standard BFS would pop the element from the front of
* the queue and push it to the end of the result list.
* In our case, everything is already correctly positioned
* so that we can just simply emulate queue front popping. */
DWORD pid = process_list[pkill_list[front++]].p.th32ProcessID;
/* Enqueue the children processes */
queue_children(pid); // Updates pkill_size accordingly.
}
}
}
#endif // __REACTOS__
#ifdef __REACTOS__
static int terminate_processes(BOOL force_termination)
#else
static int terminate_processes(void)
#endif
static int send_close_messages(void)
{
DWORD *pid_list, pid_list_size;
DWORD self_pid = GetCurrentProcessId();
const WCHAR *process_name;
struct pid_close_info info;
unsigned int i;
int status_code = 0;
pid_list = enumerate_processes(&pid_list_size);
if (!pid_list)
#ifdef __REACTOS__
DWORD index;
for (index = 0; index < pkill_size; ++index)
#else
for (i = 0; i < process_count; i++)
#endif
{
taskkill_message(STRING_ENUM_FAILED);
return 1;
}
for (i = 0; i < task_count; i++)
{
WCHAR *p = task_list[i];
BOOL is_numeric = TRUE;
/* Determine whether the string is not numeric. */
while (*p)
{
if (!isdigitW(*p++))
{
is_numeric = FALSE;
break;
}
}
if (is_numeric)
{
DWORD pid = atoiW(task_list[i]);
#ifndef __REACTOS__
HANDLE process;
#ifdef __REACTOS__
i = pkill_list[index];
#else
if (!process_list[i].matched)
continue;
#endif
if (pid == self_pid)
info.pid = process_list[i].p.th32ProcessID;
process_name = process_list[i].p.szExeFile;
info.found = FALSE;
WINE_TRACE("Terminating pid %04lx.\n", info.pid);
EnumWindows(pid_enum_proc, (LPARAM)&info);
if (info.found)
{
taskkill_message(STRING_SELF_TERMINATION);
status_code = 1;
if (kill_child_processes)
taskkill_message_printfW(STRING_CLOSE_CHILD, info.pid, process_list[i].p.th32ParentProcessID);
else if (process_list[i].is_numeric)
taskkill_message_printfW(STRING_CLOSE_PID_SEARCH, info.pid);
else
taskkill_message_printfW(STRING_CLOSE_PROC_SRCH, process_name, info.pid);
continue;
}
taskkill_message_print_process(STRING_SEARCH_FAILED, i);
status_code = 128;
}
return status_code;
}
static int terminate_processes(void)
{
const WCHAR *process_name;
unsigned int i;
int status_code = 0;
HANDLE process;
DWORD pid;
#ifdef __REACTOS__
if (force_termination)
{
HANDLE process;
DWORD index;
for (index = 0; index < pkill_size; ++index)
#else
for (i = 0; i < process_count; i++)
#endif
{
#ifdef __REACTOS__
i = pkill_list[index];
#else
if (!process_list[i].matched)
continue;
#endif
pid = process_list[i].p.th32ProcessID;
process_name = process_list[i].p.szExeFile;
process = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
if (!process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
taskkill_message_print_process(STRING_SEARCH_FAILED, i);
status_code = 128;
continue;
}
if (!TerminateProcess(process, 0))
if (!TerminateProcess(process, 1))
{
taskkill_message_printfW(STRING_TERMINATE_FAILED, task_list[i]);
#ifdef __REACTOS__
if (kill_child_processes)
taskkill_message_printfW(STRING_TERM_CHILD_FAILED, pid, process_list[i].p.th32ParentProcessID);
else
#endif
taskkill_message_print_process(STRING_TERMINATE_FAILED, i);
status_code = 1;
CloseHandle(process);
continue;
}
if (kill_child_processes)
taskkill_message_printfW(STRING_TERM_CHILD, pid, process_list[i].p.th32ParentProcessID);
else if (process_list[i].is_numeric)
taskkill_message_printfW(STRING_TERM_PID_SEARCH, pid);
else
taskkill_message_printfW(STRING_TERM_PROC_SEARCH, process_name, pid);
CloseHandle(process);
#ifdef __REACTOS__
}
else
{
struct pid_close_info info = { pid };
EnumWindows(pid_enum_proc, (LPARAM)&info);
if (info.found)
taskkill_message_printfW(STRING_CLOSE_PID_SEARCH, pid);
else
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
}
#endif
}
else
{
DWORD index;
BOOL found_process = FALSE;
for (index = 0; index < pid_list_size; index++)
{
WCHAR process_name[MAX_PATH];
if (get_process_name_from_pid(pid_list[index], process_name, MAX_PATH) &&
!strcmpiW(process_name, task_list[i]))
{
#ifdef __REACTOS__
found_process = TRUE;
#else
HANDLE process;
#endif
if (pid_list[index] == self_pid)
{
taskkill_message(STRING_SELF_TERMINATION);
status_code = 1;
continue;
}
#ifdef __REACTOS__
if (force_termination)
{
HANDLE process;
#endif
process = OpenProcess(PROCESS_TERMINATE, FALSE, pid_list[index]);
if (!process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
continue;
}
if (!TerminateProcess(process, 0))
{
taskkill_message_printfW(STRING_TERMINATE_FAILED, task_list[i]);
status_code = 1;
CloseHandle(process);
continue;
}
#ifndef __REACTOS__
found_process = TRUE;
#endif
taskkill_message_printfW(STRING_TERM_PROC_SEARCH, task_list[i], pid_list[index]);
CloseHandle(process);
#ifdef __REACTOS__
}
else
{
struct pid_close_info info = { pid_list[index] };
EnumWindows(pid_enum_proc, (LPARAM)&info);
taskkill_message_printfW(STRING_CLOSE_PROC_SRCH, process_name, pid_list[index]);
}
#endif
}
}
if (!found_process)
{
taskkill_message_printfW(STRING_SEARCH_FAILED, task_list[i]);
status_code = 128;
}
}
}
HeapFree(GetProcessHeap(), 0, pid_list);
return status_code;
}
@@ -491,8 +577,7 @@ static BOOL add_to_task_list(WCHAR *name)
if (!task_list)
{
task_list = HeapAlloc(GetProcessHeap(), 0,
list_size * sizeof(*task_list));
task_list = malloc(list_size * sizeof(*task_list));
if (!task_list)
return FALSE;
}
@@ -501,8 +586,7 @@ static BOOL add_to_task_list(WCHAR *name)
void *realloc_list;
list_size *= 2;
realloc_list = HeapReAlloc(GetProcessHeap(), 0, task_list,
list_size * sizeof(*task_list));
realloc_list = realloc(task_list, list_size * sizeof(*task_list));
if (!realloc_list)
return FALSE;
@@ -527,7 +611,7 @@ static int get_argument_type(WCHAR* argument)
for (i = 0; i < _countof(opList); i++)
{
if (!strcmpiW(opList[i], argument))
if (!wcsicmp(opList[i], argument))
{
return i;
}
@@ -535,10 +619,6 @@ static int get_argument_type(WCHAR* argument)
return OP_PARAM_INVALID;
}
/* FIXME
argument T not supported
*/
static BOOL process_arguments(int argc, WCHAR* argv[])
{
BOOL has_im = FALSE, has_pid = FALSE, has_help = FALSE;
@@ -554,7 +634,7 @@ static BOOL process_arguments(int argc, WCHAR* argv[])
{
case OP_PARAM_FORCE_TERMINATE:
{
if (force_termination == TRUE)
if (force_termination)
{
// -f already specified
taskkill_message_printfW(STRING_PARAM_TOO_MUCH, argv[i], 1);
@@ -600,7 +680,7 @@ static BOOL process_arguments(int argc, WCHAR* argv[])
}
case OP_PARAM_HELP:
{
if (has_help == TRUE)
if (has_help)
{
// -? already specified
taskkill_message_printfW(STRING_PARAM_TOO_MUCH, argv[i], 1);
@@ -612,7 +692,14 @@ static BOOL process_arguments(int argc, WCHAR* argv[])
}
case OP_PARAM_TERMINATE_CHILD:
{
WINE_FIXME("argument T not supported\n");
if (kill_child_processes)
{
// -t already specified
taskkill_message_printfW(STRING_PARAM_TOO_MUCH, argv[i], 1);
taskkill_message(STRING_USAGE);
return FALSE;
}
kill_child_processes = TRUE;
break;
}
case OP_PARAM_INVALID:
@@ -640,7 +727,7 @@ static BOOL process_arguments(int argc, WCHAR* argv[])
exit(0);
}
}
else if ((!has_im) && (!has_pid)) // has_help == FALSE
else if (!has_im && !has_pid) // has_help == FALSE
{
// both has_im and has_pid are missing (maybe -fi option is missing too, if implemented later)
taskkill_message(STRING_MISSING_OPTION);
@@ -658,12 +745,6 @@ static BOOL process_arguments(int argc, WCHAR* argv[])
* options are detected as parameters when placed after options that accept one. */
static BOOL process_arguments(int argc, WCHAR *argv[])
{
static const WCHAR opForceTerminate[] = {'f',0};
static const WCHAR opImage[] = {'i','m',0};
static const WCHAR opPID[] = {'p','i','d',0};
static const WCHAR opHelp[] = {'?',0};
static const WCHAR opTerminateChildren[] = {'t',0};
if (argc > 1)
{
int i;
@@ -674,7 +755,7 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
if (argc == 2)
{
argdata = argv[1];
if ((*argdata == '/' || *argdata == '-') && !strcmpW(opHelp, argdata + 1))
if ((*argdata == '/' || *argdata == '-') && !lstrcmpW(L"?", argdata + 1))
{
taskkill_message(STRING_USAGE);
exit(0);
@@ -690,14 +771,14 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
goto invalid;
argdata++;
if (!strcmpiW(opTerminateChildren, argdata))
WINE_FIXME("argument T not supported\n");
if (!strcmpiW(opForceTerminate, argdata))
if (!wcsicmp(L"t", argdata))
kill_child_processes = TRUE;
else if (!wcsicmp(L"f", argdata))
force_termination = TRUE;
/* Options /IM and /PID appear to behave identically, except for
* the fact that they cannot be specified at the same time. */
else if ((got_im = !strcmpiW(opImage, argdata)) ||
(got_pid = !strcmpiW(opPID, argdata)))
else if ((got_im = !wcsicmp(L"im", argdata)) ||
(got_pid = !wcsicmp(L"pid", argdata)))
{
if (!argv[i + 1])
{
@@ -743,23 +824,35 @@ static BOOL process_arguments(int argc, WCHAR *argv[])
int wmain(int argc, WCHAR *argv[])
{
int status_code = 0;
int search_status = 0, terminate_status;
unsigned int i;
if (!process_arguments(argc, argv))
return 1;
if (!enumerate_processes())
{
HeapFree(GetProcessHeap(), 0, task_list);
taskkill_message(STRING_ENUM_FAILED);
return 1;
}
#ifdef __REACTOS__
status_code = terminate_processes(force_termination);
#else
if (force_termination)
status_code = terminate_processes();
else
status_code = send_close_messages();
pkill_list = malloc(process_count * sizeof(unsigned int*));
if (!pkill_list)
return 1;
memset(pkill_list, 0, process_count * sizeof(unsigned int*));
pkill_size = 0;
self_pid = GetCurrentProcessId();
#endif
HeapFree(GetProcessHeap(), 0, task_list);
return status_code;
for (i = 0; i < task_count; ++i)
mark_task_process(task_list[i], &search_status);
if (kill_child_processes)
mark_child_processes();
if (force_termination)
terminate_status = terminate_processes();
else
terminate_status = send_close_messages();
return search_status ? search_status : terminate_status;
}

View File

@@ -35,6 +35,8 @@
#define STRING_ENUM_FAILED 112
#define STRING_TERMINATE_FAILED 113
#define STRING_SELF_TERMINATION 114
#define STRING_PARAM_TOO_MUCH 115
#define STRING_INVALID_SYNTAX 116
#define STRING_CLOSE_CHILD 115
#define STRING_TERM_CHILD 116
#define STRING_TERM_CHILD_FAILED 117
#define STRING_PARAM_TOO_MUCH 118
#define STRING_INVALID_SYNTAX 119

View File

@@ -0,0 +1,57 @@
/*
* PROJECT: ReactOS WHERE command
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Polish resource file
* TRANSLATOR: Copyright 2025 Karol Gocłowski <cyberwordixx@gazeta.pl>
*/
LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "Sposób użycia: WHERE [opcje] wzorzec...\n\
\n\
Opis:\n\
Wyświetla lokalizacje plików znalezione przez określone wzorce (może być podany też jeden).\n\
Domyślnie, to narzędzie szuka używając wzorców i ścieżek ustawionych\n\
w zmiennej środowiskowej PATH.\n\
\n\
Opcje:\n\
/F Wyświetla wszyskie znalezione pliki w cudzysłowach.\n\
/Q Tryb cichy. Nie wyświetla żadnych plików ani komunikatów.\n\
/R folder Rekursywnie przeszukuje określony folder.\n\
/T Pokazuje rozmiar i datę modyfikacji wszystkich znalezionych plików.\n\
wzorzec Określa wzorzec używany do porównywania nazw przeszukiwanych plików.\n\
Wieloznaczniki * i ? mogą być używane.\n\
Formaty ""$env:pattern"" i ""path:pattern"" też mogą\n\
być używane, gdzie ""env"" jest zmienną środowiskową\n\
i wyszukiwanie następuje w ścieżkach ustawionych w zmiennej środowiskowej ""env""\n\
Nie można używać tych formatów z przełącznikiem /R. Wyszukiwanie jest\n\
także wykonywane poprzez dodanie rozszerzeń ze zmiennej środowiskowej PATHEXT do wzorca.\n\
/? Wyświetla ten komunikat.\n\
\n\
Informacja: To narzędzie zwraca poziom błędu 0 jeżeli wyszukiwanie było udane,\n\
1 jeżeli nie znaleziono pliku, i 2 jeżeli wystąpił błąd.\n\
\n\
Przykłady:\n\
WHERE mojplik*.exe\n\
WHERE /F /T mspaint\n\
WHERE $WINDIR:notepad mojplik???\n\
WHERE C:\\ReactOS;C:\\ReactOS\\system32:exp*.exe\n\
WHERE /R ""C:\\Program Files"" *.dll\n"
IDS_BAD_ARG "BŁĄD: Nieprawidłowy argument - '%ls'.\n"
IDS_NOT_FOUND "INFO: Nie znaleziono pliku dla podanych wzorców.\n"
IDS_FILE_INFO "%10I64u %-12ls %-12ls %ls\n"
IDS_WANT_VALUE "BŁĄD: Wartość jest potrzebna dla '%ls'.\n"
IDS_TYPE_HELP "Wpisz ""WHERE /?"" aby uzyskać pomoc.\n"
IDS_ENVPAT_WITH_R "BŁĄD: ""$env:pattern"" nie może być użyty z /R.\n"
IDS_PATHPAT_WITH_R "BŁĄD: ""path:pattern"" nie może być użyty z /R.\n"
IDS_BAD_PATHPAT "BŁĄD: Określono nieprawidłowy wzorzec w ""path:pattern"".\n"
IDS_OUTOFMEMORY "BŁĄD: Brak pamięci.\n"
IDS_BAD_ENVVAR "BŁĄD: Nie znaleziono zmiennej środowiskowej ""%ls"".\n"
IDS_CANT_FOUND "BŁĄD: System nie mógł znaleźć określonego pliku.\n"
IDS_BAD_DIR "BŁĄD: Określony folder jest nieprawidłowy.\n"
IDS_BAD_NAME "BŁĄD: Nazwa pliku, folderu lub etykieta woluminu jest niepoprawna.\n"
IDS_TOO_MANY "BŁĄD: Opcja '%ls' nie jest dozwolona więcej niż '%u' razy.\n"
END

View File

@@ -18,6 +18,9 @@
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_PL_PL
#include "lang/pl-PL.rc"
#endif
#ifdef LANGUAGE_TR_TR
#include "lang/tr-TR.rc"
#endif

View File

@@ -1,7 +1,7 @@
add_definitions(-D__WINESRC__)
add_executable(wmic main.c wmic.rc)
target_link_libraries(wmic wine)
set_module_type(wmic win32cui UNICODE)
add_importlibs(wmic oleaut32 ole32 user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET wmic DESTINATION reactos/system32/wbem FOR all)
set_wine_module_FIXME(wmic) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -1,6 +1,4 @@
add_definitions(-D__WINESRC__)
list(APPEND SOURCE
arguments.c
host.c
@@ -18,3 +16,4 @@ add_importlibs(wscript shell32 oleaut32 ole32 user32 advapi32 msvcrt kernel32 nt
add_dependencies(wscript stdole2 wscript_idlheader)
add_pch(wscript precomp.h SOURCE)
add_cd_file(TARGET wscript DESTINATION reactos/system32 FOR all)
set_wine_module_FIXME(wscript) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -1,7 +1,7 @@
add_definitions(-D__WINESRC__)
add_executable(xcopy xcopy.c xcopy.rc)
target_link_libraries(xcopy wine)
set_module_type(xcopy win32cui UNICODE)
add_importlibs(xcopy shell32 user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET xcopy DESTINATION reactos/system32 FOR all)
set_wine_module_FIXME(xcopy) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -50,7 +50,7 @@ où :\n\
[/A] Copie uniquement les fichiers qui ont l'attribut archive défini\n\
[/M] Copie uniquement les fichiers qui ont l'attribut archive défini ; supprime\n\
\tensuite l'attribut\n\
[/K] Copy file attributes, without this attributes are not preserved.\n\
[/K] Copie les attributs de fichiers. Sans ce paramètre les attributs ne sont pas conservés.\n\
[/D | /D:m-d-y] Copie uniquement les nouveaux fichiers, ou ceux modifiés après la date spécifiée.\n\
\t\tSi aucune date n'est spécifiée, copie uniquement lorsque le fichier de destination est plus ancien\n\
\t\tque le fichier source\n\n"

View File

@@ -117,7 +117,7 @@ bool UpdateFromEvent(DEBUG_EVENT& evt, DumpData& data)
case EXCEPTION_DEBUG_EVENT:
if (evt.u.Exception.dwFirstChance)
{
switch(evt.u.Exception.ExceptionRecord.ExceptionCode)
switch((NTSTATUS)evt.u.Exception.ExceptionRecord.ExceptionCode)
{
case EXCEPTION_BREAKPOINT:
if (!data.FirstBPHit)

View File

@@ -40,6 +40,9 @@
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_JA_JP
#include "lang/ja-JP.rc"
#endif
#ifdef LANGUAGE_PL_PL
#include "lang/pl-PL.rc"
#endif

View File

@@ -0,0 +1,7 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_APP_TITLE "ReactOS クラッシュレポーター"
IDS_USER_ALERT_MESSAGE "アプリケーション %ls がクラッシュしました。このクラッシュに関する情報は次の場所に保存されました:\n\n%ls"
END

View File

@@ -13,11 +13,11 @@
#define WIDTH 800
#define HEIGHT 600
BOOL D3D7Test(HWND hWnd);
BOOL D3D8Test(HWND hWnd);
BOOL D3D9Test(HWND hWnd);
BOOL D3D7Test(GUID *lpDevice, HWND hWnd);
BOOL D3D8Test(GUID *lpDevice, HWND hWnd);
BOOL D3D9Test(GUID *lpDevice, HWND hWnd);
BOOL StartD3DTest(HWND hWnd, HINSTANCE hInstance, WCHAR* pszCaption, INT TestNr)
BOOL StartD3DTest(GUID *lpDevice, HWND hWnd, HINSTANCE hInstance, WCHAR* pszCaption, INT TestNr)
{
WCHAR szTestDescriptionRaw[256];
WCHAR szTestDescription[256];
@@ -39,13 +39,13 @@ BOOL StartD3DTest(HWND hWnd, HINSTANCE hInstance, WCHAR* pszCaption, INT TestNr)
switch(TestNr){
case 7:
Result = D3D7Test(hWnd);
Result = D3D7Test(lpDevice, hWnd);
break;
case 8:
Result = D3D8Test(hWnd);
Result = D3D8Test(lpDevice, hWnd);
break;
case 9:
Result = D3D9Test(hWnd);
Result = D3D9Test(lpDevice, hWnd);
break;
default:
Result = FALSE;
@@ -70,7 +70,7 @@ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
return DefWindowProc(hWnd, msg, wParam, lParam);
}
VOID D3DTests()
VOID D3DTests(GUID *lpDevice)
{
WNDCLASSEX winClass;
HWND hWnd;
@@ -116,9 +116,9 @@ VOID D3DTests()
if(MessageBox(NULL, szDescription, szCaption, MB_YESNO | MB_ICONQUESTION) == IDNO)
goto cleanup;
StartD3DTest(hWnd, hInstance, szCaption, 7);
StartD3DTest(hWnd, hInstance, szCaption, 8);
StartD3DTest(hWnd, hInstance, szCaption, 9);
StartD3DTest(lpDevice, hWnd, hInstance, szCaption, 7);
StartD3DTest(lpDevice, hWnd, hInstance, szCaption, 8);
StartD3DTest(lpDevice, hWnd, hInstance, szCaption, 9);
cleanup:
DestroyWindow(hWnd);

View File

@@ -8,7 +8,7 @@
#include "precomp.h"
BOOL D3D7Test(HWND hWnd)
BOOL D3D7Test(GUID *lpDevice, HWND hWnd)
{
return FALSE;
}

View File

@@ -8,7 +8,7 @@
#include "precomp.h"
BOOL D3D8Test(HWND hWnd)
BOOL D3D8Test(GUID *lpDevice, HWND hWnd)
{
return FALSE;
}

View File

@@ -8,7 +8,7 @@
#include "precomp.h"
BOOL D3D9Test(HWND hWnd)
BOOL D3D9Test(GUID *lpDevice, HWND hWnd)
{
return FALSE;
}

View File

@@ -8,8 +8,8 @@
#include "precomp.h"
BOOL DDPrimarySurfaceTest(HWND hWnd);
BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen);
BOOL DDPrimarySurfaceTest(GUID *lpDevice, HWND hWnd);
BOOL DDOffscreenBufferTest(GUID *lpDevice, HWND hWnd, BOOL Fullscreen);
VOID DDRedrawFrame(LPDIRECTDRAWSURFACE lpDDSurface);
VOID DDUpdateFrame(LPDIRECTDRAWSURFACE lpDDPrimarySurface ,LPDIRECTDRAWSURFACE lpDDBackBuffer, BOOL Fullscreen, INT *posX, INT *posY, INT *gainX, INT *gainY, RECT *rectDD);
@@ -21,7 +21,7 @@ VOID DDUpdateFrame(LPDIRECTDRAWSURFACE lpDDPrimarySurface ,LPDIRECTDRAWSURFACE l
#define DD_SQUARE_STEP 2
BOOL StartDDTest(HWND hWnd, HINSTANCE hInstance, INT resTestDescription, INT resResult, INT TestNr)
BOOL StartDDTest(GUID *lpDevice, HWND hWnd, HINSTANCE hInstance, INT resTestDescription, INT resResult, INT TestNr)
{
WCHAR szTestDescription[256];
WCHAR szCaption[256];
@@ -41,13 +41,13 @@ BOOL StartDDTest(HWND hWnd, HINSTANCE hInstance, INT resTestDescription, INT res
switch(TestNr){
case 1:
Result = DDPrimarySurfaceTest(hWnd);
Result = DDPrimarySurfaceTest(lpDevice, hWnd);
break;
case 2:
Result = DDOffscreenBufferTest(hWnd, FALSE);
Result = DDOffscreenBufferTest(lpDevice, hWnd, FALSE);
break;
case 3:
Result = DDOffscreenBufferTest(hWnd, TRUE);
Result = DDOffscreenBufferTest(lpDevice, hWnd, TRUE);
break;
default:
Result = FALSE;
@@ -67,7 +67,7 @@ BOOL StartDDTest(HWND hWnd, HINSTANCE hInstance, INT resTestDescription, INT res
return FALSE;
}
VOID DDTests()
VOID DDTests(GUID *lpDevice)
{
WNDCLASSEX winClass;
HWND hWnd;
@@ -105,15 +105,15 @@ VOID DDTests()
if(MessageBox(NULL, szDescription, szCaption, MB_YESNO | MB_ICONQUESTION) == IDNO)
return;
StartDDTest(hWnd, hInstance, IDS_DDPRIMARY_DESCRIPTION, IDS_DDPRIMARY_RESULT, 1);
StartDDTest(hWnd, hInstance, IDS_DDOFFSCREEN_DESCRIPTION, IDS_DDOFFSCREEN_RESULT, 2);
StartDDTest(hWnd, hInstance, IDS_DDFULLSCREEN_DESCRIPTION, IDS_DDFULLSCREEN_RESULT, 3);
StartDDTest(lpDevice, hWnd, hInstance, IDS_DDPRIMARY_DESCRIPTION, IDS_DDPRIMARY_RESULT, 1);
StartDDTest(lpDevice, hWnd, hInstance, IDS_DDOFFSCREEN_DESCRIPTION, IDS_DDOFFSCREEN_RESULT, 2);
StartDDTest(lpDevice, hWnd, hInstance, IDS_DDFULLSCREEN_DESCRIPTION, IDS_DDFULLSCREEN_RESULT, 3);
DestroyWindow(hWnd);
UnregisterClass(winClass.lpszClassName, hInstance);
}
BOOL DDPrimarySurfaceTest(HWND hWnd){
BOOL DDPrimarySurfaceTest(GUID *lpDevice, HWND hWnd){
UINT TimerID;
MSG msg;
@@ -121,7 +121,7 @@ BOOL DDPrimarySurfaceTest(HWND hWnd){
LPDIRECTDRAWSURFACE lpDDSurface = NULL;
DDSURFACEDESC DDSurfaceDesc;
if(DirectDrawCreate(NULL, &lpDD, NULL) != DD_OK)
if(DirectDrawCreate(lpDevice, &lpDD, NULL) != DD_OK)
return FALSE;
if(lpDD->lpVtbl->SetCooperativeLevel(lpDD, hWnd, DDSCL_NORMAL) != DD_OK)
@@ -197,7 +197,7 @@ VOID DDRedrawFrame(LPDIRECTDRAWSURFACE lpDDSurface)
}
BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen){
BOOL DDOffscreenBufferTest(GUID *lpDevice, HWND hWnd, BOOL Fullscreen){
UINT_PTR TimerID, TimerIDUpdate;
LPDIRECTDRAW lpDD;
LPDIRECTDRAWSURFACE lpDDPrimarySurface;
@@ -210,7 +210,7 @@ BOOL DDOffscreenBufferTest(HWND hWnd, BOOL Fullscreen){
POINT wndPoint;
INT posX = 0, posY = 10, xGain = DD_SQUARE_STEP, yGain = DD_SQUARE_STEP;
if(DirectDrawCreate(NULL, &lpDD, NULL) != DD_OK)
if(DirectDrawCreate(lpDevice, &lpDD, NULL) != DD_OK)
return FALSE;
ZeroMemory(&DDSurfaceDesc, sizeof(DDSurfaceDesc));

View File

@@ -305,56 +305,89 @@ InitializeDialog(HWND hwndDlg, PDISPLAY_DEVICEW pDispDevice)
return TRUE;
}
void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext)
static BOOL WINAPI
DDEnumerateCallback(
IN GUID *lpGuid,
IN LPSTR lpDriverName,
IN LPSTR lpDriverDescription,
IN LPVOID lpContext,
IN HMONITOR hMonitor)
{
DISPLAY_DEVICEW DispDevice;
HWND * hDlgs;
LPWSTR lpDriverDescriptionW;
PDXDIAG_CONTEXT pContext = lpContext;
PDXDIAG_DISPLAY *pDisplayAdapters;
PDXDIAG_DISPLAY pDisplayAdapter;
HWND hwndDlg;
WCHAR szDisplay[20];
WCHAR szText[30];
DWORD dwOffset = 0;
int len;
BOOL ret;
while(TRUE)
{
ZeroMemory(&DispDevice, sizeof(DISPLAY_DEVICEW));
DispDevice.cb = sizeof(DISPLAY_DEVICEW);
if (!EnumDisplayDevicesW(NULL, pContext->NumDisplayAdapter + dwOffset, &DispDevice, 0))
return;
/* Convert lpDriverDescription to WCHAR */
len = MultiByteToWideChar(CP_ACP, 0, lpDriverDescription, strlen(lpDriverDescription), NULL, 0);
if (!len)
return FALSE;
lpDriverDescriptionW = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR));
if (!lpDriverDescriptionW)
return FALSE;
MultiByteToWideChar(CP_ACP, 0, lpDriverDescription, strlen(lpDriverDescription), lpDriverDescriptionW, len);
lpDriverDescriptionW[len] = UNICODE_NULL;
/* Get associated display device */
ZeroMemory(&DispDevice, sizeof(DispDevice));
DispDevice.cb = sizeof(DispDevice);
ret = EnumDisplayDevicesW(lpDriverDescriptionW, 0, &DispDevice, 0);
HeapFree(GetProcessHeap(), 0, lpDriverDescriptionW);
if (!ret)
return TRUE;
pDisplayAdapter = HeapAlloc(GetProcessHeap(), 0, sizeof(DXDIAG_DISPLAY));
if (!pDisplayAdapter)
return FALSE;
/* skip devices not attached to the desktop and mirror drivers */
if (!(DispDevice.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) || (DispDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER))
{
dwOffset++;
continue;
}
if (pContext->NumDisplayAdapter)
hDlgs = HeapReAlloc(GetProcessHeap(), 0, pContext->hDisplayWnd, (pContext->NumDisplayAdapter + 1) * sizeof(HWND));
pDisplayAdapters = HeapReAlloc(GetProcessHeap(), 0, pContext->DisplayAdapters, (pContext->NumDisplayAdapter + 1) * sizeof(PDXDIAG_DISPLAY));
else
hDlgs = HeapAlloc(GetProcessHeap(), 0, (pContext->NumDisplayAdapter + 1) * sizeof(HWND));
pDisplayAdapters = HeapAlloc(GetProcessHeap(), 0, (pContext->NumDisplayAdapter + 1) * sizeof(PDXDIAG_DISPLAY));
if (!hDlgs)
break;
if (!pDisplayAdapters)
{
HeapFree(GetProcessHeap(), 0, pDisplayAdapter);
return FALSE;
}
pContext->hDisplayWnd = hDlgs;
hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_DISPLAY_DIALOG), pContext->hMainDialog, DisplayPageWndProc, (LPARAM)pContext); EnableDialogTheme(hwndDlg);
pContext->DisplayAdapters = pDisplayAdapters;
hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_DISPLAY_DIALOG), pContext->hMainDialog, DisplayPageWndProc, (LPARAM)pDisplayAdapter);
EnableDialogTheme(hwndDlg);
if (!hwndDlg)
break;
{
HeapFree(GetProcessHeap(), 0, pDisplayAdapter);
return FALSE;
}
/* initialize the dialog */
InitializeDialog(hwndDlg, &DispDevice);
szDisplay[0] = L'\0';
LoadStringW(hInst, IDS_DISPLAY_DIALOG, szDisplay, sizeof(szDisplay)/sizeof(WCHAR));
szDisplay[(sizeof(szDisplay)/sizeof(WCHAR))-1] = L'\0';
szDisplay[0] = UNICODE_NULL;
LoadStringW(hInst, IDS_DISPLAY_DIALOG, szDisplay, ARRAYSIZE(szDisplay));
szDisplay[ARRAYSIZE(szDisplay) - 1] = UNICODE_NULL;
wsprintfW(szText, L"%s %u", szDisplay, pContext->NumDisplayAdapter + 1);
InsertTabCtrlItem(GetDlgItem(pContext->hMainDialog, IDC_TAB_CONTROL), pContext->NumDisplayAdapter + 1, szText);
hDlgs[pContext->NumDisplayAdapter] = hwndDlg;
pContext->NumDisplayAdapter++;
pDisplayAdapter->hDisplayWnd = hwndDlg;
if (lpGuid)
pDisplayAdapter->guid = *lpGuid;
pContext->DisplayAdapters[pContext->NumDisplayAdapter++] = pDisplayAdapter;
return TRUE;
}
void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext)
{
DirectDrawEnumerateExA(DDEnumerateCallback, pContext, DDENUM_ATTACHEDSECONDARYDEVICES);
}
@@ -362,13 +395,14 @@ INT_PTR CALLBACK
DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
RECT rect;
PDXDIAG_CONTEXT pContext = (PDXDIAG_CONTEXT)GetWindowLongPtr(hDlg, DWLP_USER);
HWND hMainDialog;
PDXDIAG_DISPLAY pDisplay = (PDXDIAG_DISPLAY)GetWindowLongPtr(hDlg, DWLP_USER);
switch (message)
{
case WM_INITDIALOG:
{
pContext = (PDXDIAG_CONTEXT) lParam;
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)pContext);
pDisplay = (PDXDIAG_DISPLAY) lParam;
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)pDisplay);
SetWindowPos(hDlg, NULL, 10, 32, 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
return TRUE;
}
@@ -378,13 +412,14 @@ DisplayPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
case IDC_BUTTON_TESTDD:
case IDC_BUTTON_TEST3D:
GetWindowRect(pContext->hMainDialog, &rect);
hMainDialog = GetWindow(hDlg, GW_OWNER);
GetWindowRect(hMainDialog, &rect);
/* FIXME log result errors */
if (IDC_BUTTON_TESTDD == LOWORD(wParam))
DDTests();
DDTests(&pDisplay->guid);
else if (IDC_BUTTON_TEST3D == LOWORD(wParam))
D3DTests();
SetWindowPos(pContext->hMainDialog, NULL, rect.left, rect.top, rect.right, rect.bottom, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
D3DTests(&pDisplay->guid);
SetWindowPos(hMainDialog, NULL, rect.left, rect.top, rect.right, rect.bottom, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
break;
}
break;

View File

@@ -84,8 +84,8 @@ DestroyTabCtrlDialogs(PDXDIAG_CONTEXT pContext)
/* destroy display dialogs */
for(Index = 0; Index < pContext->NumDisplayAdapter; Index++)
{
if (pContext->hDisplayWnd[Index])
DestroyWindow(pContext->hDisplayWnd[Index]);
if (pContext->DisplayAdapters[Index]->hDisplayWnd)
DestroyWindow(pContext->DisplayAdapters[Index]->hDisplayWnd);
}
/* destroy audio dialogs */
@@ -142,7 +142,7 @@ TabCtrl_OnSelChange(PDXDIAG_CONTEXT pContext)
ShowWindow(pContext->hDialogs[Index], SW_HIDE);
for(Index = 0; Index < pContext->NumDisplayAdapter; Index++)
ShowWindow(pContext->hDisplayWnd[Index], SW_HIDE);
ShowWindow(pContext->DisplayAdapters[Index]->hDisplayWnd, SW_HIDE);
for(Index = 0; Index < pContext->NumSoundAdapter; Index++)
ShowWindow(pContext->hSoundWnd[Index], SW_HIDE);
@@ -158,7 +158,7 @@ TabCtrl_OnSelChange(PDXDIAG_CONTEXT pContext)
if (CurSel -1 < pContext->NumDisplayAdapter)
{
ShowWindow(pContext->hDisplayWnd[CurSel-1], SW_SHOW);
ShowWindow(pContext->DisplayAdapters[CurSel-1]->hDisplayWnd, SW_SHOW);
return;
}

View File

@@ -42,7 +42,7 @@ BEGIN
EDITTEXT IDC_STATIC_MEM, 155, 130, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_SWAP, 155, 140, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_VERSION, 155, 150, 210, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
CHECKBOX "Check for WHQL digital signatures", IDC_WHQL_SIGN_CHECK, 15, 170, 135, 10, WS_DISABLED
CHECKBOX "WHQL デジタル署名を確認する", IDC_WHQL_SIGN_CHECK, 15, 170, 135, 10, WS_DISABLED
END
IDD_DISPLAY_DIALOG DIALOGEX 0, 0, 462, 220
@@ -127,7 +127,7 @@ BEGIN
EDITTEXT IDC_STATIC_ADAPTER_PROVIDER, 335, 60, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "ReactX の機能", IDC_STATIC, 5, 97, 452, 70
CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 110, 125, 80, 17
RTEXT "Hardware Sound\nAcceleration Level:", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED
RTEXT "ハードウェア音声\n加速レベル:", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED
PUSHBUTTON "DirectSound のテスト", IDC_BUTTON_TESTDSOUND, 270, 125, 80, 14, WS_DISABLED
GROUPBOX "注意", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_TEXT_DSOUNDINFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
@@ -137,17 +137,17 @@ IDD_MUSIC_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
RTEXT "General MIDI DLS Collection:", IDC_STATIC, 0, 0, 100, 10
RTEXT "General MIDI DLS コレクション:", IDC_STATIC, 0, 0, 100, 10
EDITTEXT IDC_MIDI_DLS_COLLECTION, 105, 0, 250, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Music Ports", IDC_STATIC, 5, 10, 452, 85
GROUPBOX "ReactX Features", IDC_STATIC, 5, 97, 452, 70
LTEXT "Default Port Acceleration:", IDC_STATIC, 15, 120, 95, 17
GROUPBOX "音楽ポート", IDC_STATIC, 5, 10, 452, 85
GROUPBOX "ReactXの機能", IDC_STATIC, 5, 97, 452, 70
LTEXT "デフォルトのポート高速化:", IDC_STATIC, 15, 120, 95, 17
LTEXT "", IDC_STATIC_DEFAULT_PORT_ACCELERATION, 115, 120, 50, 10
PUSHBUTTON "Disable", IDC_BUTTON_DISABLEDMUSIC, 75, 135, 80, 14, WS_DISABLED
LTEXT "Test using this port:", IDC_STATIC, 180, 105, 100, 10
PUSHBUTTON "無効にする", IDC_BUTTON_DISABLEDMUSIC, 75, 135, 80, 14, WS_DISABLED
LTEXT "このポートを使用してテストします:", IDC_STATIC, 180, 105, 100, 10
LISTBOX IDC_DMUSIC_TEST_LIST, 180, 115, 180, 45, LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Test DirectMusic", IDC_BUTTON_TESTDMUSIC, 370, 145, 80, 14, WS_DISABLED
GROUPBOX "Notes", IDC_STATIC, 5, 170, 452, 50
PUSHBUTTON "DirectMusic をテストする", IDC_BUTTON_TESTDMUSIC, 370, 145, 80, 14, WS_DISABLED
GROUPBOX "注記", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_MUSIC_NOTES, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -170,11 +170,11 @@ FONT 9, "MS UI Gothic"
BEGIN
GROUPBOX "登録済み DirectPlay サービス プロバイダ", IDC_STATIC, 5, 0, 452, 75
CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 15, 12, 432, 55
GROUPBOX "Registered Lobbyable DirectPlay Applications", IDC_STATIC, 5, 77, 452, 55
GROUPBOX "ReactX Features", IDC_STATIC, 5, 133, 452, 35
PUSHBUTTON "DirectPlay Voice Options", IDC_BUTTON_VOICE_OPTIONS, 10, 145, 90, 14, WS_DISABLED
PUSHBUTTON "Test DirectPlay", IDC_BUTTON_TESTDPLAY, 130, 145, 80, 14, WS_DISABLED
GROUPBOX "Notes", IDC_STATIC, 5, 170, 452, 50
GROUPBOX "登録済みのロビー可能な DirectPlay アプリ", IDC_STATIC, 5, 77, 452, 55
GROUPBOX "ReactX の機能", IDC_STATIC, 5, 133, 452, 35
PUSHBUTTON "DirectPlay 音声オプション", IDC_BUTTON_VOICE_OPTIONS, 10, 145, 90, 14, WS_DISABLED
PUSHBUTTON "DirectPlay をテストする", IDC_BUTTON_TESTDPLAY, 130, 145, 80, 14, WS_DISABLED
GROUPBOX "注記", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_NETWORK_NOTES, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -182,11 +182,11 @@ IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 9, "MS UI Gothic"
BEGIN
LTEXT "Still can't find the information you're looking for? Here are some additional things you can do:", IDC_STATIC, 5, 0, 300, 10
PUSHBUTTON "System Information", IDC_BUTTON_SYSINFO, 5, 20, 80, 14, WS_DISABLED
LTEXT "Displays additional system information", IDC_STATIC, 90, 23, 300, 10
PUSHBUTTON "Refresh Rate Override", IDC_BUTTON_DDRAW_REFRESH, 5, 40, 80, 14, WS_DISABLED
LTEXT "Overrides the Refresh Rate for DirectDraw", IDC_STATIC, 90, 43, 300, 10
LTEXT "探している情報がまだ見つかりませんか? 以下の方法をお試しください。", IDC_STATIC, 5, 0, 300, 10
PUSHBUTTON "システム情報", IDC_BUTTON_SYSINFO, 5, 20, 80, 14, WS_DISABLED
LTEXT "追加のシステム情報を表示します", IDC_STATIC, 90, 23, 300, 10
PUSHBUTTON "リフレッシュ レートのオーバーライド", IDC_BUTTON_DDRAW_REFRESH, 5, 40, 80, 14, WS_DISABLED
LTEXT "DirectDrawのリフレッシュ レートを上書きします", IDC_STATIC, 90, 43, 300, 10
END
STRINGTABLE
@@ -238,17 +238,17 @@ BEGIN
IDS_DDFULLSCREEN_DESCRIPTION "このテストでは、DirectDraw を使って全画面表示モードで描画します。移動している白い矩形が描画されます。続行しますか?"
IDS_DDFULLSCREEN_RESULT "全画面表示モードで移動している白い矩形が見えましたか?"
IDS_FORMAT_ADAPTER_MEM "%u MB"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u bit)(%uHz)"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u ビット) (%uHz)"
IDS_OPTION_NO "いいえ"
IDS_D3DTEST_DESCRIPTION "Direct3D インタフェーステストを開始しようとしています。続行しますか?"
IDS_D3DTEST_D3Dx "このテストはハードウェア アクセラーレータ Direct3D %u インターフェイスを使います。"
IDS_OS_VERSION "%s %s (%d.%d, Build %d)"
IDS_DMUSIC_DESC "Description"
IDS_DMUSIC_TYPE "Type"
IDS_DMUSIC_KERNEL "Kernel Mode"
IDS_DMUSIC_IO "In/Out"
IDS_DMUSIC_DLS "Supports DLS"
IDS_DMUSIC_EXT "External"
IDS_DMUSIC_PORT "Default Port"
IDS_DDDISABLE_MSG "This will disable all hardware acceleration for DirectDraw on all display devices.\nDo you wish to continue?\n"
IDS_OS_VERSION "%s %s (%d.%d, ビルド %d)"
IDS_DMUSIC_DESC "説明"
IDS_DMUSIC_TYPE "種類"
IDS_DMUSIC_KERNEL "カーネル モード"
IDS_DMUSIC_IO "入出力"
IDS_DMUSIC_DLS "DLS をサポート"
IDS_DMUSIC_EXT "外部"
IDS_DMUSIC_PORT "デフォルトのポート"
IDS_DDDISABLE_MSG "これにより、すべてのディスプレイ デバイス上の DirectDraw のすべてのハードウェア アクセラレーションが無効になります。\n続行しますか?\n"
END

View File

@@ -3,7 +3,7 @@
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Romanian resource file
* TRANSLATORS: Copyright 2011-2019 Ștefan Fulea <stefan.fulea@mail.com>
* Copyright 2023 Andrei Miloiu <miloiuandrei@gmail.com>
* Copyright 2023-2025 Andrei Miloiu <miloiuandrei@gmail.com>
*/
LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
@@ -11,22 +11,22 @@ LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL
IDD_MAIN_DIALOG DIALOGEX 0, 0, 478, 280
STYLE DS_SHELLFONT | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP |
WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU
CAPTION "Diagnostic ReactX"
CAPTION "Instrument de diagnosticare ReactX"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Tab1", IDC_TAB_CONTROL, "SysTabControl32", WS_TABSTOP, 2, 2, 474, 250
PUSHBUTTON "&Manual…", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
DEFPUSHBUTTON "&Următorul compartiment", IDC_BUTTON_NEXT, 187, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "S&alvare informații…", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "Î&nchide", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Ajutor", IDC_BUTTON_HELP, 2, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
DEFPUSHBUTTON "&Pagina următoare", IDC_BUTTON_NEXT, 187, 260, 120, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Salvare a tuturor informațiilor…", IDC_BUTTON_SAVE_INFO, 311, 260, 110, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_DISABLED
PUSHBUTTON "Î&nchidere", IDC_BUTTON_EXIT, 425, 260, 50, 14, WS_CHILD | WS_VISIBLE | WS_TABSTOP
END
IDD_SYSTEM_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Acest instrument oferă informații detaliate despre componentele ReactX și drivere instalate în sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă aveți la cunoștință careva probleme la o anumită categorie, mergeți la compartimentul corespunzător de mai sus. Altfel, puteți utiliza butonul „Următorul compartiment” de mai jos pentru a trece secvențial prin fiecare categorie.", IDC_STATIC, 5, 15, 443, 25
LTEXT "Acest instrument raportează informații detaliate despre componentele ReactX și driverele instalate pe sistem.", IDC_STATIC, 5, 0, 443, 17
LTEXT "Dacă întâmpinați o problemă cu ReactX și știți ce este, atunci faceți clic pe fila corespunzătoare de mai sus. Dacă nu, puteți face clic pe butonul ""Pagina următoare"" de mai jos pentru a vizita fiecare pagină în succesiune.", IDC_STATIC, 5, 15, 443, 25
GROUPBOX "Informații despre sistem", IDC_STATIC, 5, 35, 452, 150, SS_RIGHT
LTEXT "Data/Ora curentă:", IDC_STATIC, 70, 50, 80, 10, SS_RIGHT
LTEXT "Numele calculatorului:", IDC_STATIC, 70, 60, 80, 10, SS_RIGHT
@@ -60,11 +60,11 @@ BEGIN
GROUPBOX "Dispozitiv", IDC_STATIC, 5, 0, 250, 95
RTEXT "Nume:", IDC_STATIC, 20, 10, 70, 10
RTEXT "Producător:", IDC_STATIC, 20, 20, 70, 10
RTEXT "Tipul cipului:", IDC_STATIC, 20, 30, 70, 10
RTEXT "Tipul CDA:", IDC_STATIC, 20, 40, 70, 10
RTEXT "Memorie aprox.:", IDC_STATIC, 20, 50, 70, 10
RTEXT "Afișare curentă:", IDC_STATIC, 20, 60, 70, 10
RTEXT "Ecran:", IDC_STATIC, 20, 70, 70, 10
RTEXT "Tipul chip-ului:", IDC_STATIC, 20, 30, 70, 10
RTEXT "Tipul DAC:", IDC_STATIC, 20, 40, 70, 10
RTEXT "Mem. tot. aprox.:", IDC_STATIC, 20, 50, 70, 10
RTEXT "Mod afișare curentă:", IDC_STATIC, 20, 60, 70, 10
RTEXT "Monitor:", IDC_STATIC, 20, 70, 70, 10
EDITTEXT IDC_STATIC_ADAPTER_ID, 95, 10, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_VENDOR, 95, 20, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_CHIP, 95, 30, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
@@ -73,10 +73,10 @@ BEGIN
EDITTEXT IDC_STATIC_ADAPTER_MODE, 95, 60, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_MONITOR, 95, 70, 150, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Driver", IDC_STATIC, 260, 0, 197, 95
RTEXT "Driver primar:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Driver principal:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Versiune:", IDC_STATIC, 275, 20, 55, 10
RTEXT "Dată:", IDC_STATIC, 275, 30, 55, 10
RTEXT "Semnăt. WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Logo WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Mini-VDD:", IDC_STATIC, 275, 50, 55, 10
RTEXT "VDD:", IDC_STATIC, 275, 60, 55, 10
RTEXT "Versiune DDI:", IDC_STATIC, 275, 70, 55, 10
@@ -87,18 +87,18 @@ BEGIN
EDITTEXT IDC_STATIC_ADAPTER_MINIVDD, 335, 50, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_VDD, 335, 60, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_DDI, 335, 70, 120, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 97, 452, 70
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 97, 452, 70
RTEXT "Accelerare DirectDraw:", IDC_STATIC, 15, 115, 110, 12
RTEXT "Accelerare Direct3D:", IDC_STATIC, 15, 130, 110, 12
RTEXT "Accelerare Textură AGP:", IDC_STATIC, 15, 145, 110, 12
RTEXT "Accelerare a texturilor AGP:", IDC_STATIC, 15, 145, 110, 12
LTEXT "", IDC_STATIC_DDSTATE, 130, 115, 40, 10
LTEXT "", IDC_STATIC_D3DSTATE, 130, 130, 40, 10
LTEXT "", IDC_STATIC_AGPSTATE, 130, 145, 40, 10
PUSHBUTTON "Activează", IDC_BUTTON_DDRAW, 170, 112, 60, 14, WS_DISABLED
PUSHBUTTON "Activează", IDC_BUTTON_D3D, 170, 128, 60, 14, WS_DISABLED
PUSHBUTTON "Activează", IDC_BUTTON_AGP, 170, 144, 60, 14, WS_DISABLED
PUSHBUTTON "Testează DirectDraw", IDC_BUTTON_TESTDD, 250, 112, 80, 14
PUSHBUTTON "Testează Direct3D", IDC_BUTTON_TEST3D, 250, 128, 80, 14
PUSHBUTTON "Activare", IDC_BUTTON_DDRAW, 170, 112, 60, 14, WS_DISABLED
PUSHBUTTON "Activare", IDC_BUTTON_D3D, 170, 128, 60, 14, WS_DISABLED
PUSHBUTTON "Activare", IDC_BUTTON_AGP, 170, 144, 60, 14, WS_DISABLED
PUSHBUTTON "Testare DirectDraw", IDC_BUTTON_TESTDD, 250, 112, 80, 14
PUSHBUTTON "Testare Direct3D", IDC_BUTTON_TEST3D, 250, 128, 80, 14
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_TEXT_INFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -124,7 +124,7 @@ BEGIN
RTEXT "Nume:", IDC_STATIC, 275, 10, 55, 10
RTEXT "Versiune:", IDC_STATIC, 275, 20, 55, 10
RTEXT "Dată:", IDC_STATIC, 275, 30, 55, 10
RTEXT "Semnătură WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Logo WHQL:", IDC_STATIC, 275, 40, 55, 10
RTEXT "Alte fișiere:", IDC_STATIC, 275, 50, 55, 10
RTEXT "Furnizor:", IDC_STATIC, 275, 60, 55, 10
EDITTEXT IDC_STATIC_DSOUND_DRIVER, 335, 10, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
@@ -133,10 +133,10 @@ BEGIN
EDITTEXT IDC_STATIC_DSOUND_LOGO, 335, 40, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_DSOUND_FILES, 335, 50, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
EDITTEXT IDC_STATIC_ADAPTER_PROVIDER, 335, 60, 100, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 97, 452, 70
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 97, 452, 70
CONTROL "", IDC_SLIDER_DSOUND, "msctls_trackbar32", TBS_BOTTOM | TBS_AUTOTICKS | WS_TABSTOP, 110, 125, 80, 17
RTEXT "Echipament de sunet\nNivel de accelerare::", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED
PUSHBUTTON "Testează DirectSound", IDC_BUTTON_TESTDSOUND, 270, 125, 80, 14, WS_DISABLED
RTEXT "Hardware de sunet\nNivel de accelerare:", IDC_STATIC, 10, 125, 90, 20, WS_DISABLED
PUSHBUTTON "Testare DirectSound", IDC_BUTTON_TESTDSOUND, 270, 125, 80, 14, WS_DISABLED
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_TEXT_DSOUNDINFO, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -148,13 +148,13 @@ BEGIN
RTEXT "Colecție de MIDI DLS generală:", IDC_STATIC, 0, 0, 100, 10
EDITTEXT IDC_MIDI_DLS_COLLECTION, 105, 0, 250, 10, ES_LEFT | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP | ES_AUTOHSCROLL
GROUPBOX "Porturi de muzică", IDC_STATIC, 5, 10, 452, 85
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 97, 452, 70
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 97, 452, 70
LTEXT "Port de accelerare implicit:", IDC_STATIC, 15, 120, 95, 17
LTEXT "", IDC_STATIC_DEFAULT_PORT_ACCELERATION, 115, 120, 50, 10
PUSHBUTTON "Dezactivează", IDC_BUTTON_DISABLEDMUSIC, 75, 135, 80, 14, WS_DISABLED
LTEXT "Testare utilizare port:", IDC_STATIC, 180, 105, 100, 10
LISTBOX IDC_DMUSIC_TEST_LIST, 180, 115, 180, 45, LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Testează DirectMusic", IDC_BUTTON_TESTDMUSIC, 370, 145, 80, 14, WS_DISABLED
PUSHBUTTON "Testare DirectMusic", IDC_BUTTON_TESTDMUSIC, 370, 145, 80, 14, WS_DISABLED
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_MUSIC_NOTES, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -176,12 +176,12 @@ IDD_NETWORK_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Furnizori înregistrați de servicii DirectPlay", IDC_STATIC, 5, 0, 452, 75
GROUPBOX "Furnizori de servicii DirectPlay înregistrați", IDC_STATIC, 5, 0, 452, 75
CONTROL "", IDC_LIST_PROVIDER, "SysListView32", LVS_REPORT | WS_CHILD | WS_BORDER | WS_TABSTOP, 15, 12, 432, 55
GROUPBOX "Aplicații înregistrate pentru DirectPlay", IDC_STATIC, 5, 77, 452, 55
GROUPBOX "Funcționalități ReactX", IDC_STATIC, 5, 133, 452, 35
GROUPBOX "Aplicații Lobbyable DirectPlay înregistrate", IDC_STATIC, 5, 77, 452, 55
GROUPBOX "Caracteristici ReactX", IDC_STATIC, 5, 133, 452, 35
PUSHBUTTON "Opțiuni de voce DirectPlay", IDC_BUTTON_VOICE_OPTIONS, 10, 145, 90, 14, WS_DISABLED
PUSHBUTTON "Testează DirectPlay", IDC_BUTTON_TESTDPLAY, 130, 145, 80, 14, WS_DISABLED
PUSHBUTTON "Testare DirectPlay", IDC_BUTTON_TESTDPLAY, 130, 145, 80, 14, WS_DISABLED
GROUPBOX "Note", IDC_STATIC, 5, 170, 452, 50
EDITTEXT IDC_NETWORK_NOTES, 15, 182, 432, 30, ES_LEFT | WS_BORDER | ES_READONLY | WS_TABSTOP
END
@@ -190,73 +190,73 @@ IDD_HELP_DIALOG DIALOGEX 0, 0, 462, 220
STYLE DS_SHELLFONT | DS_CONTROL | WS_CHILD | WS_CLIPCHILDREN
FONT 8, "MS Shell Dlg"
BEGIN
LTEXT "Încă nu ați găsit informația necesară? Iată câteva lucruri suplimentare pe care le puteți face:", IDC_STATIC, 5, 0, 300, 10
LTEXT "Încă nu găsiți informațiile pe care le căutați? Iată câteva lucruri suplimentare pe care le puteți face:", IDC_STATIC, 5, 0, 300, 10
PUSHBUTTON "Informații de sistem", IDC_BUTTON_SYSINFO, 5, 20, 80, 14, WS_DISABLED
LTEXT "Afișează informații suplimantare de sistem", IDC_STATIC, 90, 23, 300, 10
PUSHBUTTON "Ajustează rata de împrospătare", IDC_BUTTON_DDRAW_REFRESH, 5, 40, 80, 14, WS_DISABLED
LTEXT "Ajustează rata de împrospătare pentru DirectDraw", IDC_STATIC, 90, 43, 300, 10
LTEXT "Afișează informații suplimentare de sistem", IDC_STATIC, 90, 23, 300, 10
PUSHBUTTON "Ajust. rata de împrosp.", IDC_BUTTON_DDRAW_REFRESH, 5, 40, 80, 14, WS_DISABLED
LTEXT "Ignoră rata de reîmprospătare pentru DirectDraw", IDC_STATIC, 90, 43, 300, 10
END
STRINGTABLE
BEGIN
IDS_MAIN_DIALOG "Diagnostic ReactX"
IDS_MAIN_DIALOG "Instrument de diagnosticare ReactX"
IDS_SYSTEM_DIALOG "Sistem"
IDS_DISPLAY_DIALOG "Ecran"
IDS_DISPLAY_DIALOG "Afișaj"
IDS_SOUND_DIALOG "Sunet"
IDS_MUSIC_DIALOG "Muzică"
IDS_INPUT_DIALOG "Intrări"
IDS_INPUT_DIALOG "Intrare"
IDS_NETWORK_DIALOG "Rețea"
IDS_HELP_DIALOG "Asistență"
IDS_FORMAT_MB "%I64u Mo memorie"
IDS_FORMAT_SWAP "%I64u Mo utilizată, %I64u Mo disponibilă"
IDS_FORMAT_UNIPROC "%s (%u procesor)"
IDS_FORMAT_MPPROC "%s (%u procesoare)"
IDS_VERSION_UNKNOWN "Versiune neidentificată"
IDS_HELP_DIALOG "Ajutor"
IDS_FORMAT_MB "%I64uMB de RAM"
IDS_FORMAT_SWAP "%I64u (de) MB folosit (folosiți), %I64u (de) MB disponibil(i)"
IDS_FORMAT_UNIPROC "%s (%u CPU)"
IDS_FORMAT_MPPROC "%s (%u CPUs)"
IDS_VERSION_UNKNOWN "Versiune necunoscută"
IDS_DEVICE_STATUS_ATTACHED "Conectat"
IDS_DEVICE_STATUS_MISSING "Deconectat"
IDS_DEVICE_STATUS_UNKNOWN "Neidentificat"
IDS_DEVICE_NAME "Nume dispozitiv"
IDS_DEVICE_STATUS_UNKNOWN "Necunoscut"
IDS_DEVICE_NAME "Numele dispozitivului"
IDS_DEVICE_STATUS "Stare"
IDS_DEVICE_CONTROLLER "ID controlor"
IDS_DEVICE_MANUFACTURER "ID producător"
IDS_DEVICE_PRODUCT "ID produs"
IDS_DEVICE_FORCEFEEDBACK "Forțează reacția driverului"
IDS_DEVICE_CONTROLLER "ID controller-ului"
IDS_DEVICE_MANUFACTURER "ID-ul producătorului"
IDS_DEVICE_PRODUCT "ID-ul produsului"
IDS_DEVICE_FORCEFEEDBACK "Forțare a driverului de feedback"
IDS_NOT_APPLICABLE "n/a"
IDS_OPTION_YES "Da"
IDS_DIRECTPLAY_COL_NAME1 "Nume"
IDS_DIRECTPLAY_COL_NAME2 "Registru"
IDS_DIRECTPLAY_COL_NAME3 "Fișier"
IDS_DIRECTPLAY_COL_NAME4 "Versiune"
IDS_DIRECTPLAY8_MODEMSP "Furnizor de serviciu Modem-DirectPlay8"
IDS_DIRECTPLAY8_SERIALSP "Furnizor de serviciu Serial-DirectPlay8"
IDS_DIRECTPLAY8_IPXSP "Furnizor de serviciu IPX-DirectPlay8"
IDS_DIRECTPLAY8_TCPSP "Furnizor de serviciu TCP/IP-DirectPlay8"
IDS_DIRECTPLAY8_MODEMSP "Furnizor de servicii de modem DirectPlay8"
IDS_DIRECTPLAY8_SERIALSP "Furnizor de servicii seriale DirectPlay8"
IDS_DIRECTPLAY8_IPXSP "Furnizor de servicii DirectPlay8 IPX"
IDS_DIRECTPLAY8_TCPSP "DirectPlay8 TCP/IP Service Provider"
IDS_DIRECTPLAY_TCPCONN "Conexiune de Internet TCP/IP pentru DirectPlay"
IDS_DIRECTPLAY_IPXCONN "Conexiune IPX pentru DirectPlay"
IDS_DIRECTPLAY_MODEMCONN "Conexiune Modem pentru DirectPlay"
IDS_DIRECTPLAY_SERIALCONN "Conexiune Serială pentru DirectPlay"
IDS_REG_SUCCESS "Î&nchide"
IDS_DIRECTPLAY_MODEMCONN "Conexiune de modem pentru DirectPlay"
IDS_DIRECTPLAY_SERIALCONN "Conexiune serială pentru DirectPlay"
IDS_REG_SUCCESS "OK"
IDS_REG_FAIL "Eroare"
IDS_DDTEST_ERROR "Testul a eșuat!"
IDS_DDTEST_DESCRIPTION "Urmează testele de interfață DirectDraw. Continuați?"
IDS_DDPRIMARY_DESCRIPTION "Testul următor va utiliza DirectDraw pentru a desena dreptunghiuri albe și negre pe suprafața primară. Continuați?"
IDS_DDPRIMARY_RESULT "Dreptunghiurile albe și negre au fost vizibile?"
IDS_DDOFFSCREEN_DESCRIPTION "Testul următor va utiliza DirectDraw pentru desenarea unui dreptunghi alb în mișcare utilizând o memorie tampon din afara ecranului. Continuați?"
IDS_DDOFFSCREEN_RESULT "Dreptunghiul alb în mișcare a fost vizibil?"
IDS_DDFULLSCREEN_DESCRIPTION "Testul următor va utiliza DirectDraw pentru desenarea unui dreptunghi alb în mișcare utilizând tot ecranul. Continuați?"
IDS_DDFULLSCREEN_RESULT "Pe ecranul complet, dreptunghiul alb în mișcare a fost vizibil?"
IDS_FORMAT_ADAPTER_MEM "%u Mo"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u biți)(%uHz)"
IDS_DDTEST_ERROR "Testul de randare DirectDraw a eșuat.\nVă rugăm să consultați notele pentru mai multe informații."
IDS_DDTEST_DESCRIPTION "Acesta va porni testarea interfeței DirectDraw. Doriți să continuați?"
IDS_DDPRIMARY_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena pe suprafața principală.\nAr trebui desenate dreptunghiuri alb-negru. Doriți să continuați?"
IDS_DDPRIMARY_RESULT "Ați văzut dreptunghiuri alb-negru?"
IDS_DDOFFSCREEN_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena un tampon în afara ecranului. Ar trebui desenat un dreptunghi alb în mișcare. Doriți să continuați?"
IDS_DDOFFSCREEN_RESULT "Ați văzut dreptunghi alb în mișcare?"
IDS_DDFULLSCREEN_DESCRIPTION "Acest test va folosi DirectDraw pentru a desena în modul ecran complet. Ar trebui desenat un dreptunghi alb în mișcare. Doriți să continuați?"
IDS_DDFULLSCREEN_RESULT "Ați văzut dreptunghi alb în mișcare în modul ecran complet?"
IDS_FORMAT_ADAPTER_MEM "%u (de) MB"
IDS_FORMAT_ADAPTER_MODE "%d x %d (%u (de) biți)(%uHz)"
IDS_OPTION_NO "Nu"
IDS_D3DTEST_DESCRIPTION "Urmează testul de interfață Direct3D. Continuați?"
IDS_D3DTEST_D3Dx "Testul următor va utiliza interfața Direct3D %u cu accelerare de echipament fizic."
IDS_OS_VERSION "%s %s (%d.%d, Build %d)"
IDS_D3DTEST_DESCRIPTION "Acesta va porni testarea interfeței Direct3D. Doriți să continuați?"
IDS_D3DTEST_D3Dx "Acest test va folosi interfața Direct3D %u accelerată hardware."
IDS_OS_VERSION "%s %s (%d.%d, Subversiunea %d)"
IDS_DMUSIC_DESC "Descriere"
IDS_DMUSIC_TYPE "Tip"
IDS_DMUSIC_KERNEL "Mod nucleu"
IDS_DMUSIC_IO "In/Ex"
IDS_DMUSIC_DLS "DLS de suport"
IDS_DMUSIC_KERNEL "Modul nucleu"
IDS_DMUSIC_IO "I/E"
IDS_DMUSIC_DLS "Suportă DLS"
IDS_DMUSIC_EXT "Extern"
IDS_DMUSIC_PORT "Port implicit"
IDS_DDDISABLE_MSG "Accelerările fizice DirectDraw vor fi dezactivate pentru toate dispozitivele.\nDoriți să continuați?\n"
IDS_DDDISABLE_MSG "Acesta va dezactiva toată accelerarea hardware pentru DirectDraw pe toate dispozitivele de afișare.\nDoriți să continuați?\n"
END

View File

@@ -26,12 +26,18 @@
#include "resource.h"
typedef struct
{
HWND hDisplayWnd;
GUID guid;
} DXDIAG_DISPLAY, *PDXDIAG_DISPLAY;
typedef struct
{
HWND hMainDialog;
HWND hTabCtrl;
ULONG NumDisplayAdapter;
HWND * hDisplayWnd;
PDXDIAG_DISPLAY * DisplayAdapters;
ULONG NumSoundAdapter;
HWND * hSoundWnd;
HWND hDialogs[5];
@@ -53,10 +59,10 @@ INT_PTR CALLBACK NetworkPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
INT_PTR CALLBACK HelpPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
/* DirectDraw tests */
VOID DDTests(VOID);
VOID DDTests(GUID *lpDevice);
/* Direct3D tests */
VOID D3DTests(VOID);
VOID D3DTests(GUID *lpDevice);
/* DirectSound initialization */
void InitializeDirectSoundPage(PDXDIAG_CONTEXT pContext);

View File

@@ -1,7 +1,7 @@
add_definitions(-D__WINESRC__)
add_executable(extrac32 extrac32.c)
target_link_libraries(extrac32 wine)
set_module_type(extrac32 win32gui UNICODE)
add_importlibs(extrac32 shell32 setupapi shlwapi user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET extrac32 DESTINATION reactos/system32 FOR all)
set_wine_module_FIXME(extrac32) # CORE-5743: No ARRAY_SIZE macro

View File

@@ -40,6 +40,9 @@
#ifdef LANGUAGE_IT_IT
#include "lang/it-IT.rc"
#endif
#ifdef LANGUAGE_JA_JP
#include "lang/ja-JP.rc"
#endif
#ifdef LANGUAGE_LT_LT
#include "lang/lt-LT.rc"
#endif

View File

@@ -0,0 +1,13 @@
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_USAGE "FINDSTR: 文字列を含むファイルのすべての行を出力します。\n\n\
FIND [ /C ] [ /I ] [ /N ] [ /V ] ""文字列"" [ ファイル... ]\n\
/C 文字列を含む行の個数を数えます\n\
/I 大文字小文字を無視します\n\
/N 表示される行に1から番号を付けます\n\
/V 文字列を含まない行を出力します"
IDS_NO_SUCH_FILE "FINDSTR: %s: そのようなファイルはありません\n"
IDS_CANNOT_OPEN "FINDSTR: %s: ファイルが開けません\n"
END

View File

@@ -18,12 +18,12 @@ BEGIN
IDS_ERROR_NOMEM "Mémoire insuffisante pour terminer l'opération."
IDS_ERROR_NOFONT "Le fichier %1 n'est pas un fichier de polices valide."
IDS_ERROR_NOCLASS "Impossible d'initialiser la classe de fenêtre."
IDS_ERROR_ISINSTALLED "This font is already installed!"
IDS_ERROR_FONTCPY "Failed to copy the font file!"
IDS_ERROR_OPENKEY "Failed to open the fonts registry key!"
IDS_ERROR_REGISTER "Failed to register the new font!"
IDS_SUCCESS "Success"
IDS_COMPLETED "Font installation completed."
IDS_ERROR_ISINSTALLED "Cette police est déjà installée !"
IDS_ERROR_FONTCPY "Échec lors de la copie du fichier police !"
IDS_ERROR_OPENKEY "Échec lors de l'ouverture de la clé de registre de la police !"
IDS_ERROR_REGISTER "Échec lors de l'enregistrement de la nouvelle police !"
IDS_SUCCESS "Succès"
IDS_COMPLETED "Installation de la police effectuée."
IDS_FILTER_LIST "Toutes polices supportées (*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc)\0*.fon;*.fnt;*.ttf;*.ttc;*.otf;*.otc\0\
Fichier de polices (*.fon;*.fnt)\0*.fon;*.fnt\0\
Fichier de polices TrueType (*.ttf)\0*.ttf\0\

View File

@@ -1,7 +1,11 @@
/* FILE: applications/games/solitaire/lang/cs-CZ.rc
* PURPOSE: Czech Language File
* TRANSLATOR: Radek Liska aka Black_Fox (radekliska at gmail dot com)
* UPDATED: 2008-11-30 by Kario
/*
* PROJECT: ReactOS Solitaire
* LICENSE: Freeware, permission to use under Public Domain
* PURPOSE: Czech resource file
* TRANSLATORS: Copyright 2008 Radek Liška (Black_Fox) <radekliska@gmail.com>
* Copyright 2008 Mário Kačmár <kario@szm.sk>
* Copyright 2011-2017 Kamil Horníček <kamil.hornicek@reactos.org>
* Copyright 2024 Václav Zouzalík (Venca24) <vaclav.zouzalik@seznam.cz>
*/
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
@@ -13,13 +17,13 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SHELLFONT
CAPTION "Možnosti"
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX "Karty", -1, 7, 7, 90, 40
GROUPBOX "Sejmout", -1, 7, 7, 90, 40
AUTORADIOBUTTON "Sejmout &jednu", IDC_OPT_DRAWONE, 14, 19, 70, 10, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "Sejmout &tři", IDC_OPT_DRAWTHREE, 14, 32, 70, 10
GROUPBOX "Scoring", -1, 100, 7, 75, 53
GROUPBOX "Skórování", -1, 100, 7, 75, 53
AUTORADIOBUTTON "&Standard", IDC_OPT_STANDARD, 107, 19, 60, 10, WS_GROUP | WS_TABSTOP
AUTORADIOBUTTON "&Vegas", IDC_OPT_VEGAS, 107, 32, 60, 10
AUTORADIOBUTTON "&None", IDC_OPT_NOSCORE, 107, 45, 60, 10
AUTORADIOBUTTON "Žá&dné", IDC_OPT_NOSCORE, 107, 45, 60, 10
AUTOCHECKBOX "Zobrazit č&as", IDC_OPT_SHOWTIME, 7 ,51 ,65 ,10, WS_TABSTOP
AUTOCHECKBOX "Stavový řád&ek", IDC_OPT_STATUSBAR, 7, 66, 64, 10, WS_TABSTOP
AUTOCHECKBOX "&Ponechat skóre", IDC_OPT_KEEPSCORE, 100, 66, 65, 10, WS_TABSTOP
@@ -55,7 +59,7 @@ BEGIN
IDS_SOL_NAME "Solitaire"
IDS_SOL_ABOUT "Solitaire by J Brown\nCardLib verze 1.0"
IDS_SOL_QUIT "Ukončit rozehranou hru?"
IDS_SOL_WIN "Gratulujeme, zvítězili jste!!"
IDS_SOL_WIN "Gratulujeme, zvítězili jste!"
IDS_SOL_DEAL "Rozdat znova?"
IDS_SOL_SCORE "Skóre: %d"
IDS_SOL_TIME "Čas: %d"
@@ -69,8 +73,8 @@ BEGIN
BEGIN
MENUITEM "&Rozdat\tF2", IDM_GAME_NEW
MENUITEM SEPARATOR
MENUITEM "&Undo", IDM_GAME_UNDO, GRAYED
MENUITEM "Rub& karet...", IDM_GAME_DECK
MENUITEM "&Zpět", IDM_GAME_UNDO, GRAYED
MENUITEM "Ru&b karet...", IDM_GAME_DECK
MENUITEM "&Možnosti...", IDM_GAME_OPTIONS
MENUITEM SEPARATOR
MENUITEM "&Konec", IDM_GAME_EXIT

View File

@@ -1,8 +1,10 @@
add_rc_deps(kbswitch.rc ${CMAKE_CURRENT_SOURCE_DIR}/res/kbswitch.ico)
add_executable(kbswitch kbswitch.c kbswitch.rc)
add_executable(kbswitch kbswitch.c imemenu.c kbswitch.rc)
set_module_type(kbswitch win32gui UNICODE)
add_importlibs(kbswitch advapi32 imm32 user32 shell32 shlwapi gdi32 msvcrt kernel32)
target_link_libraries(kbswitch wine)
add_importlibs(kbswitch advapi32 imm32 user32 shell32 shlwapi gdi32 msvcrt kernel32 ntdll)
add_cd_file(TARGET kbswitch DESTINATION reactos/system32 FOR all)
add_subdirectory(kbsdll)
add_subdirectory(indicdll)
add_dependencies(kbswitch indicdll)

View File

@@ -0,0 +1,260 @@
/*
* PROJECT: ReactOS Keyboard Layout Switcher
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: IME menu handling
* COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#include "kbswitch.h"
#include "imemenu.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(internat);
PIMEMENUNODE g_pMenuList = NULL;
INT g_nNextMenuID = 0;
static BOOL MakeImeMenu(_In_ HMENU hMenu, _In_ const IMEMENUNODE *pMenu);
static VOID
AddImeMenuNode(_In_ PIMEMENUNODE pMenu)
{
if (!g_pMenuList)
{
g_pMenuList = pMenu;
return;
}
pMenu->m_pNext = g_pMenuList;
g_pMenuList = pMenu;
}
static PIMEMENUNODE
AllocateImeMenu(_In_ DWORD itemCount)
{
SIZE_T cbMenu = sizeof(IMEMENUNODE) + (itemCount - 1) * sizeof(IMEMENUITEM);
PIMEMENUNODE pMenu = LocalAlloc(LPTR, cbMenu);
if (!pMenu)
return NULL;
pMenu->m_nItems = itemCount;
AddImeMenuNode(pMenu);
return pMenu;
}
static VOID
GetImeMenuItem(
_In_ HIMC hIMC,
_Out_ PIMEMENUITEMINFO lpImeParentMenu,
_In_ BOOL bRightMenu,
_Out_ PIMEMENUITEM pItem)
{
ZeroMemory(pItem, sizeof(IMEMENUITEM));
pItem->m_Info = *lpImeParentMenu;
if (lpImeParentMenu->fType & IMFT_SUBMENU)
pItem->m_pSubMenu = CreateImeMenu(hIMC, lpImeParentMenu, bRightMenu);
pItem->m_nRealID = pItem->m_Info.wID;
pItem->m_Info.wID = ID_STARTIMEMENU + g_nNextMenuID++;
}
PIMEMENUNODE
CreateImeMenu(
_In_ HIMC hIMC,
_Inout_opt_ PIMEMENUITEMINFO lpImeParentMenu,
_In_ BOOL bRightMenu)
{
const DWORD dwFlags = (bRightMenu ? IGIMIF_RIGHTMENU : 0);
const DWORD dwTypes = IGIMII_CMODE |
IGIMII_SMODE |
IGIMII_CONFIGURE |
IGIMII_TOOLS |
IGIMII_HELP |
IGIMII_OTHER;
DWORD itemCount = ImmGetImeMenuItems(hIMC, dwFlags, dwTypes, lpImeParentMenu, NULL, 0);
if (!itemCount)
return NULL;
PIMEMENUNODE pMenu = AllocateImeMenu(itemCount);
if (!pMenu)
return NULL;
DWORD cbItems = sizeof(IMEMENUITEMINFO) * itemCount;
PIMEMENUITEMINFO pImeMenuItems = LocalAlloc(LPTR, cbItems);
if (!pImeMenuItems)
{
LocalFree(pMenu);
return NULL;
}
itemCount = ImmGetImeMenuItems(hIMC, dwFlags, dwTypes, lpImeParentMenu, pImeMenuItems, cbItems);
if (!itemCount)
{
LocalFree(pImeMenuItems);
LocalFree(pMenu);
return NULL;
}
PIMEMENUITEM pItems = pMenu->m_Items;
for (DWORD iItem = 0; iItem < itemCount; ++iItem)
{
GetImeMenuItem(hIMC, &pImeMenuItems[iItem], bRightMenu, &pItems[iItem]);
}
LocalFree(pImeMenuItems);
return pMenu;
}
static BOOL
FillImeMenuItem(_Out_ LPMENUITEMINFO pItemInfo, _In_ const IMEMENUITEM *pItem)
{
ZeroMemory(pItemInfo, sizeof(MENUITEMINFO));
pItemInfo->cbSize = sizeof(MENUITEMINFO);
pItemInfo->fMask = MIIM_ID | MIIM_STATE | MIIM_DATA;
pItemInfo->wID = pItem->m_Info.wID;
pItemInfo->fState = pItem->m_Info.fState;
pItemInfo->dwItemData = pItem->m_Info.dwItemData;
if (pItem->m_Info.fType)
{
pItemInfo->fMask |= MIIM_FTYPE;
pItemInfo->fType = 0;
if (pItem->m_Info.fType & IMFT_RADIOCHECK)
pItemInfo->fType |= MFT_RADIOCHECK;
if (pItem->m_Info.fType & IMFT_SEPARATOR)
pItemInfo->fType |= MFT_SEPARATOR;
}
if (pItem->m_Info.fType & IMFT_SUBMENU)
{
pItemInfo->fMask |= MIIM_SUBMENU;
pItemInfo->hSubMenu = CreatePopupMenu();
if (!MakeImeMenu(pItemInfo->hSubMenu, pItem->m_pSubMenu))
{
DestroyMenu(pItemInfo->hSubMenu);
pItemInfo->hSubMenu = NULL;
return FALSE;
}
}
if (pItem->m_Info.hbmpChecked && pItem->m_Info.hbmpUnchecked)
{
pItemInfo->fMask |= MIIM_CHECKMARKS;
pItemInfo->hbmpChecked = pItem->m_Info.hbmpChecked;
pItemInfo->hbmpUnchecked = pItem->m_Info.hbmpUnchecked;
}
if (pItem->m_Info.hbmpItem)
{
pItemInfo->fMask |= MIIM_BITMAP;
pItemInfo->hbmpItem = pItem->m_Info.hbmpItem;
}
PCTSTR szString = pItem->m_Info.szString;
if (szString && szString[0])
{
pItemInfo->fMask |= MIIM_STRING;
pItemInfo->dwTypeData = (PTSTR)szString;
pItemInfo->cch = lstrlen(szString);
}
return TRUE;
}
static BOOL
MakeImeMenu(_In_ HMENU hMenu, _In_ const IMEMENUNODE *pMenu)
{
if (!pMenu || !pMenu->m_nItems)
return FALSE;
for (INT iItem = 0; iItem < pMenu->m_nItems; ++iItem)
{
MENUITEMINFO mi = { sizeof(mi) };
if (!FillImeMenuItem(&mi, &pMenu->m_Items[iItem]))
{
ERR("FillImeMenuItem failed\n");
return FALSE;
}
if (!InsertMenuItem(hMenu, iItem, TRUE, &mi))
{
ERR("InsertMenuItem failed\n");
return FALSE;
}
}
return TRUE;
}
HMENU MenuFromImeMenu(_In_ const IMEMENUNODE *pMenu)
{
HMENU hMenu = CreatePopupMenu();
if (!pMenu)
return hMenu;
if (!MakeImeMenu(hMenu, pMenu))
{
DestroyMenu(hMenu);
return NULL;
}
return hMenu;
}
INT
GetRealImeMenuID(_In_ const IMEMENUNODE *pMenu, _In_ INT nFakeID)
{
if (!pMenu || !pMenu->m_nItems || nFakeID < ID_STARTIMEMENU)
return 0;
for (INT iItem = 0; iItem < pMenu->m_nItems; ++iItem)
{
const IMEMENUITEM *pItem = &pMenu->m_Items[iItem];
if (pItem->m_Info.wID == nFakeID)
return pItem->m_nRealID;
if (pItem->m_pSubMenu)
{
INT nRealID = GetRealImeMenuID(pItem->m_pSubMenu, nFakeID);
if (nRealID)
return nRealID;
}
}
return 0;
}
static BOOL
FreeMenuNode(_In_ PIMEMENUNODE pMenuNode)
{
if (!pMenuNode)
return FALSE;
for (INT iItem = 0; iItem < pMenuNode->m_nItems; ++iItem)
{
PIMEMENUITEM pItem = &pMenuNode->m_Items[iItem];
if (pItem->m_Info.hbmpChecked)
DeleteObject(pItem->m_Info.hbmpChecked);
if (pItem->m_Info.hbmpUnchecked)
DeleteObject(pItem->m_Info.hbmpUnchecked);
if (pItem->m_Info.hbmpItem)
DeleteObject(pItem->m_Info.hbmpItem);
}
LocalFree(pMenuNode);
return TRUE;
}
VOID
CleanupImeMenus(VOID)
{
if (!g_pMenuList)
return;
PIMEMENUNODE pNext;
for (PIMEMENUNODE pNode = g_pMenuList; pNode; pNode = pNext)
{
pNext = pNode->m_pNext;
FreeMenuNode(pNode);
}
g_pMenuList = NULL;
g_nNextMenuID = 0;
}

View File

@@ -0,0 +1,38 @@
/*
* PROJECT: ReactOS Keyboard Layout Switcher
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: IME menu handling
* COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#pragma once
#include <immdev.h>
#define ID_STARTIMEMENU 1000
struct tagIMEMENUNODE;
typedef struct tagIMEMENUITEM
{
IMEMENUITEMINFO m_Info;
UINT m_nRealID;
struct tagIMEMENUNODE *m_pSubMenu;
} IMEMENUITEM, *PIMEMENUITEM;
typedef struct tagIMEMENUNODE
{
struct tagIMEMENUNODE *m_pNext;
INT m_nItems;
IMEMENUITEM m_Items[ANYSIZE_ARRAY];
} IMEMENUNODE, *PIMEMENUNODE;
PIMEMENUNODE
CreateImeMenu(
_In_ HIMC hIMC,
_Inout_opt_ PIMEMENUITEMINFO lpImeParentMenu,
_In_ BOOL bRightMenu);
HMENU MenuFromImeMenu(_In_ const IMEMENUNODE *pMenu);
INT GetRealImeMenuID(_In_ const IMEMENUNODE *pMenu, _In_ INT nFakeID);
VOID CleanupImeMenus(VOID);

View File

@@ -0,0 +1,16 @@
spec2def(indicdll.dll indicdll.spec)
file(GLOB indicdll_rc_deps res/*.*)
add_rc_deps(indicdll.rc ${indicdll_rc_deps})
list(APPEND SOURCE
indicdll.c
indicdll.rc
${CMAKE_CURRENT_BINARY_DIR}/indicdll.def)
add_library(indicdll MODULE ${SOURCE})
set_module_type(indicdll win32dll UNICODE)
target_link_libraries(indicdll wine)
add_importlibs(indicdll user32 comctl32 msvcrt kernel32 ntdll)
add_cd_file(TARGET indicdll DESTINATION reactos/system32 FOR all)

View File

@@ -0,0 +1,276 @@
/*
* PROJECT: ReactOS Keyboard Layout Switcher
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Switching Keyboard Layouts
* COPYRIGHT: Copyright Dmitry Chapyshev (dmitry@reactos.org)
* Copyright Colin Finck (mail@colinfinck.de)
* Copyright 2022-2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#include "../kbswitch.h"
#include "resource.h"
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(internat);
typedef struct tagSHARED_DATA
{
HHOOK hWinHook;
HHOOK hShellHook;
HHOOK hKeyboardHook;
HWND hKbSwitchWnd;
UINT nHotID;
DWORD_PTR dwHotMenuItemData;
} SHARED_DATA, *PSHARED_DATA;
HINSTANCE g_hInstance = NULL;
HANDLE g_hShared = NULL;
PSHARED_DATA g_pShared = NULL;
HANDLE g_hMutex = NULL;
#define MUTEX_TIMEOUT_MS (4 * 1000)
static inline BOOL EnterProtectedSection(VOID)
{
DWORD dwWaitResult = WaitForSingleObject(g_hMutex, MUTEX_TIMEOUT_MS);
if (dwWaitResult == WAIT_OBJECT_0)
return TRUE;
if (dwWaitResult == WAIT_TIMEOUT)
WARN("Timeout while waiting for mutex.\n");
else
WARN("Failed to acquire mutex. Error code: %lu\n", GetLastError());
return FALSE;
}
static inline VOID LeaveProtectedSection(VOID)
{
ReleaseMutex(g_hMutex);
}
static inline VOID
PostMessageToMainWnd(UINT Msg, WPARAM wParam, LPARAM lParam)
{
if (g_pShared->hKbSwitchWnd)
PostMessage(g_pShared->hKbSwitchWnd, Msg, wParam, lParam);
}
static LRESULT CALLBACK
WinHookProc(INT code, WPARAM wParam, LPARAM lParam)
{
if (code < 0)
return CallNextHookEx(g_pShared->hWinHook, code, wParam, lParam);
switch (code)
{
case HCBT_ACTIVATE:
case HCBT_SETFOCUS:
{
HWND hwndFocus = (HWND)wParam;
if (hwndFocus && hwndFocus != g_pShared->hKbSwitchWnd)
PostMessageToMainWnd(WM_WINDOW_ACTIVATE, (WPARAM)hwndFocus, 0);
break;
}
}
return CallNextHookEx(g_pShared->hWinHook, code, wParam, lParam);
}
static LRESULT CALLBACK
ShellHookProc(INT code, WPARAM wParam, LPARAM lParam)
{
if (code < 0)
return CallNextHookEx(g_pShared->hShellHook, code, wParam, lParam);
switch (code)
{
case HSHELL_WINDOWACTIVATED:
{
PostMessageToMainWnd(WM_WINDOW_ACTIVATE, wParam, 0);
break;
}
case HSHELL_LANGUAGE:
{
PostMessageToMainWnd(WM_LANG_CHANGED, wParam, lParam);
break;
}
}
return CallNextHookEx(g_pShared->hShellHook, code, wParam, lParam);
}
static inline BOOL
CheckVirtualKey(UINT vKey, UINT vKey0, UINT vKey1, UINT vKey2)
{
return vKey == vKey0 || vKey == vKey1 || vKey == vKey2;
}
static LRESULT CALLBACK
KeyboardProc(INT code, WPARAM wParam, LPARAM lParam)
{
if (code < 0)
return CallNextHookEx(g_pShared->hKeyboardHook, code, wParam, lParam);
if (code == HC_ACTION)
{
UINT vKey = (UINT)wParam;
LONG keyFlags = HIWORD(lParam);
if (!(keyFlags & KF_UP) && !(keyFlags & KF_REPEAT))
{
BOOL bShiftPressed = (GetKeyState(VK_SHIFT) < 0);
BOOL bAltPressed = (keyFlags & KF_ALTDOWN) || (GetKeyState(VK_MENU) < 0);
BOOL bCtrlPressed = (GetKeyState(VK_CONTROL) < 0);
// Detect Alt+Shift and Ctrl+Shift
if ((bAltPressed && CheckVirtualKey(vKey, VK_SHIFT, VK_LSHIFT, VK_RSHIFT)) ||
(bShiftPressed && CheckVirtualKey(vKey, VK_MENU, VK_LMENU, VK_RMENU)) ||
(bCtrlPressed && CheckVirtualKey(vKey, VK_SHIFT, VK_LSHIFT, VK_RSHIFT)) ||
(bShiftPressed && CheckVirtualKey(vKey, VK_CONTROL, VK_LCONTROL, VK_RCONTROL)))
{
PostMessageToMainWnd(WM_LANG_CHANGED, 0, 0);
}
}
}
return CallNextHookEx(g_pShared->hKeyboardHook, code, wParam, lParam);
}
BOOL APIENTRY
KbSwitchSetHooks(_In_ BOOL bDoHook)
{
TRACE("bDoHook: %d\n", bDoHook);
if (!EnterProtectedSection())
return FALSE;
if (bDoHook)
{
g_pShared->hWinHook = SetWindowsHookEx(WH_CBT, WinHookProc, g_hInstance, 0);
g_pShared->hShellHook = SetWindowsHookEx(WH_SHELL, ShellHookProc, g_hInstance, 0);
g_pShared->hKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, KeyboardProc, g_hInstance, 0);
if (g_pShared->hWinHook &&
g_pShared->hShellHook &&
g_pShared->hKeyboardHook)
{
// Find kbswitch window if necessary
if (!g_pShared->hKbSwitchWnd || !IsWindow(g_pShared->hKbSwitchWnd))
{
g_pShared->hKbSwitchWnd = FindWindow(INDICATOR_CLASS, NULL);
TRACE("hKbSwitchWnd: %p\n", g_pShared->hKbSwitchWnd);
}
LeaveProtectedSection();
return TRUE;
}
}
/* Unhook */
if (g_pShared->hKeyboardHook)
{
UnhookWindowsHookEx(g_pShared->hKeyboardHook);
g_pShared->hKeyboardHook = NULL;
}
if (g_pShared->hShellHook)
{
UnhookWindowsHookEx(g_pShared->hShellHook);
g_pShared->hShellHook = NULL;
}
if (g_pShared->hWinHook)
{
UnhookWindowsHookEx(g_pShared->hWinHook);
g_pShared->hWinHook = NULL;
}
LeaveProtectedSection();
return !bDoHook;
}
// indicdll!12
VOID APIENTRY
GetPenMenuData(PUINT pnID, PDWORD_PTR pdwItemData)
{
if (EnterProtectedSection())
{
*pnID = g_pShared->nHotID;
*pdwItemData = g_pShared->dwHotMenuItemData;
LeaveProtectedSection();
}
else
{
WARN("EnterProtectedSection failed\n");
*pnID = 0;
*pdwItemData = 0;
}
}
// indicdll!14
VOID APIENTRY
SetPenMenuData(_In_ UINT nID, _In_ DWORD_PTR dwItemData)
{
if (EnterProtectedSection())
{
g_pShared->nHotID = nID;
g_pShared->dwHotMenuItemData = dwItemData;
LeaveProtectedSection();
}
else
{
WARN("EnterProtectedSection failed\n");
}
}
BOOL WINAPI
DllMain(IN HINSTANCE hinstDLL,
IN DWORD dwReason,
IN LPVOID lpvReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
{
TRACE("DLL_PROCESS_ATTACH\n");
g_hInstance = hinstDLL;
g_hShared = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
0, sizeof(SHARED_DATA), TEXT("InternatSHData"));
if (!g_hShared)
{
ERR("!g_hShared\n");
return FALSE;
}
BOOL bAlreadyExists = GetLastError() == ERROR_ALREADY_EXISTS;
TRACE("bAlreadyExists: %d\n", bAlreadyExists);
g_pShared = (PSHARED_DATA)MapViewOfFile(g_hShared, FILE_MAP_WRITE, 0, 0, 0);
if (!g_pShared)
{
ERR("!g_pShared\n");
return FALSE;
}
if (!bAlreadyExists)
ZeroMemory(g_pShared, sizeof(*g_pShared));
g_hMutex = CreateMutex(NULL, FALSE, TEXT("INDICDLL_PROTECTED"));
if (!g_hMutex)
{
ERR("Failed to create mutex\n");
return FALSE;
}
break;
}
case DLL_PROCESS_DETACH:
{
TRACE("DLL_PROCESS_DETACH\n");
if (g_hMutex)
CloseHandle(g_hMutex);
UnmapViewOfFile(g_pShared);
CloseHandle(g_hShared);
break;
}
}
return TRUE;
}

View File

@@ -0,0 +1,15 @@
#include "resource.h"
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Keyboard Layout Switcher"
#define REACTOS_STR_INTERNAL_NAME "indicdll"
#define REACTOS_STR_ORIGINAL_FILENAME "indicdll.dll"
#include <reactos/version.rc>
IDI_IME_OPEN ICON "res/10.ico"
IDI_IME_CLOSED ICON "res/11.ico"
IDI_IME_DISABLED ICON "res/12.ico"
IDI_KOREAN_A_HALF ICON "res/13.ico"
IDI_KOREAN_A_FULL ICON "res/14.ico"
IDI_KOREAN_JR_HALF ICON "res/15.ico"
IDI_KOREAN_JR_FULL ICON "res/16.ico"

View File

@@ -0,0 +1,3 @@
1 stdcall KbSwitchSetHooks(long)
12 stdcall GetPenMenuData(ptr ptr)
14 stdcall SetPenMenuData(long long)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,8 @@
#define IDI_IME_OPEN 10
#define IDI_IME_CLOSED 11
#define IDI_IME_DISABLED 12
#define IDI_KOREAN_A_HALF 13
#define IDI_KOREAN_A_FULL 14
#define IDI_KOREAN_JR_HALF 15
#define IDI_KOREAN_JR_FULL 16

View File

@@ -1,12 +0,0 @@
spec2def(kbsdll.dll kbsdll.spec)
list(APPEND SOURCE
kbsdll.c
kbsdll.rc
${CMAKE_CURRENT_BINARY_DIR}/kbsdll.def)
add_library(kbsdll MODULE ${SOURCE})
set_module_type(kbsdll win32dll UNICODE)
add_importlibs(kbsdll user32 comctl32 msvcrt kernel32)
add_cd_file(TARGET kbsdll DESTINATION reactos/system32 FOR all)

View File

@@ -1,114 +0,0 @@
/*
* PROJECT: ReactOS Keyboard Layout Switcher
* FILE: base/applications/kbswitch/kbsdll/kbsdll.c
* PROGRAMMER: Dmitry Chapyshev <dmitry@reactos.org>
*
*/
#include "../kbswitch.h"
HHOOK hWinHook = NULL;
HHOOK hShellHook = NULL;
HINSTANCE hInstance = NULL;
HWND hKbSwitchWnd = NULL;
static VOID
PostMessageToMainWnd(UINT Msg, WPARAM wParam, LPARAM lParam)
{
PostMessage(hKbSwitchWnd, Msg, wParam, lParam);
}
LRESULT CALLBACK
WinHookProc(int code, WPARAM wParam, LPARAM lParam)
{
if (code < 0)
{
return CallNextHookEx(hWinHook, code, wParam, lParam);
}
switch (code)
{
case HCBT_SETFOCUS:
{
HWND hwndFocus = (HWND)wParam;
if (hwndFocus && hwndFocus != hKbSwitchWnd)
{
PostMessageToMainWnd(WM_WINDOW_ACTIVATE, wParam, lParam);
}
}
break;
}
return CallNextHookEx(hWinHook, code, wParam, lParam);
}
LRESULT CALLBACK
ShellHookProc(int code, WPARAM wParam, LPARAM lParam)
{
if (code < 0)
{
return CallNextHookEx(hShellHook, code, wParam, lParam);
}
switch (code)
{
case HSHELL_LANGUAGE:
{
PostMessageToMainWnd(WM_LANG_CHANGED, wParam, lParam);
}
break;
}
return CallNextHookEx(hShellHook, code, wParam, lParam);
}
BOOL WINAPI
KbSwitchSetHooks(VOID)
{
hWinHook = SetWindowsHookEx(WH_CBT, WinHookProc, hInstance, 0);
hShellHook = SetWindowsHookEx(WH_SHELL, ShellHookProc, hInstance, 0);
if (!hWinHook || !hShellHook)
{
return FALSE;
}
return TRUE;
}
VOID WINAPI
KbSwitchDeleteHooks(VOID)
{
if (hWinHook)
{
UnhookWindowsHookEx(hWinHook);
hWinHook = NULL;
}
if (hShellHook)
{
UnhookWindowsHookEx(hShellHook);
hShellHook = NULL;
}
}
BOOL WINAPI
DllMain(IN HINSTANCE hinstDLL,
IN DWORD dwReason,
IN LPVOID lpvReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
{
hInstance = hinstDLL;
hKbSwitchWnd = FindWindow(szKbSwitcherName, NULL);
if (!hKbSwitchWnd)
{
return FALSE;
}
}
break;
}
return TRUE;
}

View File

@@ -1,5 +0,0 @@
#define REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS Keyboard Layout Switcher"
#define REACTOS_STR_INTERNAL_NAME "kbsdll"
#define REACTOS_STR_ORIGINAL_FILENAME "kbsdll.dll"
#include <reactos/version.rc>

View File

@@ -1,2 +0,0 @@
@ stdcall KbSwitchSetHooks()
@ stdcall KbSwitchDeleteHooks()

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
#pragma once
#include <stdarg.h>
#include <stdlib.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
@@ -10,20 +10,39 @@
#include <shellapi.h>
#include <tchar.h>
#include <strsafe.h>
#include <ime/indicml.h> /* INDICATOR_CLASS, INDICM_... */
#include "resource.h"
#include "indicdll/resource.h"
// Character Count of a layout ID like "00000409"
#define CCH_LAYOUT_ID 8
#define CCH_LAYOUT_ID 8 // Character Count of a layout ID like "00000409"
#define CCH_ULONG_DEC 10 // Maximum Character Count of a ULONG in decimal
// Maximum Character Count of a ULONG in decimal
#define CCH_ULONG_DEC 10
// Far East Language IDs
#define LANGID_CHINESE_SIMPLIFIED MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)
#define LANGID_CHINESE_TRADITIONAL MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)
#define LANGID_JAPANESE MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT)
#define LANGID_KOREAN MAKELANGID(LANG_KOREAN, SUBLANG_DEFAULT)
#define WM_KEY_PRESSED (WM_USER + 10100)
#define WM_LANG_CHANGED (WM_USER + 10200)
#define WM_WINDOW_ACTIVATE (WM_USER + 10300)
typedef BOOL (WINAPI *PKBSWITCHSETHOOKS) (VOID);
typedef VOID (WINAPI *PKBSWITCHDELETEHOOKS) (VOID);
#define IME_STATUS_NO_IME 0
#define IME_STATUS_IME_CLOSED 1
#define IME_STATUS_IME_OPEN 2
#define IME_STATUS_IME_NATIVE 4
#define IME_STATUS_IME_FULLSHAPE 8
TCHAR szKbSwitcherName[] = _T("kbswitcher");
static inline BOOL
IsWndClassName(_In_opt_ HWND hwndTarget, PCTSTR pszName)
{
TCHAR szClass[32];
GetClassName(hwndTarget, szClass, _countof(szClass));
return lstrcmpi(szClass, pszName) == 0;
}
static inline BOOL
IsConsoleWnd(_In_opt_ HWND hwndTarget)
{
return IsWndClassName(hwndTarget, TEXT("ConsoleWindowClass"));
}

View File

@@ -9,3 +9,13 @@ BEGIN
MENUITEM "Из&ход", ID_EXIT
END
END
STRINGTABLE
BEGIN
IDS_IME_ON "Input System (IME) - ON"
IDS_IME_OFF "Input System (IME) - OFF"
IDS_SOFTKBD_ON "Soft Keyboard - ON"
IDS_SOFTKBD_OFF "Soft Keyboard - OFF"
IDS_SHOWTOOLBAR "Show Toolbar"
IDS_INPUTSYSTEM "Input System (IME) configuration..."
END

View File

@@ -14,3 +14,13 @@ BEGIN
MENUITEM "&Ukončit", ID_EXIT
END
END
STRINGTABLE
BEGIN
IDS_IME_ON "Input System (IME) - ON"
IDS_IME_OFF "Input System (IME) - OFF"
IDS_SOFTKBD_ON "Soft Keyboard - ON"
IDS_SOFTKBD_OFF "Soft Keyboard - OFF"
IDS_SHOWTOOLBAR "Show Toolbar"
IDS_INPUTSYSTEM "Input System (IME) configuration..."
END

View File

@@ -9,3 +9,13 @@ BEGIN
MENUITEM "&Beenden", ID_EXIT
END
END
STRINGTABLE
BEGIN
IDS_IME_ON "Input System (IME) - ON"
IDS_IME_OFF "Input System (IME) - OFF"
IDS_SOFTKBD_ON "Soft Keyboard - ON"
IDS_SOFTKBD_OFF "Soft Keyboard - OFF"
IDS_SHOWTOOLBAR "Show Toolbar"
IDS_INPUTSYSTEM "Input System (IME) configuration..."
END

Some files were not shown because too many files have changed in this diff Show More