Commit Graph

292 Commits

Author SHA1 Message Date
Václav Zouzalík
e46a837fb7 [HOSTNAME] Update Czech (cs-CZ) and Slovak (sk-SK) translation (#8817) 2026-03-31 22:43:59 +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
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
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
Václav Zouzalík
9a652291cb [HOSTNAME] Add Slovak (sk-SK) translation (#8740) 2026-03-16 18:49:58 +01:00
Václav Zouzalík
17e2bdb6ab [CLIP] Add Czech (cs-CZ) and Slovak (sk-SK) translations (#8410) 2026-02-13 22:31:15 +01:00
Doug Lyons
2f5a67fa2a [REG] Fix importing ASCII *.reg file creating a Unicode registry entry (#6450)
* When source REG file is ASCII encoded, detect presence of UNICODE value and force
   'parser->is_unicode' to TRUE when dealing with Unicode imports.
2026-01-11 13:08:46 -06:00
Timo Kreuzer
629e844eca [HOSTNAME] Use wprintf instead of _cwprintf
_cwprintf always prints to the console and the output is not forwarded like stdout. Fixes "hostname > hostname.txt" and ws2_32:gethostname test.
2025-12-12 12:21:53 +02:00
Karol Gocłowski
a1a440b96d [WHERE] Add Polish (pl-PL) translation (#8397) 2025-10-06 00:59:27 +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
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
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
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
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
Nguyen Trung Khanh
97e7efc020 [TASKKILL] Implement /t (tree) parameter (#2403)
CORE-15998
2025-03-26 17:04:49 +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
Mark Jansen
05d71fa69b [CERTUTIL] Add -asn verb 2025-03-24 18:00:06 +01:00
Katayama Hirofumi MZ
fe11f7a2e5 [REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Hermès Bélusca-Maïto
cc3672cb73 [RESOURCES] Remove redundant #pragma code_page(), includes, etc.
They are redundant when these are already present in the given module's
root resource file, from which the language-specific resource files are
being included.
2024-12-22 18:39:26 +01:00
Serge Gautherie
2d655a487e [MORE] PagePrompt(): Optimize check to load string resources (#7476)
It is useless to check each string individually and to try to load them again.
Use a common flag instead.

Follow-up to 2dbbfe8 (0.4.15-dev-2691).
2024-10-22 20:44:27 +02:00
Timo Kreuzer
b707be90a1 [REACTOS] Use standard conforming names
- Use _alloca instead of non-standard alloca
- Use _TCHAR instead of non-standard TCHAR
- Use _off_t instead of deprecated off_t
- Use _O_BINARY instead of O_BINARY
2024-10-20 14:12:25 +03:00
Timo Kreuzer
1de09c477c [3RDPARTY] Link to oldnames for stricmp/wcsicmp 2024-10-20 14:12:25 +03:00
Timo Kreuzer
e4930be4ff [REACTOS] Use the ISO C and C++ conformant names: _wcsicmp, _stricmp
Stop using non-conforming wcsicmp, stricmp, strcasecmp
2024-10-20 14:12:25 +03:00
Stanislav Motylkov
50fc63ea71 [REPLACE] Update Japanese (ja-JP) translation
Add missing author. Addendum to 078f7ceaac. CORE-9444 CORE-18706
2024-07-09 18:24:16 +03:00
Katayama Hirofumi MZ
050b3ad2ca [REPLACE] Delete unused STRING_REPLACE_HELP6
JIRA issue: CORE-9444
2024-07-09 20:29:44 +09:00
Katayama Hirofumi MZ
078f7ceaac [REPLACE] Improve Japanese (ja-JP) translation
JIRA issue: CORE-18706
2024-07-09 20:22:01 +09:00
Katayama Hirofumi MZ
1ffce3eb6d [CMD][CMDUTILS][REPLACE] Make 'replace' command external (#7097)
JIRA issue: CORE-9444
- Delete 'replace' internal command.
- Add 'replace' external command into
  base/applications/cmdutils/replace
  folder.
- Add control break handler.
2024-07-09 04:30:43 +09:00
Whindmar Saksit
108db8f007 [CSCRIPT][WSCRIPT][BOOTDATA] Basic .wsf support (#6140)
Support for .wsf files with a single script block
2024-05-19 13:57:47 +02:00
Andrei Miloiu
61abe81c2e [FC] Update Romanian translation (#6491) 2024-02-12 17:56:09 +01:00
Andrei Miloiu
85ad46099c [TREE] Update Romanian (ro-RO) translation (#6358) 2024-01-21 22:25:20 +01:00
Andrei Miloiu
46edca2036 [MORE] Update Romanian (ro-RO) translation (#6377) 2024-01-21 22:10:54 +01:00
Andrei Miloiu
559933d6de [LABEL] Update Romanian (ro-RO) translation (#6392) 2024-01-21 21:32:41 +01:00
Andrei Miloiu
8080492b39 [MORE] Update Romanian (ro-RO) translation (#6259) 2024-01-15 21:53:42 +01:00
Andrei Miloiu
7aa48a3824 [TASKKILL] Update Romanian (ro-RO) translation (#6282) 2024-01-09 11:07:31 +01:00
Andrei Miloiu
55bc06fa7a [LABEL] Update Romanian (ro-RO) translation (#6258) 2024-01-06 23:01:23 +01:00