reactos.git
6 hours ago[MMIXER] Fix additional data size initialization for different audio formats (#6753) master
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

8 hours ago[SDK] Don't just infinitely spam the DbgPrint in the bootloader (#6763)
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)

10 hours ago[FREELDR] Allow Freeloader to boot Vista revamp of PR #1905 (#6479)
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>
12 hours ago[ZIPFLDR] Make function prototype consistent
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.

12 hours ago[SHELL32] Update Russian (ru-RU) translation
Stanislav Motylkov [Thu, 18 Apr 2024 15:18:16 +0000 (18:18 +0300)]
[SHELL32] Update Russian (ru-RU) translation

Addendum to 9238a1762f6.

17 hours ago[CALC] Fix input bug when display is in error. (#5988)
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.

22 hours ago[WIN32SS] Introduce the NATIVE_REACTX define and disable some Dx calls (#6025)
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.

23 hours ago[VFDLIB] GitHub actions workaround - Disable PDB generation for vfd.dll (#6762)
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.

27 hours ago[COMCTL32] Pt.rc: Place accelerator FIXMEs
Joachim Henze [Wed, 17 Apr 2024 23:53:20 +0000 (01:53 +0200)]
[COMCTL32] Pt.rc: Place accelerator FIXMEs

30 hours ago[REGEDIT] Correctly limit splitter's X coordinates (#6758)
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.

30 hours ago[FREELDR] Reformat the boot editor strings in the code.
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.

30 hours ago[FREELDR] linuxboot: It doesn't need the BIOS boot drive number and partition.
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.

31 hours ago[FREELDR:UI] Minor miscellaneous fixes.
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.

31 hours ago[FREELDR] Skip NULL-pointer entries in Argv when enumerating arguments.
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.

31 hours ago[FREELDR] arcsupp.c: Relicense my code to MIT and use SAL2 annotations.
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.

31 hours ago[FREELDR] BuildArgvForOsLoader: Add a terminating NULL pointer to the Argv vector.
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

36 hours ago[COMDLG32] *.rc: Tweak spaces in IDS_INVALID_FILENAME (#6736)
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>
2 days ago[CRT] crtdefs.h: Wrap localeinfo_struct in ifdef
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.

4 days ago[BROWSEUI] SHExplorerParseCmdLine: Fix parsing of /root (#6752)
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

4 days agoCheck if dwBandID is NULL before getting band object (#6738)
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

4 days ago[SHELL32] Fix ParseDisplayName Part 4 (#6747)
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.

4 days ago[SHELL32] Fix ParseDisplayName Part 3 (#6746)
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.

4 days ago[NTOS:KE/x64] Use movaps instead of movdqa
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.

4 days ago[NTOS:KE/x64] Clean up EnterTrap/ExitTrap
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

4 days ago[NTOS:KE/x64] Fix handling of non-volatiles in trap vs exception frame
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.

4 days ago[RTL/x64] Implement RtlRaiseException in asm
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.

4 days ago[REGEDIT] Anonymize CONTROL "List1" (#6735)
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.

5 days ago[SHELL32] Initialize MenuItemInfoW struct in AddStaticContextMenusToMenu (#6737)
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.

5 days ago[DOC] 3rd Party Files.txt: Complete 'win-iconv' (#6691)
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.`

5 days ago[NDK/x64] Remove #pragma pack(push,4) around KPRCB/KPCR
Timo Kreuzer [Thu, 14 Mar 2024 19:06:30 +0000 (21:06 +0200)]
[NDK/x64] Remove #pragma pack(push,4) around KPRCB/KPCR

5 days ago[RTL/x64] Handle STATUS_UNWIND_CONSOLIDATE in RtlRestoreContext
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.

5 days ago[SHELL32] Refactor and simplify CDesktopFolder (#6741)
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.

5 days ago[SHELL32] Fix ParseDisplayName Part 2 (#6740)
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.

5 days ago[NTDLL][ADVAPI32][ADVAPI32_APITEST][CRYPTLIB] Add hash API exports for NT6+ and apite...
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

5 days ago[SHELLBTRFS] Prevent redeclaration of __cpuidex with newer mingw-w64 headers
Timo Kreuzer [Sat, 9 Mar 2024 16:29:35 +0000 (18:29 +0200)]
[SHELLBTRFS] Prevent redeclaration of __cpuidex with newer mingw-w64 headers

6 days ago[NTUSER] Avoid sending superfluous WM_MOUSEMOVE messages (#6397)
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

6 days ago[SHELL32][SHELL32_APITEST][SDK] Implement GUIDFromStringA (#6734)
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".

6 days ago[REGEDIT] RC: it-IT: Strip spaces, hu-HU,pt-PT,tr-TR: add FIXMEs
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.

7 days ago[COMDLG32] cdlg_Sq.rc: Strip 2 includes (#6730)
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.

7 days ago[AUDIO] Implement support for WAVE_FORMAT_EXTENSIBLE audio format (#6686)
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

8 days ago[COMDLG32] *.rc Improve translations (#6729)
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.

8 days ago[SHELL32] Implement several ShellDispatch methods (#6145)
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)

8 days ago[NTOS:KE/x64] Improve KeGetTrapFrame
Timo Kreuzer [Tue, 9 Apr 2024 19:18:07 +0000 (22:18 +0300)]
[NTOS:KE/x64] Improve KeGetTrapFrame

8 days ago[DEVMGR] Add DYNAMIC_FIELD_OFFSET macro
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

8 days ago[KS] Fix a bug found by GCC 13
Timo Kreuzer [Thu, 14 Mar 2024 18:07:38 +0000 (20:07 +0200)]
[KS] Fix a bug found by GCC 13

8 days ago[UDFS] Remove packing around include of ntifs.h
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.

9 days ago[SHELL32][SDK] Fix ParseDisplayName Part 1 (#6721)
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.

9 days ago[SHELL32] Update Romanian (ro-RO) translation (#6657)
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>
9 days ago[NOTEPAD] Fix english STRING_PRINTFAILED translation (#6722)
Maj Soklič [Tue, 9 Apr 2024 09:46:52 +0000 (11:46 +0200)]
[NOTEPAD] Fix english STRING_PRINTFAILED translation (#6722)

11 days ago[SHLWAPI][SHLWAPI_APITEST] Fix NULL behavior of StrDupA/W (#6720)
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.

11 days ago[STOBJECT] Update Romanian (ro-RO) translation (#6695)
Andrei Miloiu [Sun, 7 Apr 2024 18:40:38 +0000 (21:40 +0300)]
[STOBJECT] Update Romanian (ro-RO) translation (#6695)

11 days ago[SHLWAPI] Update Romanian (ro-RO) translation (#6702)
Andrei Miloiu [Sun, 7 Apr 2024 18:36:23 +0000 (21:36 +0300)]
[SHLWAPI] Update Romanian (ro-RO) translation (#6702)

11 days ago[UMANDLG] Update Romanian (ro-RO) translation (#6699)
Andrei Miloiu [Sun, 7 Apr 2024 18:34:38 +0000 (21:34 +0300)]
[UMANDLG] Update Romanian (ro-RO) translation (#6699)

11 days ago[SHELL32] Use Uppercase in SHELL32_GUIDToStringA/W (#6719)
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.

11 days ago[NTOS:KE/x64] Remove pointless loop in KiInitiateUserApc
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.

11 days ago[NTOS:KE/x64] Fix user APC delivery on syscall exit
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.

11 days ago[KERNEL32_APITEST] Add test for multiple queued user APCs
Timo Kreuzer [Tue, 2 Apr 2024 19:51:40 +0000 (22:51 +0300)]
[KERNEL32_APITEST] Add test for multiple queued user APCs

11 days ago[KERNEL32_APITEST] Use InterlockedIncrement for proper synchronization
Timo Kreuzer [Tue, 2 Apr 2024 19:08:30 +0000 (22:08 +0300)]
[KERNEL32_APITEST] Use InterlockedIncrement for proper synchronization

11 days ago[NTOS:KE] Fix calculation of timer expiration
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

11 days ago[NTOS:KE/x64] Implement KiUserCallbackExit
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.

12 days ago[SHELL32] Copy as path shell extension (#6701)
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>
12 days ago[MSVCRT20][MSVCRT40] Fix heap initialization (#6713) CORE-19505
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.

12 days ago[UMKM_APITEST] Add a test for syscall handling
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.

13 days ago[COMCTL32] Fix Status Bar Updating (#6696)
Doug Lyons [Fri, 5 Apr 2024 21:30:09 +0000 (16:30 -0500)]
[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 7866eb28862b31f2ee90045293c662c8ac834a70

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

13 days ago[RTL/x64] Remove an ASSERT in RtlpTryToUnwindEpilog
Timo Kreuzer [Tue, 15 Aug 2023 21:10:46 +0000 (00:10 +0300)]
[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.

2 weeks ago[SHELL32] Handle the Progman Folder options message and tab switching support (#5574)
Whindmar Saksit [Fri, 5 Apr 2024 01:53:57 +0000 (03:53 +0200)]
[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>
2 weeks ago[NTOS:Ke/x64] Improve KiDispatchExceptionToUser
Timo Kreuzer [Thu, 15 Dec 2022 19:58:32 +0000 (20:58 +0100)]
[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.

2 weeks ago[NTOS:KE/x64][SDK] Add HANDLE_USER_APCS asm macro
Timo Kreuzer [Wed, 27 Mar 2024 21:17:29 +0000 (23:17 +0200)]
[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.

2 weeks ago[NTOS:KE/x64][SDK] Add some trap handling support asm macros
Timo Kreuzer [Sun, 24 Mar 2024 16:58:44 +0000 (18:58 +0200)]
[NTOS:KE/x64][SDK] Add some trap handling support asm macros

2 weeks ago[NTOS:MM] MiDeleteVirtualAddresses: Update PrototypePte before exiting loop, when...
Thamatip Chitpong [Thu, 28 Mar 2024 16:28:11 +0000 (23:28 +0700)]
[NTOS:MM] MiDeleteVirtualAddresses: Update PrototypePte before exiting loop, when deleting PDE

Fix BSoD 0x1A introduced by commit c7e09061caa02ee000ab33f1578bd3786e37fdd8
CORE-18190
CORE-18818
CORE-19253

2 weeks ago[NTOS:MM] Revert commit 0c612980ac
Thamatip Chitpong [Thu, 28 Mar 2024 03:07:06 +0000 (10:07 +0700)]
[NTOS:MM] Revert commit 0c612980ac

This revert commit 0c612980ac9699c329035fe25753a52650e28ff3

2 weeks ago[DOC] 3rd Party Files.txt: Update/Complete 'CardLib' (#6688)
Serge Gautherie [Mon, 1 Apr 2024 16:29:29 +0000 (18:29 +0200)]
[DOC] 3rd Party Files.txt: Update/Complete 'CardLib' (#6688)

As mentioned in e.g. base/applications/games/solitaire/ReadMe.txt ,
CardLib is indeed freeware, in public domain.

2 weeks ago[ACPI] Fix object evaluation (#6302)
Dmitry Borisov [Mon, 1 Apr 2024 16:21:35 +0000 (21:21 +0500)]
[ACPI] Fix object evaluation (#6302)

CORE-17256

- Implement support for complex input buffers.
  This will enable the IDE driver with some hack
  to execute the _STM (channel timing settings) control method.
- Fix a memory leak.
- Fix returned status code.
- Correctly calculate the output buffer size.
- Improve buffer validation.
- Implement support for async control requests.
- Implement local reference conversion.
- Implement support for subpackage argument conversion.
- Place some code into INIT section.

2 weeks ago[NTOS:KE/x64] Move setting the thread's trap frame to KiSystemCallEntry64
Timo Kreuzer [Mon, 25 Mar 2024 13:57:34 +0000 (15:57 +0200)]
[NTOS:KE/x64] Move setting the thread's trap frame to KiSystemCallEntry64

This is needed, because KiSystemCallHandler can be called multiple times for the same syscall entry, which would mess up the linkage. This replaces a previous hack and makes things cleaner.

2 weeks ago[NTOS:CM] Avoid unnecessary ObDereferenceObject when handling an ObInsertObject failu...
Gleb Surikov [Sat, 30 Mar 2024 19:10:17 +0000 (21:10 +0200)]
[NTOS:CM] Avoid unnecessary ObDereferenceObject when handling an ObInsertObject failure (#6673)

In case of failure, ObInsertObject itself dereferences the object, so calling ObDereferenceObject one more time in the failure handler is redundant.

- Remove ObDereferenceObject call from CmpCreateRegistryRoot in case ObInsertObject fails.
- Add missing RootKey dereference if CmpCreateRegistryRoot failed to get the key cell (KeyCell).

CORE-17904

2 weeks ago[KERNEL32][KERNEL32_VISTA][KERNEL32_APITEST] Implement and export NT6+ firmware API...
Ratin Gao [Sat, 30 Mar 2024 12:46:34 +0000 (20:46 +0800)]
[KERNEL32][KERNEL32_VISTA][KERNEL32_APITEST] Implement and export NT6+ firmware API (#6580)

- Implement `GetFirmwareType` and improve existing API test for it
- Move (Get/Set)FirmwareEnvironmentVariableEx(A/W) to kernel32_vista_static and export them when NT version >= 6.2

Addendum to 4c8a2a8815c. CORE-11954

2 weeks ago[DOC] 3rd Party Files.txt: Add 'AMD LibM for Windows' (#5945)
Serge Gautherie [Sat, 30 Mar 2024 02:57:24 +0000 (03:57 +0100)]
[DOC] 3rd Party Files.txt: Add 'AMD LibM for Windows' (#5945)

Addendum to 4afb647 (0.4.15-dev-5466).

2 weeks ago[FREELDR/x64] Set up CR0/CR4 for SSE instructions
Timo Kreuzer [Mon, 11 Mar 2024 21:31:58 +0000 (23:31 +0200)]
[FREELDR/x64] Set up CR0/CR4 for SSE instructions

Newer GCC starts emitting SSE/SSE2 instructions, which would cause a triple fault, during early boot, if not enabled.

3 weeks ago[MSCONFIG] Update title for en-US and th-TH
Thamatip Chitpong [Fri, 29 Mar 2024 02:18:19 +0000 (09:18 +0700)]
[MSCONFIG] Update title for en-US and th-TH

3 weeks ago[SHELL32][SHELL32_APITEST] FindExecutable: Add PRF_FIRSTDIRDEF flag (#6681)
Katayama Hirofumi MZ [Fri, 29 Mar 2024 02:15:38 +0000 (11:15 +0900)]
[SHELL32][SHELL32_APITEST] FindExecutable: Add PRF_FIRSTDIRDEF flag (#6681)

Follow-up to #6635. The directory search without this flag didn't work.
JIRA issue: CORE-19493
- Add PRF_FIRSTDIRDEF flag for PathResolveW call.
- Delete needless macro definitions in PathQualifyExW.
- Remove an assertion in IsLFNDriveW.
- Fix shell32_apitest:FindExecutable testcase.

3 weeks ago[NTOS:KE/x64] Improve KiSystemCallHandler code a bit
Timo Kreuzer [Mon, 25 Mar 2024 20:37:50 +0000 (22:37 +0200)]
[NTOS:KE/x64] Improve KiSystemCallHandler code a bit

- Use an index for the table instead of ugly pointer offset
- Invert the check for GUI calls
- Fail with proper status code on invalid win32k syscall ids

3 weeks ago[NTOS:KE/x64] Remove duplicated REX prefix from sysretq
Timo Kreuzer [Sun, 24 Mar 2024 14:20:36 +0000 (16:20 +0200)]
[NTOS:KE/x64] Remove duplicated REX prefix from sysretq

3 weeks ago[SHELL32] *.rc: Strip all unneeded WS_DISABLED in dlg style (#6675)
Joachim Henze [Wed, 27 Mar 2024 22:37:41 +0000 (23:37 +0100)]
[SHELL32] *.rc: Strip all unneeded WS_DISABLED in dlg style (#6675)

This is not intended to fix any specific bug. It is just meant for cleanup.
No noticable change in behavior at runtime.
Some rcs had 7 of those, some only 6. So this will also slightly improve sync between the rcs.

3 weeks ago[NTOS:MM] Fix ntoskrnl/mm/ARM3/virtual.c causing BSOD 0x1a introduced by commit https...
Doug Lyons [Wed, 27 Mar 2024 21:50:45 +0000 (16:50 -0500)]
[NTOS:MM] Fix ntoskrnl/mm/ARM3/virtual.c causing BSOD 0x1a introduced by commit https://github.com/reactos/reactos/commit/c7e09061ca (#6633)

3 weeks ago[FREELDR][NTOS:MM] Add security cookie generation to FreeLoader (#6270)
Adam Słaboń [Wed, 27 Mar 2024 21:33:06 +0000 (22:33 +0100)]
[FREELDR][NTOS:MM] Add security cookie generation to FreeLoader (#6270)

* [NTOS:MM] Misc improvements for cookie generation code

- Improve support for 64 bit images
- Improve LdrpFetchAddressOfSecurityCookie code

* [FREELDR] Add security cookie generation to FreeLoader

CORE-17808

3 weeks ago[NTOS:KE/x64] Loop in KiInitiateUserApc tkreuzer/Fix-KiConvertToGuiThread
Timo Kreuzer [Mon, 25 Mar 2024 20:23:19 +0000 (22:23 +0200)]
[NTOS:KE/x64] Loop in KiInitiateUserApc

This is required since while interrupts are enabled, another user APC could get queued and we want to guarantee that those are all delivered before returning to user mode.

3 weeks ago[SHELL32] pl-PL.rc: Fix IDD_FILE_PROPERTIES & IDD_FOLDER_PROPERTIES (#6678)
Joachim Henze [Wed, 27 Mar 2024 20:08:17 +0000 (21:08 +0100)]
[SHELL32] pl-PL.rc: Fix IDD_FILE_PROPERTIES & IDD_FOLDER_PROPERTIES (#6678)

- This removes an ancient polish-only workaround/extrawurst of 0.4.13-dev-1171-g c81af08 which made the dialog bigger than allowed in y, and which reduced its usability on small monitor resolution.
- Sync the dialogs dimensions back to en-US and all other localizations. Notice also that both dialogs have the same height again afterwards.
- Maximizes the available space for the dynamic parts of the dialog on the right side. Historically even 160 turned out to be too short for that, e.g. EDITTEXT 14009, the dynamic part of "Lokalizacja:". and also EDITTEXT 14007, the dynamic part of "Program:". Therefore we used 170 everywhere for those widths in all other languages. But due to the polish workaround it was crippled to 155 here. Not good!
- Notice also how now the leftmost checkboxes position of the Attributes is perfectly aligned with the other dynamic content of that column above after the fix. This will be important in the future when we will restore the vertical layout of Attribute-checkboxes in both dlgs (Plik vs. checkbox, and Katalog vs. checkbox) to match 2k3sp2
---------
Co-authored-by: Adam Słaboń <asaillen@protonmail.com>
3 weeks ago[CONFIGURE] Add support for MSVC Toolset 19.4x (#6677)
Gleb Surikov [Wed, 27 Mar 2024 18:04:18 +0000 (20:04 +0200)]
[CONFIGURE] Add support for MSVC Toolset 19.4x (#6677)

The MSVC toolset will increment its minor version number from 19.39 (VS 2022 v17.9) to 19.40 (VS 2022 v17.10). The MSVC toolset will be version 19.40.33521.0 in the preview 1 release. For more details, see the MSVC Toolset Minor Version Number 14.40 in VS 2022 v17.10 blog post: https://aka.ms/msvc-ver14.40

3 weeks ago[SHELL32] CQueryAssociation: Add slash check (#6676)
Katayama Hirofumi MZ [Wed, 27 Mar 2024 08:36:48 +0000 (17:36 +0900)]
[SHELL32] CQueryAssociation: Add slash check (#6676)

Follow-up to #6656. I had forgotten to check the slash.
JIRA issue: CORE-19493
Add StrChrW(pszAssoc, L'\\') check before PathFindExtensionW call.

3 weeks ago[SHELL32] Improve FindExecutableW (#6635)
Katayama Hirofumi MZ [Wed, 27 Mar 2024 08:04:49 +0000 (17:04 +0900)]
[SHELL32] Improve FindExecutableW (#6635)

Follow-up to #6656. An approach to
implement ShellExecuteEx correctly.
JIRA issue: CORE-19493
- Rewrite code by using AssocQueryStringW
  and PathResolveW functions.

3 weeks ago[SHELL32] *.rc: Anonymize the "LIST2" control in IDD_AUTOPLAY1 (#6672)
Joachim Henze [Tue, 26 Mar 2024 22:39:46 +0000 (23:39 +0100)]
[SHELL32] *.rc: Anonymize the "LIST2" control in IDD_AUTOPLAY1 (#6672)

same as it is already the case in IDD_MIXED_CONTENT1, just 10 lines below it.
The controls name is not referenced from code. Will save a few bytes in the binary and shortens the rc-line.

3 weeks ago[SHELL32] *.rc: accelerator fixes, FIXMEs, drive-properties bg-BG and fr-FR (#6591)
Joachim Henze [Tue, 26 Mar 2024 16:07:33 +0000 (17:07 +0100)]
[SHELL32] *.rc: accelerator fixes, FIXMEs, drive-properties bg-BG and fr-FR (#6591)

* en-US.rc: create the TODO-list for the required menu-accel-changes

* some accelerator fixes, and add many FIXMEs for stuff that still needs to be improved

* beg the translators to shorten the "On Disk:" string in IDD_FILE_PROPERTIES and IDD_FOLDER_PROPERTIES

* strip superfluous spaces at some strings end and ':' within groupboxes, MS never does that

* bg-BG.rc & fr-FR.rc: Fix text-truncation, It got worse by 0.4.15-dev-5993-g a5bff2457a1014c266ce9c808d22a9967a4baca2 (#5239) A suggestion of Stasm, personally I dislike moving/resizing controls to dimenstions != en-US

* zh-CN.rc: China is the new land of capitalism, so CAPITALIZE the S. Grab another &W used in en-US/zh-TW

* he-IL.rc: strip a useless comment which just does repeat the string 1:1

* zh-TW: This taiwanese question-mark here is wrong, because the question spans over multiple controls, and the last one already ends with such a question mark.

* pt-PT.rc: Name the attributes-column 'Atributos', as that is the same name that is used in the file-properties-dlg

* sk-SK.rc: strip a comment that does not exist in any other lang

* Fix some lines which had 2 accelerators each, e.g. de-DE.
 IDD_FOLDER_OPTIONS_GENERAL has 100% correct german accelerators now (checked against german XPSP3).

* es-ES.rc: remove a stone-age-workaround, and use the height from en-US again here. The text fits the single line fine now.

* no-NO.rc: Fix a regression of 0.4.9-dev-794-g bf88116252071487289235ca803540e61d685d84 which added the 70 to the 3 PUSHBUTTONS for all languages, but for no-NO.rc the third button was forgotten

* pt-PT.rc: Fix 2 wrong accelerators. They have been added by a pt-PT.rc translator, but Windows doesn't have them. Windows uses ENTER and ESCAPE just here. And other translators are aware of that. The thing that actually SHOULD have an accelerator in that dialog is the LTEXT "Abrir", but ironically that one was forgotten / intentionally removed by the pt-PT.rc translator upon translation. A pity!

* pt-PT.rc: pt-PT.rc was crippled regarding accelerators, mostly during 0.4.14-dev'ing. Wisdom of the elders was trampled down here.

* pt-PT.rc: fix unintended "::"

* tr-TR.rc: During 0.4.15-dev'ing a lot of accelerators and capitalization were changed in this file, and during that the IDS_* accelerators at the bottom in that file in the
/* context menus */
section were changed, but the reminder-menu-layouts IDM_* and FCIDM_SHVIEW_* were forgotten to be kept in sync.
That is such a common pitfall. Happened to all of us more than one time already.
Sync the capitalization for that file at least. While knowing that there is still a lot of async left for other files.

* tr-TR.rc: Point with 2 FIXMEs to some accelerator-issues that only somebody with a real turkish Windows will be able to fix properly. Actually most likely at least 6 lines in this file are involved into that collision. Try to mention them within the comment at least.
IDM_COPY
IDM_CREATELINK
IDM_DELETE
and
IDS_COPY
IDS_CREATELINK
IDS_DELETE
This bug does only affect master, and no older releases in this form.

* en-US.rc: And finally add a big fat TODO comment for my future self, regarding dlg redesign where attrubutes will need to be laid out vertically in IDD_FILE_PROPERTIES and IDD_FOLDER_PROPERTIES

3 weeks ago[NOTEPAD] Update Slovenian (sl-SI) translation (#6599)
Maj Soklič [Mon, 25 Mar 2024 17:02:15 +0000 (18:02 +0100)]
[NOTEPAD] Update Slovenian (sl-SI) translation (#6599)

Reviewed-by: Rok Mandeljc <rok.mandeljc@gmail.com>
Reviewed-by: Jaka Kranjc <smgl@lynxlynx.info>
3 weeks ago[SHELL32] IQueryAssociations: Fix path and length (#6656)
Katayama Hirofumi MZ [Sun, 24 Mar 2024 22:35:15 +0000 (07:35 +0900)]
[SHELL32] IQueryAssociations: Fix path and length (#6656)

Implementing correct FindExecutable...
JIRA issue: CORE-19493
- If there were filename extension, then skip to the extension
  by using PathFindExtensionW.
- Use "open" verb if there is no default action if possible.
- Set outlen at CQueryAssociations::ReturnString.

3 weeks ago[SHELL32] Fix FS folder assoc array class order (#6047)
Whindmar Saksit [Sun, 24 Mar 2024 20:37:59 +0000 (21:37 +0100)]
[SHELL32] Fix FS folder assoc array class order (#6047)

Fixes the reg class key order for FS items. The existing code was close,
but for some reason used `//` as the path separator for SystemFileAssociations!

- Fixed SystemFileAssociations.

- Swapped the order of `*` and `AllFilesystemObjects`. This is the documented
  order and can also be observed in Process Monitor.
  https://learn.microsoft.com/en-us/windows/win32/shell/fa-associationarray#about-association-arrays

- Removed `(..., L"%s//%s", extension, wszClass)`, this does not seem to be
  a valid thing (`.TestAAExtWeird` in my tests).

- Adds the `Unknown` class when appropriate. Not adding the `openas` verb
  to `Unknown` rgs registration now to mimic Windows, because ROS
  `CDefaultContextMenu` lacks verb de-duplication and the menu would end up
  with two "Open With" entries. This just uses `(cidl == 1)` to simulate
  Windows, while Windows on NT6 uses `MultiSelectModel=Single`, a NT6 feature
  not implemented in ROS.

- The class order for folders was wrong and is still "wrong" in this PR,
  but I chose to use the Windows menu display order until the exact mechanics
  required in `CDefaultContextMenu` can be understood.

- Extracts the extension from ANSI PIDLs.

3 weeks ago[SHLEXTDBG] Added IQueryAssociations, SHGetFileInfo and ShellExecute actions (#6030)
Whindmar Saksit [Sun, 24 Mar 2024 20:27:04 +0000 (21:27 +0100)]
[SHLEXTDBG] Added IQueryAssociations, SHGetFileInfo and ShellExecute actions (#6030)

Added multiple new actions, most of them will use the system default implementation but can be forced to use a specific CLSID or IShellFolder implementation.

-  /shgfi (SHGetFileInfo)
-  /assocq (IQueryAssociations)
-  /shellexec (ShellExecuteEx on pidl)
-  /dumpmenu (Dumps the HMENU of a IContextMenu with its menu ids and verbs)

Added /explorerinstance as a new wait mode and made it the default. All the other wait modes are hacks that just works around bugs in ROS.

3 weeks ago[NTOS:CM] Remove orphaned KCBs of keys during normal hive unload 6649/head
George Bișoc [Sat, 23 Mar 2024 19:40:56 +0000 (20:40 +0100)]
[NTOS:CM] Remove orphaned KCBs of keys during normal hive unload

A hive whose KCBs have a reference count of 0, meaning nobody is using these keys anymore, will not get removed from the cache table.
As a result during a normal hive unloading operation you will get orphaned KCBs which results in an unload failure.

This is wrong, because this is what a normal hive unloading is supposed to do. What it cannot do of course is that it cannot
scramble the references of opened keys by the users who use the Registry, as it is the job of force unloading mechanism to do that.

Also remove a misleading debug print. Force unloading works as intended by scrambling the references of keys and marking the KCB for deletion,
which is what how a force unload works. Namely Windows does exactly that.

CORE-10705

3 weeks ago[NTOS:CM] Lock the cached KCB before removing it from cache entries
George Bișoc [Sat, 23 Mar 2024 19:28:01 +0000 (20:28 +0100)]
[NTOS:CM] Lock the cached KCB before removing it from cache entries

- Annotate the CmpEnumerateOpenSubKeys function with SAL2
- When removing an orphaned cached KCB, ensure that it is locked before clearing it from cache table entries

3 weeks ago[ADVAPI32] Handle HKCR in RegDeleteValueA+W and RegDeleteKeyValueW (#6033)
Whindmar Saksit [Sun, 24 Mar 2024 17:28:26 +0000 (18:28 +0100)]
[ADVAPI32] Handle HKCR in RegDeleteValueA+W and RegDeleteKeyValueW (#6033)

- HKCR delete handling; delete the value in HKCU if it exists there, otherwise delete it in HKLM.
- Changed RegDeleteKeyValueW to just use the regular Reg functions to get HKCR handling for free.

3 weeks ago[SHELL32] Support IDropTarget handler in IContextMenu static verbs (#5860)
Whindmar Saksit [Sun, 24 Mar 2024 17:23:07 +0000 (18:23 +0100)]
[SHELL32] Support IDropTarget handler in IContextMenu static verbs (#5860)

This adds support for the `DropHandler` subkey in static verbs. `IDropTarget` is called when the verb is invoked. The advantage of this is that no library needs to be loaded until the verb is actually invoked unlike `IContextMenu` shell extensions that have to be loaded during menu creation.

This method is preferred for verb implementations that must work on Windows XP, see
https://learn.microsoft.com/en-us/previous-versions/windows/desktop/legacy/dd940354%28v%3Dvs.85%29?redirectedfrom=MSDN#description