Commit Graph

88548 Commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
f76cfad87b ** WIP ** [NETSH] Fix loading providers when testing on Windows 2026-03-30 22:58:17 +02:00
Hermès Bélusca-Maïto
6d698c15f8 ** WIP ** [CACLS] Some fixes -- CACLS can act on directories 2026-03-30 22:58:00 +02:00
Hermès Bélusca-Maïto
97cc32519f [WLANCONF] Improve imports and fix x64 build warnings
wlanconf\wlanconf.c(592):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
wlanconf\wlanconf.c(602),(683):
  warning C4267: '=': conversion from 'size_t' to 'ULONG', possible loss of data
2026-03-30 21:46:10 +02:00
Hermès Bélusca-Maïto
3913b3cf35 [TRACERT] Improve imports, simplify code, and fix x64 build warning
tracert\tracert.cpp(209):
  warning C4267: 'argument': conversion from 'size_t' to 'socklen_t', possible loss of data
2026-03-30 21:46:09 +02:00
Hermès Bélusca-Maïto
012e9be792 [NETSH] Improve imports, simplify code, and fix x64 build warnings
netsh\helper.c(84):
  warningC4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
netsh\netsh.c(65):
  warning C4267: '+=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 21:46:07 +02:00
Hermès Bélusca-Maïto
0038ad5423 [NET] Improve imports, simplify code, and fix x64 build warnings
net\cmdLocalGroup.c(125):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
net\cmdShare.c(115),(128),(142):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
net\cmdUse.c(89),(178),(194):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
net\cmdUser.c(597),(631),(676):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 21:46:06 +02:00
Hermès Bélusca-Maïto
c2ecf0649d [IPCONFIG] Improve imports, LP* -> P*, and fix x64 build warnings
ipconfig\ipconfig.c(236):
  warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
ipconfig\ipconfig.c(263),(306),(380):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
ipconfig\ipconfig.c(303):
  warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
ipconfig\ipconfig.c(1318): warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 21:46:05 +02:00
Hermès Bélusca-Maïto
12d0b84141 [DWNL] Improve imports, use _countof(), and fix x64 build warnings
dwnl\dwnl.c(387):
  warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
dwnl\dwnl.c(401):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 21:46:04 +02:00
Hermès Bélusca-Maïto
c336730f5d [WHOAMI] Improve imports, simplify code, and fix x64 build warnings
whoami\whoami.c(134):
  warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
whoami\whoami.c(241),(256):
  warning C4267: 'initializing': conversion from 'size_t' to 'UINT', possible loss of data
2026-03-30 21:45:49 +02:00
Hermès Bélusca-Maïto
544e8cc292 [WHOAMI] Fix heap corruption causing crashes when displaying user names/groups tables
CORE-20537

- `WhoamiSetTable()`: Specify the correct size for allocating a buffer
  for a NUL-terminated UTF16 string (previously, only half the space for
  the NUL terminator was considered).
  This caused a heap corruption when the corresponding NUL-terminate
  string was then copied into this buffer, and potentially leading to
  reading past the end of the string (since no real NUL terminator
  would be found).

- `WhoamiPrintTable()`: Just make it do what it needs to do: print the
  table and nothing more: no "side-effect" behaviour like table freeing.

- Instead, add a `WhoamiFreeTable()` routine whose purpose is just to
  free the table. And the tables are freed in the routines where they
  have been previously allocated.

- `WhoamiPrintTable()`:
  * Allocate a column-lengths table *ONLY* when needed, i.e. when
    printing the table in "table" format. When printing it in "list"
    format, there is no need to allocate anything and we can instead
    use only a single variable.

  * The old code handling "those pesky ':'" -- used when tables are
    displayed in list format, using: `whoami /all /fo list` -- was buggy,
    because it was patching the table header names, writing a ':' and a
    NUL-terminator past the end of the allocated string buffer (see bug
    described above in `WhoamiSetTable()`). As a result, once the table
    was freed, a heap corruption would happen, leading to a crash.
    Now, displaying the ':' is handled as part of the wprintf()-formatting
    table item string.

  * For developers, two ways of displaying these ':' are proposed:
    the way Windows displays the table in "list" format, where the ':'
    directly follow the item names in the 1st column; and a "nicer" one
    (to my taste!), where all the ':' are vertically aligned -- currently
    disabled.
