Commit graph

85289 commits

Author SHA1 Message Date
Katayama Hirofumi MZ b1de3bfb2b
[SHELL32] Fix ParseDisplayName Part 4 (#6747)
Follow-up to #6746. Reduce SHParseDisplayName
failures.
JIRA issue: CORE-19495
- Re-implement CDrivesFolder::ParseDisplayName
  method.
2024-04-15 03:25:20 +09:00
Katayama Hirofumi MZ 63e5885b37
[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.
2024-04-15 03:24:09 +09:00
Timo Kreuzer 8feb078692 [NTOS:KE/x64] Use movaps instead of movdqa
It does the same thing, but is one byte shorter.
2024-04-14 16:09:20 +02:00
Timo Kreuzer 8d459f2820 [NTOS:KE/x64] Clean up EnterTrap/ExitTrap
- Always save and restore all non-volatile registers, including xmm
- Remove the obsolete flags
2024-04-14 16:09:20 +02:00
Timo Kreuzer 05456808e8 [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.
2024-04-14 16:09:20 +02:00
Timo Kreuzer 83e741c643 [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.
2024-04-14 14:12:35 +02:00
Joachim Henze ba170757d6
[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.
2024-04-14 11:10:01 +02:00
Carl J. Bialorucki 78dc504e72
[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.
2024-04-14 00:12:35 +02:00
Serge Gautherie b8abfa76ca
[DOC] 3rd Party Files.txt: Complete 'win-iconv' (#6691)
Upstream (code) reads:
`win_iconv is placed in the public domain.`
2024-04-13 21:23:15 +02:00
Timo Kreuzer fc6e23d6b8 [NDK/x64] Remove #pragma pack(push,4) around KPRCB/KPCR 2024-04-13 17:59:04 +02:00
Timo Kreuzer bb444b93d9 [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.
2024-04-13 14:34:23 +02:00
Katayama Hirofumi MZ ff282894a8
[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.
2024-04-13 21:08:39 +09:00
Katayama Hirofumi MZ 7fdec96009
[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.
2024-04-13 21:07:12 +09:00
Ratin Gao f61e14f554 [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
2024-04-13 12:41:36 +02:00
Timo Kreuzer 14beaec1d9 [SHELLBTRFS] Prevent redeclaration of __cpuidex with newer mingw-w64 headers 2024-04-13 10:01:46 +02:00
Doug Lyons 76290a6696
[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
2024-04-12 23:58:52 +03:00
Katayama Hirofumi MZ 31ce37da2a
[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".
2024-04-12 21:29:07 +09:00
Joachim Henze 64a59a17b5 [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 995d255962
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.
2024-04-12 06:31:24 +02:00
Joachim Henze 938a39aee9
[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.
2024-04-11 19:54:11 +02:00
Oleg Dubinskiy 12b3272d9e
[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
2024-04-11 11:59:14 +02:00
Joachim Henze d72d61fe47
[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 a36cc8054d (#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.
2024-04-11 00:56:04 +02:00
Whindmar Saksit 7a810c17e7
[SHELL32] Implement several ShellDispatch methods (#6145)
* Implement most of the methods

* Some suggested changes and better error handling (that I then mask like Windows)
2024-04-10 14:29:26 -07:00
Timo Kreuzer c69371cced [NTOS:KE/x64] Improve KeGetTrapFrame 2024-04-10 23:27:53 +02:00
Timo Kreuzer bedc16d46d [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
2024-04-10 23:27:11 +02:00
Timo Kreuzer f5e54015ee [KS] Fix a bug found by GCC 13 2024-04-10 21:47:38 +02:00
Timo Kreuzer 109b84826e [UDFS] Remove packing around include of ntifs.h
This is not just wrong, it is criminal.
2024-04-10 21:46:34 +02:00
Katayama Hirofumi MZ d05dcf6a02
[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.
2024-04-10 09:32:13 +09:00
Andrei Miloiu e85ef799fe
[SHELL32] Update Romanian (ro-RO) translation (#6657)
Co-authored-by: Joachim Henze <joachim.henze@reactos.org>
2024-04-09 12:41:54 +02:00
Maj Soklič 2d79b751a4
[NOTEPAD] Fix english STRING_PRINTFAILED translation (#6722) 2024-04-09 11:46:52 +02:00
Katayama Hirofumi MZ ff531eaade
[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.
2024-04-08 09:17:08 +09:00
Andrei Miloiu 0cfc9aba05
[STOBJECT] Update Romanian (ro-RO) translation (#6695) 2024-04-07 20:40:38 +02:00
Andrei Miloiu 608ed5619f
[SHLWAPI] Update Romanian (ro-RO) translation (#6702) 2024-04-07 20:36:23 +02:00
Andrei Miloiu 3e4d8e6f6c
[UMANDLG] Update Romanian (ro-RO) translation (#6699) 2024-04-07 20:34:38 +02:00
Katayama Hirofumi MZ 5eea72f61b
[SHELL32] Use Uppercase in SHELL32_GUIDToStringA/W (#6719)
Improve consistency.
JIRA issue: CORE-19495
Reduced 4 failures in shell32:SHParseDisplayName.
2024-04-07 20:34:50 +09:00
Timo Kreuzer 713a360c74 [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.
2024-04-07 09:14:26 +02:00
Timo Kreuzer 7589238b68 [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.
2024-04-07 09:14:26 +02:00
Timo Kreuzer c4498d751d [KERNEL32_APITEST] Add test for multiple queued user APCs 2024-04-07 09:14:26 +02:00
Timo Kreuzer 85fc290bb7 [KERNEL32_APITEST] Use InterlockedIncrement for proper synchronization 2024-04-07 09:14:26 +02:00
Timo Kreuzer 43b181309e [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
2024-04-07 09:14:26 +02:00
Timo Kreuzer 34576c7015 [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.
2024-04-07 09:13:58 +02:00
Whindmar Saksit 9238a1762f
[SHELL32] Copy as path shell extension (#6701)
* Added Copy as path menu extension

---------

Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-06 14:01:32 -07:00
Oleg Dubinskiy 91be8bf0a1
[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 c47506a5f4

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.
2024-04-06 17:46:11 +02:00
Timo Kreuzer ea28951607 [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.
2024-04-06 08:14:52 +02:00
Doug Lyons a771729e69
[COMCTL32] Fix Status Bar Updating (#6696)
This fixes CORE-19497 'Regression, part of the statusbar with the sizegrip is not redrawn properly'

The regression was introduced / unhidden by 0.4.15-dev-5617-g 7866eb2886

Author of the patch: JIRA-user: I_Kill_Bugs
turned into PR by @Doug-Lyons
Thank you both!

KVM: https://reactos.org/testman/compare.php?ids=94433,94435
VBox: Builder Broken atm unfortunately
2024-04-05 23:30:09 +02:00
Timo Kreuzer b6987d1463 [RTL/x64] Remove an ASSERT in RtlpTryToUnwindEpilog
This can fail on optimized builds, where functions can end after a noreturn function call without an epilog / ret, but with an int 3. We simply fail gracefully, which is the right thing to do.
2024-04-05 18:18:45 +02:00
Whindmar Saksit 8841e3d7ba
[SHELL32] Handle the Progman Folder options message and tab switching support (#5574)
* Handle the "OnShowOptionsDlg" message
* Support switching tabs
* Update dll/win32/shell32/dialogs/folder_options.cpp
* Update dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
* ShowFolderOptionsDialog workaround
* Added Vista pages, define for magic message

---------

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Thamatip Chitpong <weedgamer131@gmail.com>
2024-04-04 18:53:57 -07:00
Timo Kreuzer 5b82ada2ed [NTOS:Ke/x64] Improve KiDispatchExceptionToUser
Return back to the caller instead of exiting through KiServiceExit2, which is broken and needs to be changed to allow restoring of an exception frame.
2024-04-04 18:41:39 +02:00
Timo Kreuzer 24b4026ce8 [NTOS:KE/x64][SDK] Add HANDLE_USER_APCS asm macro
This also fixes delivering APCs from the system call handler, which previously would have clobbered rax. Also don't use the thread's TrapFrame member, which is not always set, when returning.
2024-04-01 20:15:49 +02:00
Timo Kreuzer 88e24bc463 [NTOS:KE/x64][SDK] Add some trap handling support asm macros 2024-04-01 20:15:49 +02:00
Thamatip Chitpong 5329e475db [NTOS:MM] MiDeleteVirtualAddresses: Update PrototypePte before exiting loop, when deleting PDE
Fix BSoD 0x1A introduced by commit c7e09061ca
CORE-18190
CORE-18818
CORE-19253
2024-04-02 00:14:57 +07:00