Marcin Jabłoński [Sat, 27 Apr 2024 00:28:46 +0000 (02:28 +0200)]
[SHELL32] Fix Control_RunDLLW (#5400)
This commit makes Control_RunDLLW pass all but one tests from rostests (the one test that fails is the first one, but it only fails if the path to the test program contains a space).
- Rework string parsing in the Control_DoLaunch routine
- Do not send the CPL_STARTWPARMSW message, if no extra parameters were specified (fixes the failing Got NULL lParam2! and some CPL_STARTWPARMSW: expected -1 got %d tests)
- Do not resolve invalid dialog names to index zero, unless the name is empty (fixes some of the failing CPL_DBLCLK: expected -1 got %d tests)
- Handle quotes in the second part of wszCmd
CORE-8981
Timo Kreuzer [Thu, 25 Apr 2024 06:41:46 +0000 (09:41 +0300)]
[CRT] Remove useless #undef abort from process.h
Timo Kreuzer [Fri, 8 Mar 2024 17:03:23 +0000 (19:03 +0200)]
[CRT] Add _Exit to process.h
This is already done this way in our stdlib.h. It is needed by GCC 13 C++ headers. The problem happens like this:
- telnet/precomp.h includes fstream from GCC
- fstream includes pthread.h from GCC
- pthread.h includes process.h from ReactOS
- process.h defines _CRT_TERMINATE_DEFINED, but doesn't declare _Exit
- fstream includes cstdlib from GCC
- cstdlib includes stdlib.h from GCC (#include_next)
- stdlib.h doesn't declare _Exit, because _CRT_TERMINATE_DEFINED is defined
- cstdlib uses _Exit
Thamatip Chitpong [Mon, 22 Apr 2024 14:04:23 +0000 (21:04 +0700)]
[TASKMGR] Process page: Allow using "Open File Location" functionality without running Explorer shell
If Explorer shell is not available, use ReactOS's alternative file browser instead.
Thamatip Chitpong [Mon, 22 Apr 2024 13:48:42 +0000 (20:48 +0700)]
[TASKMGR] Process page: Improve readability of command line string formatting code
Thamatip Chitpong [Fri, 26 Apr 2024 00:12:02 +0000 (07:12 +0700)]
[NTUSER] Release modifier keys when deactivating message queue (#6754)
CORE-14768
Katayama Hirofumi MZ [Thu, 25 Apr 2024 23:39:45 +0000 (08:39 +0900)]
[KERNEL32_APITEST] Add LCMapString testcase (#6805)
@tkreuzer said he wants LCMapString testcase in chat.
JIRA issue: N/A
Doug Lyons [Thu, 25 Apr 2024 22:20:28 +0000 (17:20 -0500)]
[SHELL32] Fix Desktop folder details view (#5743)
* [SHELL32] Fix Desktop Folder Details View
JIRA issue: [CORE-19177|https://jira.reactos.org/browse/CORE-19177]
* Remove Comments column from Desktop Folder Details View and simplify code.
* Revise date/time sort based on reviewer comments.
* Swap size and type column positions for desktop folder details view.
With help from Whindmar, most (hopefully all) of the magic number for the columns
have been removed in all of the shell folders.
Co-authored-by: Whindmar Saksit <whindsaks@proton.me>
Co-authored-by: Carl J. Bialorucki <cbialo2@outlook.com>
Timo Kreuzer [Fri, 19 Apr 2024 17:53:51 +0000 (20:53 +0300)]
[CRT] Massively improve performance of rand_s
Cache the pointer to RtlGenRandom instead of loading and unloading advapi32 every single time this function is called.
Timo Kreuzer [Fri, 19 Apr 2024 17:27:51 +0000 (20:27 +0300)]
[CRT_APITEST] Add test for rand_s
Timo Kreuzer [Mon, 15 Apr 2024 17:44:14 +0000 (20:44 +0300)]
[CRT] Move rand_s into it's own file
Timo Kreuzer [Sun, 14 Apr 2024 17:00:40 +0000 (20:00 +0300)]
[CRT] Move _invalid_parameter into its own file
As the author of the code, I changed to license to MIT.
Timo Kreuzer [Thu, 11 Apr 2024 16:49:42 +0000 (19:49 +0300)]
[CRT] Move rand to stdlib, where it belongs
Katayama Hirofumi MZ [Thu, 25 Apr 2024 00:01:21 +0000 (09:01 +0900)]
Revert "[SHELL32] SHChangeNotify: Use tree for CDirectoryList (#6784)" (#6800)
Reverts #6784 that was a guilty commit of CORE-19531 that causing performance regression.
JIRA issue: CORE-19531
Katayama Hirofumi MZ [Wed, 24 Apr 2024 10:44:30 +0000 (19:44 +0900)]
[SHELL32] SHChangeNotify: Use tree for CDirectoryList (#6784)
Optimize for speed and memory.
JIRA issue: CORE-13950
CDirectoryList class exists just for remembering which file item is a directory or
not, in order to notify the filesystem item changes. This information can
become a tree data structure.
- Add CFSPathIterator and CFSNode helper classes.
- CFSNode is a class for tree nodes.
- Re-implement CDirectoryList class by using tree nodes.
- Delete CDirectoryItem class.
Katayama Hirofumi MZ [Wed, 24 Apr 2024 10:06:48 +0000 (19:06 +0900)]
[SHELL32_APITEST] Delete obsolete "iexplore.exe" tests
Follow-up to
75cc5b2. CORE-13950
Katayama Hirofumi MZ [Wed, 24 Apr 2024 10:03:10 +0000 (19:03 +0900)]
[SHELL32_APITEST] Commonize FindSubProgram function
and delete obsolete "iexplore.exe" tests. CORE-13950
Katayama Hirofumi MZ [Wed, 24 Apr 2024 09:25:15 +0000 (18:25 +0900)]
[SHELL32_APITEST] SHChangeNotify: Improve coverity (#6798)
Improve coverity and speed.
JIRA issue: CORE-13950
- Move NUM_STAGE to the header file.
- Add stages.
- Add DIRTYPE_DESKTOP_DIR and
DIRTYPE_PRINTERS directory types.
- Improve speed more.
Oleg Dubinskiy [Wed, 24 Apr 2024 09:08:40 +0000 (11:08 +0200)]
[MMEBUDDY] Implement support for looped wave playback (#6761)
Fix playing wave header multiple times in case the caller requests to do it.
In Windows, it is supported by WHDR_BEGINLOOP and WHDR_ENDLOOP flags (specified together) and dwLoops member of WAVEHDR structure (ususally set to 0xFFFFFFFF (INFINITE constant)).
- Check whenther WHDR_BEGINLOOP | WHDR_ENDLOOP flags are set by the caller.
- If they are, get the amount of times to play the header from WAVEHDR.dwLoops.
- Perform wave header competion only when the loop count is equal to zero. Otherwise, don't do it.
- When the header is entirely committed, in case completion is not needed, reset committed bytes count to the starting value to allow the header play again.
- Decrement loop count in case it isn't set to INFINITE, to mark loop as played correctly. When this count becomes zero, then the playback is finished.
- Get rid from SOUND_OVERLAPPED.PerformCompletion member. Use SOUND_DEVICE_INSTANCE.LoopsRemaining == 0 condition instead.
- Do this only for WaveOut devices, since MSDN states it works only with output buffers. Hence, there is nothing changed for WaveIn.
- Update an appropriate statement about unimplemented functionality from mmebuddy notes.
TODO: handle the case when multiple headers are requested to be looped (WHDR_BEGINLOOP and WHDR_ENDLOOP are set separatedly: 1st flag - in the 1st header, and 2nd in the last header). Currently, only looping a single wave header is supported.
This fixes the playback in the apps those request looped wave playback of some audio data (e. g., BRD Demo app, which did play its sound only first 500 ms before, now it plays endlessly until closing it manually).
CORE-10118
Katayama Hirofumi MZ [Wed, 24 Apr 2024 01:22:42 +0000 (10:22 +0900)]
[SHELL32_APITEST] Follow-up to #6796 (
25e2f5f)
This change will massively improve speed.
JIRA issue: CORE-13950
- Set zero to INTERVAL.
- Remove SHCNF_FLUSHNOWAIT.
Katayama Hirofumi MZ [Wed, 24 Apr 2024 00:10:29 +0000 (09:10 +0900)]
[SHELL32_APITEST] Make SHChangeNotify testcase more stable (#6796)
Make the testcase more stable and faster. Reduce code.
JIRA issue: CORE-13950
- Use WM_COPYDATA message to communicate with shell32_apitest_sub.exe.
- Use concept of "stage" and "step".
- Do multiple checks in one step.
- Flush notification by using (SHCNF_FLUSH | SHCNF_FLUSHNOWAIT) flags.
Timo Kreuzer [Mon, 1 Apr 2024 18:22:29 +0000 (21:22 +0300)]
[NTOS:KE/x64] Handle NMI vs swapgs race condition
Timo Kreuzer [Thu, 7 Dec 2023 19:27:44 +0000 (21:27 +0200)]
[NTOS:KE/x64] Implement Kd processor switching
Timo Kreuzer [Wed, 29 Nov 2023 18:01:31 +0000 (20:01 +0200)]
[NTOS:KE/x64] Implement processor freeze code
Timo Kreuzer [Wed, 6 Dec 2023 19:09:13 +0000 (21:09 +0200)]
[NTOS:KE/x64] Implement KiSaveProcessorState / KiRestoreProcessorState
Timo Kreuzer [Thu, 30 Nov 2023 18:02:31 +0000 (20:02 +0200)]
[NTOS:KE] Improve freeze code in KeBugCheckWithTf
- Don't wait 1 second for each processor
- Use AFFINITY_MASK
- Use Prcb->Number, which is more future proof than KeGetCurrentProcessorNumber
- Improve for loop
Timo Kreuzer [Wed, 6 Dec 2023 17:51:07 +0000 (19:51 +0200)]
[NTOS:KE/x64] Add KiNmiInterruptHandler
So far it only calls KiHandleNmi. It will also handle processor freeze later.
TODO: Pass TF_WITH_EF to directly generate a KEXCEPTION_FRAME
Katayama Hirofumi MZ [Mon, 22 Apr 2024 23:28:38 +0000 (08:28 +0900)]
[SHELL32] SHChangeNotify: Add drive, remove drive (#6782)
Implementing missing features...
JIRA issue: CORE-13950
- Add WM_DEVICECHANGE message handler in the shell window to detect
DBT_DEVICEARRIVAL and DBT_DEVICEREMOVECOMPLETE.
- Use GetLogicalDrives function to detect drives.
- Use SHChangeNotify to send SHCNE_DRIVEADD and
SHCNE_DRIVEREMOVED notifications.
- Modify CDefView::OnChangeNotify.
Timo Kreuzer [Sun, 14 Apr 2024 09:49:01 +0000 (12:49 +0300)]
[EVTLIB] Fix size of event log record
The size is 32bit, don't read a SIZE_T. Fixes crashes of advapi32_winetest eventlog on x64.
Timo Kreuzer [Wed, 8 Nov 2023 15:42:10 +0000 (17:42 +0200)]
[WIN32U_VISTA] Add win32u.dll for Vista
Serge Gautherie [Tue, 7 Nov 2023 18:56:16 +0000 (19:56 +0100)]
[NTUSER] UserSetCursorPos(): Use an early return
Addendum to
76290a6 (0.4.15-dev-7889).
Serge Gautherie [Sat, 20 Apr 2024 19:29:26 +0000 (21:29 +0200)]
[DOC] 3rd Party Files.txt: Update 3 unknown versions (#6771)
Katayama Hirofumi MZ [Sat, 20 Apr 2024 14:11:31 +0000 (23:11 +0900)]
[SHELL32] SHChangeNotify: SHCNF_DWORD and SHCNF_PRINTERA/W (#6777)
Implementing missing features...
JIRA issue: CORE-13950
- Add Shell_ParsePrinterName helper function.
- Implement SHCNF_DWORD, SHCNF_PRINTERA,
and SHCNF_PRINTERW types of SHChangeNotify
function.
Serge Gautherie [Tue, 7 Nov 2023 18:56:16 +0000 (19:56 +0100)]
[SHELL32] Remove 2 redundant initializations
Addendum to
6146fd0 (r54688) and
99b2e3d (r54979).
Whindmar Saksit [Fri, 19 Apr 2024 21:34:45 +0000 (23:34 +0200)]
[SHELL32] SHCreateDefaultContextMenu: Pass HWND to callback (#6764)
The caller's callback function is supposed to receive the window handle
passed to SHCreateDefaultContextMenu / CDefFolderMenu_Create2.
Whindmar Saksit [Fri, 19 Apr 2024 21:12:56 +0000 (23:12 +0200)]
[ZIPFLDR] Fix ShellExecute opening a .zip (#6714)
ShellExecute on a .zip file fails because the command in the registry
uses rundll32 that passes in an ANSI string, which is the default for
exported functions without a W suffix.
- This should also fix RAPPS not being able to open downloaded .zip files
- I made it use the full path to Explorer for good measure
Fixes regression introduced by 0.4.15-dev-6343-g
bf2cec186cc (#5411)
CORE-19506
Hermès Bélusca-Maïto [Fri, 5 Apr 2024 10:33:23 +0000 (12:33 +0200)]
[FREELDR] Merge boot-drive and partition functionalities together (#6760)
And deprecate corresponding boot types "Drive" and "Partition".
These are replaced by the more general "BootSector" boot type.
Finish the unification of the code, started in commit
ff85aa0c3,
that loads and boots disk MBR, partition VBR or boot sector in file.
A "WarnDeprecated()" helper is added to warn the user about the
deprecated features, and to inform them to adjust their FREELDR.INI
file in accordance.
In addition, bump FreeLoader version to 3.2 (at last!): a lot of
features have been added or deprecated since its last release.
Oleg Dubinskiy [Thu, 18 Apr 2024 21:19:35 +0000 (23:19 +0200)]
[MMIXER] Fix additional data size initialization for different audio formats (#6753)
Calculate size of the additinal data based on the format tag specified by the caller.
For PCM wave format, it should be zero, and for all others,
it should be taken from cbSize member of WAVEFORMATEX structure.
- Initialize data size for each format appropriately.
- Append it to the total pin connect allocation size, to allocate enough memory for it.
- Use it as additional data size for requested wave format.
- Append it to the total size of data format.
- Add SAL2 annotations for MMixerInitializeDataFormat function.
Fixes two crashes in winmm:capture and winmm:wave winetests, which have been introduced by
12b3272d9e6b2810985516ebad0ce545e5601d59.
So this is an addendum to that commit.
CORE-19514
Justin Miller [Thu, 18 Apr 2024 19:08:00 +0000 (12:08 -0700)]
[SDK] Don't just infinitely spam the DbgPrint in the bootloader (#6763)
Mark Harmstone [Mon, 9 Sep 2019 18:45:42 +0000 (19:45 +0100)]
[FREELDR] Allow Freeloader to boot Vista revamp of PR #1905 (#6479)
[FREELDR] Add "WindowsVista" boot type
[FREELDR] Set GDT correctly for Vista
[FREELDR] Map first page of memory, this is an observed behavior, and
also increases stability boot Checked windows 2003 SP2 ntoskrnl with
freeloader.
[SDK] Don't assert on big keys in bootloader
Co-authored-by: Justin Miller <justin.miller@reactos.org>
Stanislav Motylkov [Thu, 18 Apr 2024 15:22:17 +0000 (18:22 +0300)]
[ZIPFLDR] Make function prototype consistent
It is the only function in that file that used this format, all the others are one line.
Spotted by Whindmar Saksit.
Stanislav Motylkov [Thu, 18 Apr 2024 15:18:16 +0000 (18:18 +0300)]
[SHELL32] Update Russian (ru-RU) translation
Addendum to
9238a1762f6.
Carlo Bramini [Thu, 18 Apr 2024 09:39:46 +0000 (11:39 +0200)]
[CALC] Fix input bug when display is in error. (#5988)
CORE-19191
Reproduce the same behaviour of the calculator for Windows XP when an error condition is met.
When the result is NaN and it cannot be printed, the error condition is cleared by pressing the CLEAR button.
Justin Miller [Thu, 18 Apr 2024 04:47:49 +0000 (21:47 -0700)]
[WIN32SS] Introduce the NATIVE_REACTX define and disable some Dx calls (#6025)
The code itself isn't wrong but we're entirely missing the logic needed
to make it work. This leads to spontaneous crashes with video drivers and
various unity games.
Justin Miller [Thu, 18 Apr 2024 03:24:33 +0000 (20:24 -0700)]
[VFDLIB] GitHub actions workaround - Disable PDB generation for vfd.dll (#6762)
After a back and fourth investigation I've just decided to disable pdb generation for this ROSAPP for now.
We tried taking the code apart a bit and only building parts but alas it didnt yield any sucess.
disabling the AV also didn't help.
Joachim Henze [Wed, 17 Apr 2024 23:53:20 +0000 (01:53 +0200)]
[COMCTL32] Pt.rc: Place accelerator FIXMEs
Katayama Hirofumi MZ [Wed, 17 Apr 2024 21:09:58 +0000 (06:09 +0900)]
[REGEDIT] Correctly limit splitter's X coordinates (#6758)
JIRA issue: CORE-19516
- Add ClampSplitBarX helper function to delete
duplicated code.
- Use a signed value in WM_LBUTTONUP handling.
- Use ClampSplitBarX in ResizeWnd function,
WM_LBUTTONDOWN, WM_MOUSEMOVE, and
WM_LBUTTONUP handling.
Hermès Bélusca-Maïto [Tue, 16 Apr 2024 12:23:46 +0000 (14:23 +0200)]
[FREELDR] Reformat the boot editor strings in the code.
Hermès Bélusca-Maïto [Sat, 13 Apr 2024 09:54:06 +0000 (11:54 +0200)]
[FREELDR] linuxboot: It doesn't need the BIOS boot drive number and partition.
Also document a little bit the RootDevice field in the boot sector;
add SAL2 annotations.
Hermès Bélusca-Maïto [Wed, 10 Apr 2024 12:47:01 +0000 (14:47 +0200)]
[FREELDR:UI] Minor miscellaneous fixes.
- UiMessageBox(): Enlarge the default buffer used to printf msgbox strings.
- TuiUpdateDateTime(): When displaying the time, don't pad too much
with spaces on the left.
- TuiDrawShadow():
* Pre-calculate whether we need to show the right/bottom shadows,
and whether the right-shadow has a double width.
* Cap the right and bottom upper-bound coordinates before looping,
in order to avoid buffer overflows if the given coordinates go
beyond the screen.
- TuiDrawMsgBoxCommon(): Improve how the message box centering
calculations are done:
* When the "full-UI" is used (and center-menu is used), try to
center the message box in the space between the header and
the status bar.
* Ensure the top-left box corner is inside the screen, in case
the calculated message box borders go off-screen.
- TuiCalcMenuBoxSize():
* Uniformize the way the menu box coordinates are calculated.
* Reduce the space between menu box margins and the longest item.
* Ensure the top-left menu corner is inside the screen, in case
the calculated menu box borders go off-screen.
Hermès Bélusca-Maïto [Fri, 5 Apr 2024 15:44:43 +0000 (17:44 +0200)]
[FREELDR] Skip NULL-pointer entries in Argv when enumerating arguments.
A NULL pointer (not necessarily the terminating one) is a valid entry
in the Argv argument vector, according to the ARC specification
(Section 4.4 "Loaded-Program Conventions").
Thus, such pointer needs to be ignored when searching over the
argument vector.
Hermès Bélusca-Maïto [Tue, 16 Apr 2024 11:52:23 +0000 (13:52 +0200)]
[FREELDR] arcsupp.c: Relicense my code to MIT and use SAL2 annotations.
Hermès Bélusca-Maïto [Fri, 5 Apr 2024 15:05:13 +0000 (17:05 +0200)]
[FREELDR] BuildArgvForOsLoader: Add a terminating NULL pointer to the Argv vector.
Addendum to commits
d05be0da3 and
bd451f240.
This is required for POSIX compliance, which the ARC specification obeys.
See Section 2.1.2.2.1 (ANSI X3.159-1989) or 5.1.2.2.1 (ISO/IEC 9899:x)
"Program startup":
```
If they are declared, the parameters to the main function shall obey
the following constraints:
— The value of argc shall be nonnegative.
— argv[argc] shall be a null pointer.
[...]
```
See also https://pubs.opengroup.org/onlinepubs/
9699919799/functions/exec.html
Joachim Henze [Wed, 17 Apr 2024 14:53:09 +0000 (16:53 +0200)]
[COMDLG32] *.rc: Tweak spaces in IDS_INVALID_FILENAME (#6736)
This saves a few bytes in the binary, e.g.
comdlg32.dll master
0.4.15-dev-7887-g64a59a1 RosBEWin2.2.2 GCC8.4.0 dbg x86 shrinks
from 1.011.712 bytes to 1.009.664 bytes.
Furthermore it syncs the translations at this line, because pt-PT.rc already applied such a tweak.
Co-authored-by: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Timo Kreuzer [Fri, 8 Mar 2024 10:55:01 +0000 (12:55 +0200)]
[CRT] crtdefs.h: Wrap localeinfo_struct in ifdef
This prevents a redefinition error, when GCC 13 host headers are included when compiling c++ code.
Katayama Hirofumi MZ [Mon, 15 Apr 2024 00:41:01 +0000 (09:41 +0900)]
[BROWSEUI] SHExplorerParseCmdLine: Fix parsing of /root (#6752)
Remove excessive (!pInfo->pidlPath) check in SHExplorerParseCmdLine
function.
JIRA issue: CORE-16939
Carl J. Bialorucki [Sun, 14 Apr 2024 23:08:01 +0000 (17:08 -0600)]
Check if dwBandID is NULL before getting band object (#6738)
fixes CORE-18807 'Our explorer.exe ATL-asserts when executed on XPSP3'
which most likely got unhidden when we enabled the ATL-assertions in
0.4.15-dev-5023-g
55343f04b084931a20c396b76645f38cad94ea1b
Katayama Hirofumi MZ [Sun, 14 Apr 2024 18:25:20 +0000 (03:25 +0900)]
[SHELL32] Fix ParseDisplayName Part 4 (#6747)
Follow-up to #6746. Reduce SHParseDisplayName
failures.
JIRA issue: CORE-19495
- Re-implement CDrivesFolder::ParseDisplayName
method.
Katayama Hirofumi MZ [Sun, 14 Apr 2024 18:24:09 +0000 (03:24 +0900)]
[SHELL32] Fix ParseDisplayName Part 3 (#6746)
Follow-up to #6740. Reduce SHParseDisplayName
failures.
JIRA issue: CORE-19495
- Add CRegFolder::_IsInNameSpace helper method.
- Half-implement CRegFolder::ParseDisplayName
method.
- Parse class string by using GUIDFromStringW
function.
- Return CO_E_CLASSSTRING for invalid CLSID
string.
Timo Kreuzer [Mon, 25 Mar 2024 22:04:16 +0000 (00:04 +0200)]
[NTOS:KE/x64] Use movaps instead of movdqa
It does the same thing, but is one byte shorter.
Timo Kreuzer [Mon, 25 Mar 2024 22:00:52 +0000 (00:00 +0200)]
[NTOS:KE/x64] Clean up EnterTrap/ExitTrap
- Always save and restore all non-volatile registers, including xmm
- Remove the obsolete flags
Timo Kreuzer [Thu, 15 Dec 2022 19:55:16 +0000 (21:55 +0200)]
[NTOS:KE/x64] Fix handling of non-volatiles in trap vs exception frame
The registers that are saved/restored in the trap / exception frame need to be consistent between all entry/exit points as well as the functions that convert between trap/exception frame and context. The trap frame contains only the non-volatile registers and rbp, the rest is saved in the exception frame.
The previous code didn't save rbp in the syscall handler, which led to it being clobbered when exiting though KiServiceExit2 rather than returning back to the syscall exit path. Also KeContextToTrapFrame would use rbx, rsi and rdi from the trap frame, which wouldn't be saved there by the syscall handler.
Timo Kreuzer [Fri, 2 Mar 2018 06:48:34 +0000 (08:48 +0200)]
[RTL/x64] Implement RtlRaiseException in asm
This fixes invalid contexts being passed to RtlDispatchException. Also update the ExceptionAddress field in the EXCEPTION_FRAME, to match the Rip value in the CONTEXT, which is required for proper unwinding.
Joachim Henze [Sun, 14 Apr 2024 09:10:01 +0000 (11:10 +0200)]
[REGEDIT] Anonymize CONTROL "List1" (#6735)
This saves a few bytes in the binary, e.g.
regedit.exe master
0.4.15-dev-7887-g64a59a1 RosBEWin2.2.2 GCC8.4.0 dbg x86 shrinks
from 1.049.600 bytes to 1.049.080 bytes.
Furthermore it syncs the translations at this line, because es-ES.rc even translated that identifier to "Lista1" already.
Carl J. Bialorucki [Sat, 13 Apr 2024 22:12:35 +0000 (16:12 -0600)]
[SHELL32] Initialize MenuItemInfoW struct in AddStaticContextMenusToMenu (#6737)
This prevents an issue where clicking on most of the icons on the desktop
that isn't the file explorer causes explorer to throw an exception,
and also prevents another issue where most applications won't launch from the start menu;
at least on MSVC builds running on VirtualBox 5.2.44.
^- I am pretty sure, that this was not always the case. The guilty rev is yet unknown though.
Serge Gautherie [Sat, 13 Apr 2024 19:23:15 +0000 (21:23 +0200)]
[DOC] 3rd Party Files.txt: Complete 'win-iconv' (#6691)
Upstream (code) reads:
`win_iconv is placed in the public domain.`
Timo Kreuzer [Thu, 14 Mar 2024 19:06:30 +0000 (21:06 +0200)]
[NDK/x64] Remove #pragma pack(push,4) around KPRCB/KPCR
Timo Kreuzer [Sun, 22 Oct 2023 15:21:42 +0000 (18:21 +0300)]
[RTL/x64] Handle STATUS_UNWIND_CONSOLIDATE in RtlRestoreContext
It's not entirely correct yet and will probably fail on recursive c++ exceptions, but it fixes basic c++ exception handling.
Katayama Hirofumi MZ [Sat, 13 Apr 2024 12:08:39 +0000 (21:08 +0900)]
[SHELL32] Refactor and simplify CDesktopFolder (#6741)
Follow-up to #6721. This PR can reduce 1KB of
binary size.
JIRA issue: CORE-19495
- Delete CStubFolderBase and derived classes.
- Add
CDesktopFolder::_ParseDisplayNameByParent
method.
- Don't use excessive IShellFolder objects in
parsing display names.
- Simplify and reduce code.
Katayama Hirofumi MZ [Sat, 13 Apr 2024 12:07:12 +0000 (21:07 +0900)]
[SHELL32] Fix ParseDisplayName Part 2 (#6740)
Follow-up to #6721. Reduce
SHParseDisplayName failures.
JIRA issue: CORE-19495
- Re-implement CFSFolder::ParseDisplayName
method to validate the names.
- Add CFSFolder::_ParseSimple,
CFSFolder::_GetFindDataFromName, and
CFSFolder::_CreateIDListFromName helper
methods.
- Add PathIsDotOrDotDotW, PathIsValidElement,
PathIsDosDevice, and SHILAppend helper
functions.
- Delete GetNextElementW and add
Shell_NextElement function.
Ratin Gao [Mon, 18 Dec 2023 17:35:30 +0000 (01:35 +0800)]
[NTDLL][ADVAPI32][ADVAPI32_APITEST][CRYPTLIB] Add hash API exports for NT6+ and apitests with small fixes
- For NT6.0+, NTDLL exports those hash APIs that ADVAPI32 thunks forward to
- Fix undocumented context structure layout and content
- Add apitests to verify both of hash result and structure content
Timo Kreuzer [Sat, 9 Mar 2024 16:29:35 +0000 (18:29 +0200)]
[SHELLBTRFS] Prevent redeclaration of __cpuidex with newer mingw-w64 headers
Doug Lyons [Fri, 12 Apr 2024 20:58:52 +0000 (15:58 -0500)]
[NTUSER] Avoid sending superfluous WM_MOUSEMOVE messages (#6397)
Add a check so that mouse move messages are not generated unless
the mouse cursor X or Y position is changed.
This fixes extra mouse moves generated when clicking.
Patch by I_Kill_Bugs.
CORE-8394 CORE-18529 CORE-19422 CORE-19423
Katayama Hirofumi MZ [Fri, 12 Apr 2024 12:29:07 +0000 (21:29 +0900)]
[SHELL32][SHELL32_APITEST][SDK] Implement GUIDFromStringA (#6734)
Implementing missing features...
JIRA issue: CORE-19278
- Add GUIDFromString testcase.
- Implement GUIDFromStringA function.
- Add NULL check to GUIDFromStringW.
- Add GUIDFromStringA prototype to "undocshell.h".
Joachim Henze [Fri, 12 Apr 2024 04:31:24 +0000 (06:31 +0200)]
[REGEDIT] RC: it-IT: Strip spaces, hu-HU,pt-PT,tr-TR: add FIXMEs
The it-IT.rc thingy I spotted when I wanted to port back the regedit-changes from
0.4.15-dev-6592-g
995d2559623380857ce5f371c2401cd8a8ff2913
The line definitely got improved by that commit, but it was still inferior.
In the other 3 langs it is just some stuff where master head is inferior to older branches,
I spotted them while porting back other things.
So I placed the FIXMEs to protect myself from porting it back accidentally,
and to help the native speakers with seeing them on master head.
The tr-TR.rc: "D&izi Değeri" -> "D&ize Değeri" was done for consistency, because we do have
that item 3 times, and 2 of them were using "D&ize Değeri" already.
Joachim Henze [Thu, 11 Apr 2024 17:54:11 +0000 (19:54 +0200)]
[COMDLG32] cdlg_Sq.rc: Strip 2 includes (#6730)
They do look weird/wrong and no other rcs do have them.
Builds fine on all bots.
I do have no clue, why they were added here historically.
Oleg Dubinskiy [Thu, 11 Apr 2024 09:59:14 +0000 (11:59 +0200)]
[AUDIO] Implement support for WAVE_FORMAT_EXTENSIBLE audio format (#6686)
[MMIXER] Implement hadling WAVE_FORMAT_EXTENSIBLE audio format
Fix opening audio device error when trying to open it with WAVE_FORMAT_EXTENSIBLE format tag set in wFormatTag member of WAVEFORMATEX:
- Pass additional data size from WAVEFORMATEX.cbSize to pin data format.
- Append it to the whole size of pin data format (KSDATAFORMAT.FormatSize).
- Set additional fields in WAVEFORMATEXTENSIBLE structure (data format, BPS and channel mask) when WAVE_FORMAT_EXTENSIBLE is used. They are used by our inbuilt Intel AC97 miniport driver at least. It simply fails when these members are not set.
- Fix pin connect allocation size by appending an additional data size from WAVEFORMATEX.cbSize to KSPIN_CONNECT + KSDATAFORMAT + WAVEFORMATEX. This allows to proerly initialize additional extensible data and avoids kernel memory leakage when using extensible audio format.
- Remove format tag check which allowed WAVE_FORMAT_PCM to be opened correctly. So now all possible audio formats can be opened properly at least (although it does not mean they may work correctly).
This fixes the audio playback for all apps those are supporting extensible audio data and use it by default (e. g. AIMP 5.30, QMMP 0.12.17, all Chrome/Chromium-based browsers, GameDev Tycoon Demo game etc.).
CORE-10907, CORE-14783
* [KS] Allow passing additional extensible audio data when extensible audio format is used
- Append additional data size from WAVEFORMATEX.cbSize to pin connect size passed to KsCreatePin. If the tag is WAVE_FORMAT_PCM, then this member should always be zero. So in that case, no any additional data is passed to creation request, and the passed data size is correct for PCM too (KSDATAFORMAT + WAVEFORMATEX).
This fixes audio playback in several apps those are supporting extensibble audio and use it by default (e. g. AIMP 5.30, QMMP 0.12.17, all Chrome/Chromium based browsers, GameDev Tycoon Demo game etc.).
CORE-10907, CORE-14783.
* [WDMAUD.DRV] Pass the correct additional data size to I/O control request
Store a correct size of additional data in WAVEFORMATEX.cbSize when performing open of audio device, when WAVE_FORMAT_EXTENSIBLE audio format is used.
It allows to properly open audio device with Legacy APIs enabled too.
This fixes audio playback in several apps those are using extensible audio data (e. g. AIMP 5.30, QMMP 0.12.17, all Chrome/Chromium based browsers, GameDevTycoon Demo game etc.).
CORE-10907, CORE-14783
Joachim Henze [Wed, 10 Apr 2024 22:56:04 +0000 (00:56 +0200)]
[COMDLG32] *.rc Improve translations (#6729)
First an foremost this fixes "the copies-icon in the print-dlg not showing" for Taiwan as well.
That part is an addendum to 0.4.15-dev-3493-g
a36cc8054d266b75ad3bb53cf0a5ab8d72a412c9 (#2831)
Taiwan is untypically placed in cdlg_Zh.rc as well for comdlg, next to the traditional chinese version and therefore was forgotten.
Furthermore improve many translations a little bit, where strings could be stolen from neighbor controls. This part focuses mostly on the NEWFILEOPENV2ORD.
Then add many FIXMEs for existing accelerator collisions, many of them were introduced by adding the "Help"-button retrospectively, when other translations existed already. Let the native speakers handle them later.
Strip accelerators from some "Cancel" buttons, e.g. in cdlg_Pt.rc, and the "Save as" button, e.g. within cdlg_Es.rc as those should not exist, which most languages did properly respect already.
Also fix a few text truncations and a few accelerators, e.g. for de-DE: stc3 was cutoff, and "Öffnen" had the wrong accelerator.
Whindmar Saksit [Wed, 10 Apr 2024 21:29:26 +0000 (23:29 +0200)]
[SHELL32] Implement several ShellDispatch methods (#6145)
* Implement most of the methods
* Some suggested changes and better error handling (that I then mask like Windows)
Timo Kreuzer [Tue, 9 Apr 2024 19:18:07 +0000 (22:18 +0300)]
[NTOS:KE/x64] Improve KeGetTrapFrame
Timo Kreuzer [Sat, 9 Mar 2024 16:32:08 +0000 (18:32 +0200)]
[DEVMGR] Add DYNAMIC_FIELD_OFFSET macro
This replaces the usage of FIELD_OFFSET for dynamic indexing into array fields.
Sadly GCC has broken __builtin_offsetof and they don't seem to intend to fix it.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95942
Timo Kreuzer [Thu, 14 Mar 2024 18:07:38 +0000 (20:07 +0200)]
[KS] Fix a bug found by GCC 13
Timo Kreuzer [Tue, 12 Mar 2024 16:52:36 +0000 (18:52 +0200)]
[UDFS] Remove packing around include of ntifs.h
This is not just wrong, it is criminal.
Katayama Hirofumi MZ [Wed, 10 Apr 2024 00:32:13 +0000 (09:32 +0900)]
[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
JIRA issue: CORE-19495
- Implement SHParseDisplayName and
CDesktopFolder::ParseDisplayName.
- Add CStubFolderBase, CShellUrlStub, CFileUrlStub,
CIDListUrlStub, and CHttpUrlStub helper classes.
- Add SHGetSpecialFolderID and
Shell_ParseSpecialFolder helper functions.
- Add BindCtx_ContainsObject,
BindCtx_GetUIWindow,
BindCtx_RegisterObjectParam, SHBindToObject,
SHBindToObjectEx, SHCoInitializeAnyApartment,
SHGetAttributes, SHGetNameAndFlagsW,
SHIsFileSysBindCtx, SHSkipJunctionBinding,
Shell_DisplayNameOf, and Shell_FailForceReturn
helper functions.
- Modify CSIDL data.
Andrei Miloiu [Tue, 9 Apr 2024 10:41:54 +0000 (13:41 +0300)]
[SHELL32] Update Romanian (ro-RO) translation (#6657)
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
Maj Soklič [Tue, 9 Apr 2024 09:46:52 +0000 (11:46 +0200)]
[NOTEPAD] Fix english STRING_PRINTFAILED translation (#6722)
Katayama Hirofumi MZ [Mon, 8 Apr 2024 00:17:08 +0000 (09:17 +0900)]
[SHLWAPI][SHLWAPI_APITEST] Fix NULL behavior of StrDupA/W (#6720)
Fix wrong behavior of shlwapi!StrDupA and shlwapi!StrDupW functions.
JIRA issue: CORE-19495
Return NULL when lpszStr == NULL.
Andrei Miloiu [Sun, 7 Apr 2024 18:40:38 +0000 (21:40 +0300)]
[STOBJECT] Update Romanian (ro-RO) translation (#6695)
Andrei Miloiu [Sun, 7 Apr 2024 18:36:23 +0000 (21:36 +0300)]
[SHLWAPI] Update Romanian (ro-RO) translation (#6702)
Andrei Miloiu [Sun, 7 Apr 2024 18:34:38 +0000 (21:34 +0300)]
[UMANDLG] Update Romanian (ro-RO) translation (#6699)
Katayama Hirofumi MZ [Sun, 7 Apr 2024 11:34:50 +0000 (20:34 +0900)]
[SHELL32] Use Uppercase in SHELL32_GUIDToStringA/W (#6719)
Improve consistency.
JIRA issue: CORE-19495
Reduced 4 failures in shell32:SHParseDisplayName.
Timo Kreuzer [Tue, 2 Apr 2024 20:05:26 +0000 (23:05 +0300)]
[NTOS:KE/x64] Remove pointless loop in KiInitiateUserApc
Only one user APC can be delivered here. The next one can only be delivered, when KiUserApcDispatcher returns to the previous context with NtContinue.
Timo Kreuzer [Tue, 2 Apr 2024 19:55:54 +0000 (22:55 +0300)]
[NTOS:KE/x64] Fix user APC delivery on syscall exit
We need to save the missing registers in the trap frame before calling KiInitiateUserApc, because they will be used to create the CONTEXT that is saved on the user mode stack, where KiUserApcDispatcher returns back to using NtContinue. This fixes remaining failures in kernel32_apitest QueueUserAPC.
Timo Kreuzer [Tue, 2 Apr 2024 19:51:40 +0000 (22:51 +0300)]
[KERNEL32_APITEST] Add test for multiple queued user APCs
Timo Kreuzer [Tue, 2 Apr 2024 19:08:30 +0000 (22:08 +0300)]
[KERNEL32_APITEST] Use InterlockedIncrement for proper synchronization
Timo Kreuzer [Tue, 2 Apr 2024 18:49:52 +0000 (21:49 +0300)]
[NTOS:KE] Fix calculation of timer expiration
Both due-times and interrupt time are unsigned, but were treated as signed in KiInsertTimerTable, which led to very long (e.g. INFINITE) waits being interpreted as having a negative due-time and being completed instantly.
Mostly fixes kernel32_apitest QueueUserAPC
Timo Kreuzer [Mon, 25 Mar 2024 18:57:41 +0000 (20:57 +0200)]
[NTOS:KE/x64] Implement KiUserCallbackExit
This is used in KiUserModeCallout instead of KiServiceExit2. The latter is broken, leaks non-volatile registers and will need to be modified to handle an exception frame, which we don't need/have here. It will also use sysret instead of iret and is generally simpler/faster.
Eventually it would be desirable to skip the entire trap frame setup and do everything in KiCallUserMode. This requires some cleanup and special handling for user APC delivery.
Whindmar Saksit [Sat, 6 Apr 2024 21:01:32 +0000 (23:01 +0200)]
[SHELL32] Copy as path shell extension (#6701)
* Added Copy as path menu extension
---------
Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
Oleg Dubinskiy [Sat, 6 Apr 2024 15:46:11 +0000 (17:46 +0200)]
[MSVCRT20][MSVCRT40] Fix heap initialization (#6713) CORE-19505
Fixes CORE-19505 'game "Hover!" from rapps does not start anymore'
It failed showing a msgbox
"There was an error allocating memory in Hover!"
the regression was introduced by
0.4.15-dev-5602-g
c47506a5f4675b4c2248e9874ed32072d787a8bb
Add missing heap initialization in DllMain entrypoints of msvcrt20.dll and msvcrt40.dll,
similarly to as it is done in msvcrt.dll (CRT).
The msvcrt.dll (CRT) initialization code was updated properly
during the last winesync, accordingly to the new changes,
but msvcrt20.dll/msvcrt40.dll one was not. So update it too.
This fixes the crash of HOVER 1.0 game from Rapps when
it tries to allocate a dynamical memory from the
unitialized heap via malloc() function exported from our msvcrt20.dll.
Timo Kreuzer [Thu, 14 Mar 2024 18:24:33 +0000 (20:24 +0200)]
[UMKM_APITEST] Add a test for syscall handling
This is intentionally not part of ntdll_apitest, because that links to advapi32, which links to rpcrt4, which (wrongly!) links to ws2_32, which (wrongly!) links to user32, which breaks the test.