2026-03-30 21:12:56 +02:00
Hermès Bélusca-Maïto
ddca2afaea [TASKLIST] Improve imports, simplify code 2026-03-30 16:18:48 +02:00
Hermès Bélusca-Maïto
4750869ccb [REPLACE] Improve imports and code style 2026-03-30 16:18:45 +02:00
Hermès Bélusca-Maïto
1043e35139 [LABEL] Improve imports and fix x64 build warning
label\label.c(168):
  warning C4267: '+=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:18:45 +02:00
Hermès Bélusca-Maïto
85841c2ba2 [FIND] Improve imports and fix x64 build warnings
find\find.c(64),(65):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:18:40 +02:00
Hermès Bélusca-Maïto
f19cb6af8b [EVENTCREATE] Improve imports, LP* -> P*, and fix x64 build warning
eventcreate\eventcreate.c(248):
  warning C4267: 'function': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 16:18:39 +02:00
Hermès Bélusca-Maïto
6079fab420 [COMP] Improve imports and fix x64 build warning
comp\comp.c(44):
  warning C4267: 'return': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:18:38 +02:00
Hermès Bélusca-Maïto
f00588552f [CERTUTIL] Improve imports and fix x64 build warning
certutil\asn.cpp(224):
  warning C4267: 'initializing': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 16:18:32 +02:00
Hermès Bélusca-Maïto
6affaf1975 [ATTRIB] Improve imports and fix x64 build warnings
attrib\attrib.c(220),(305):
  warning C4267: 'function': conversion from 'size_t' to '_off_t', possible loss of data
2026-03-30 16:18:23 +02:00
Hermès Bélusca-Maïto
7b3b63feef [AT] Improve imports, simplify code, and fix x64 build warnings
at\at.c(281),(482),(488),(509),(515),(610),(616),(637),(643):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-30 16:10:27 +02:00
Hermès Bélusca-Maïto
d3a6aed771 [FORMAT] Improve imports, simplify code 2026-03-30 16:08:36 +02:00
Hermès Bélusca-Maïto
7a82bc8deb [CACLS] Improve imports, simplify code, and fix x64 build warning
cacls\cacls.c(198):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
2026-03-30 16:04:05 +02:00
Hermès Bélusca-Maïto
7331a0186d [SYSTEMINFO] Improve imports, includes, LP* -> P*, etc.
`LoadStringW(NULL, ...)` == `LoadStringW(GetModuleHandle(NULL), ...)`
for all purposes.
2026-03-30 16:02:59 +02:00
Hermès Bélusca-Maïto
cab720aa2c [CMDUTILS][NETWORK][LOGOFF][RUNAS][CMD][SYSTEM] Improve imports and headers for some tools 2026-03-30 13:55:07 +02:00
Hermès Bélusca-Maïto
e4aaf68c2d [KERNEL32][KERNEL32_APITEST] Remove trailing whitespaces
Addendum to commit 5e998de248.
2026-03-30 13:54:37 +02:00
Julen Urizar Compains
5e998de248 [KERNEL32][KERNEL32_APITEST] Fix the pipe buffer overflow situation into Iosb.Status in the ReadFile (#6724)
Change the way ReadFile and NTReadFile behaves under ReactOS, and fit more what Wine does. Fixes Calibre conversion failure. JIRA issue: CORE-17376
2026-03-30 12:01:28 +02:00
Justin Miller
ddef59e124 [ROSTESTS] Resolve some WHS issues after the last few PRs (#8809)
* [WINETESTS:UIAUTOMATIONCORE] Add wineheaders to dependencies
* [ROSTESTS] Don't use kernel32_vista - Just gate UIAutomationCore tests
2026-03-30 07:14:05 +00:00
Katayama Hirofumi MZ
863203030f [IMM32][SDK] Rename CLIENTIMC_UNKNOWN2 as CLIENTIMC_LOCKED (#8807)
Improve code readability.
JIRA issue: CORE-19268
- Rename CLIENTIMC_UNKNOWN2
  flag as CLIENTIMC_LOCKED.
- Delete unused
  CLIENTIMC_UNKNOWN4 flag.
- Fix the return value of
  Imm32AssignNewLayout function.
2026-03-30 04:39:26 +09:00
Alex Mendoza
2c57d695da [NETSHELL] Fix buffer size parameter (#8802)
Change szFormat to szBuffer in StrFormatByteSizeW calls.
Using szFormat is incorrect and could cause buffer overflow if buffer sizes differ.
2026-03-29 21:35:48 +02:00
Hermès Bélusca-Maïto
dfaac47afc [KERNEL32_VISTA] Reimplement [Get|Set]ThreadDescription() (#8484)
- `GetThreadDescription()`: since there may be concurrent `SetThreadDescription()`
  invocations being executed, we need to loop over the buffer allocation size until
  we can successfully capture the thread name.
  Also, we can directly re-use the temporary buffer, after resizing, for
  the output description buffer.

- `SetThreadDescription()`: Use `RtlInitUnicodeStringEx()` instead of reimplementing
  its internal logic.
2026-03-29 19:35:41 +02:00
Hermès Bélusca-Maïto
a4621bb280 [NTOS:PS][NTDLL_APITESTS] Implement ThreadNameInformation for NtQuery/SetInformationThread() (#8484)
The `ThreadNameInformation` (#38) class is the Windows 10.1607+ way
of assigning a human-readable name (i.e. description) to a given
thread object, that is visible to debuggers and diagnostic tools
(e.g. WinDbg `!thread` command, Process Explorer ...), which is
useful for debugging scenarios.[^1]

Before this, the only way to assign a name to a thread for debugging
purposes was to raise a specific exception, that had to be caught and
interpreted by a supported debugger.[^2][^3]

When the thread object is being deleted (`kill.c!PspDeleteThread()`),
free the thread name if set (courtesy of Ahmed Arif, PR #8796).

References:
[^1]: https://learn.microsoft.com/en-us/visualstudio/debugger/tips-for-debugging-threads
[^2]: https://learn.microsoft.com/en-us/archive/blogs/stevejs/naming-threads-in-win32-and-net
[^3]: https://ofekshilon.com/2009/04/10/naming-threads/
2026-03-29 19:35:34 +02:00
Hermès Bélusca-Maïto
401f3a8a79 [NTDLL_APITEST] Add a test for Nt[Query|Set]InformationThread(ThreadNameInformation) (#8484)
Thanks to 'artDev', 'HP-12C', and 'julenuri' Discord contributors for their help!
2026-03-29 16:52:31 +02:00
Hermès Bélusca-Maïto
2e1a0b73c9 [NTDLL_APITEST][NTOS:PS] Adjust probelib.c test code to skip non-implemented Win7+ thread information classes
Re-enable in ps_i.h the stubbed probing info values for thread information
classes, that were disabled in commit 60aad33ed0 (PR #8487), and adjust
the test code in probelib.c so that the failures for these non-implemented
classes are correctly taken into account.
2026-03-29 16:52:07 +02:00
Hermès Bélusca-Maïto
a2a434e8d5 [NTDLL_APITEST] Minor formatting for probelib.c 2026-03-29 16:52:06 +02:00
Mikhail Tyukin
3dc66309d1 [BLUETOOTHAPIS][BTHPROPS][WINUSB] Import from wine-10.0 (#8801)
* [WINUSB] Import wine-10.0
* [BLUETOOTHAPIS][BTHPROPS] Import wine-10.0

Import wine bluetooth and usb stubs. Needed for modern applications. These dlls were added in XP sp2.
2026-03-29 02:49:33 +00:00
Justin Miller
752f99ee3d [ANSI-SYNC-HACKS][NFSD] Small library to sync ANSI code (#8800)
The point of kernel32_vista was to provide a dll that can be used for winesyncs to still have NT6 APIs.
We're now switching to an architecture where we'll have kernelbase OR a kernel32_win7 depending on NT target compile
but this means that for an ANSI exe such as this, we need an alternative solution.
Thankfully it's pretty much only for this but just in case i made it a library.
2026-03-29 02:48:46 +00:00
Katayama Hirofumi MZ
75e1d78fe9 [IMM32][SDK] imemenu.c: Rewrite IME Menu feature (#8769)
There were some design difference
comparing to Windows. Improve
IME Menu compatibility.
JIRA issue: CORE-20142
- Re-implement IME Menu.
- Modify
  ImmPutImeMenuItemsIntoMappedFile
  prototype.
2026-03-29 11:33:23 +09:00
Hermès Bélusca-Maïto
dddb6d5da8 [NTOS:PS] query.c: Code style: Add switch-case brackets; move variable declarations where they belong.
In preparation for PR #8484.
2026-03-28 21:38:22 +01:00
Mikhail Tyukin
22ca1e736a [KERNEL32_VISTA][NTDLL_VISTA] add required functions for winhttp 2026-03-28 11:35:17 -07:00
winesync
ac322153b6 [WINHTTP] Winesync to Wine-10.0 2026-03-28 11:35:17 -07:00
Ahmed Arif
5817ab8f4f [NTDLL_WINETEST] Fix InterlockedIncrement incompatible pointer type in exception test (#8781)
Fix int to LONG type mismatch for InterlockedIncrement in test_restore_context, fixing GCC 15 -Wincompatible-pointer-types error
2026-03-28 17:29:50 +01:00
Mikhail Tyukin
3908cbf5b4 [UIAUTOMATIONCORE] Import from Wine-10.0 (#8708)
* [UIAUTOMATIONCORE] import from wine-10.0
* [DXDIAG] fix build after sync

Used in many NT6+ applications like web browsers. This dll "enables assistive technology products, such as screen readers, to provide information about the UI to end users and to manipulate the UI by means other than standard input. UI Automation also allows automated test scripts to interact with the UI" according to msdn.
2026-03-28 14:17:27 +00:00
Katayama Hirofumi MZ
2c80eeec5e [ZIPFLDR] CZipCreator: Use file mapping (#8754)
I dislike slow system. Support large files.
JIRA issue: CORE-20466
2026-03-28 22:45:43 +09:00
Ahmed Arif
4bbc798067 [CTF][SHDOCVW] fix gcc 15 -Werror=overloaded-virtual and uninitialized member (#8785)
Fix overloaded-virtual hiding errors and uninitialized m_dwFlags in ctf and shdocvw for GCC 15
2026-03-28 14:30:53 +01:00
Ahmed Arif
6730ec5508 [SHELL32] Fix CD-ROM eject not refreshing drive text labels in folder view (#8789)
Fix CD-ROM eject in Explorer's "My Computer" not updating the drive text label (e.g., "ReactOS LiveCD (D:)" staying after eject). LV_RefreshIcon() only invalidated the cached icon (I_IMAGECALLBACK) but not the cached text, so the ListView never re-queried the display name.

Add text invalidation (LPSTR_TEXTCALLBACK) to force label refresh on media change events.
2026-03-28 14:24:27 +01:00
Hermès Bélusca-Maïto
a20a359f07 [HOSTNAME] Update translated messages; use ConUtils for output
In particular:

- `IDS_NOSET`: When the user tries `hostname -s ...`, tell them that for
  changing the computer host's name, one has to go in the "Computer Name"
  tab in the "System" control panel applet.

  NOTE: You may observe that Windows' hostname says instead,
  "Use the Network Control Panel Applet to set hostname."
  This piece of information is wrong since Windows 2000. Indeed:

  * From NT 3.1 to NT 4, one had to change the host's name via the
    "Network" control panel applet; the message was accurate back then.
  * Since Windows 2000, one changes the computer's host name via the
    "Network Identification" (Win2000) / "Computer Name" (WinXP and above)
    tab of the "System" properties Control Panel applet.
  * In addition, the ony "Network" feature in the Control Panel is the
    "Network Connections" special folder and doesn't deal with the host name.

- Use the ConUtils library for uniform output (on console or redirected)
  of localized string resources/messages. Supersedes PR #8739.

- Improve output of last-errors by showing their description, only
  falling back to showing the error number if no description exists.
2026-03-28 14:11:59 +01:00
Hermès Bélusca-Maïto
10a51ce478 [MORE] Improve imports, adjust code 2026-03-28 14:11:24 +01:00
Hermès Bélusca-Maïto
2d07d8a7cd [CONUTILS] Improve library build interface; avoid using winuser.h; fix x64 build warnings
conutils\pager.c(658):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
conutils\outstream.c(179),(263):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
conutils\outstream.c(433):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-28 14:11:23 +01:00
Mikhail Tyukin
7a9265ac30 [NETUTILS] import wine-10.0 (#8799)
Import netutils dll from wine-10.0. This dll was added in Windows 2000. There are no winetests for this dll.
2026-03-28 12:37:02 +00:00
Alex Mendoza
d5697b231c [IMM32] Ensure minimum size in Imm32CreateInputContext (#8791)
Ensure minimum size of hPrivate
in Imm32CreateInputContext, just
like Imm32SelectInputContext does
2026-03-28 19:41:40 +09:00
Eric Kohl
065c3a8b58 [NETCFGX] Improve the tcpip notification object
- Make the INetCfgComponentControl interface the 'base' interface because it is the only required interface for notification objects and it manages the configuration data.

- Add the INetCfgComponentSetup interface. It will be used for installing and uninstalling network components.

- Clean-up configuration data to prevent memory leaks.
2026-03-28 11:24:45 +01:00