Commit Graph

85409 Commits

Author SHA1 Message Date
Oleg Dubinskiy 5949c20d97
[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 12b3272d9e.
So this is an addendum to that commit.
CORE-19514
2024-04-18 23:19:35 +02:00
Justin Miller ad9c634efa
[SDK] Don't just infinitely spam the DbgPrint in the bootloader (#6763) 2024-04-18 12:08:00 -07:00
Mark Harmstone dd6c1c8843 [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>
2024-04-18 09:28:54 -07:00
Stanislav Motylkov 6d853be981 [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.
2024-04-18 18:22:17 +03:00
Stanislav Motylkov 359c9c7b42 [SHELL32] Update Russian (ru-RU) translation
Addendum to 9238a1762f.
2024-04-18 18:18:16 +03:00
Carlo Bramini 605fa32d45
[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.
2024-04-18 11:39:46 +02:00
Justin Miller 2a2556c5d0
[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.
2024-04-17 21:47:49 -07:00
Justin Miller 9452b29c7f
[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.
2024-04-17 20:24:33 -07:00
Joachim Henze 21a9f78b2d [COMCTL32] Pt.rc: Place accelerator FIXMEs 2024-04-18 01:53:20 +02:00
Katayama Hirofumi MZ d383b20b01
[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.
2024-04-18 06:09:58 +09:00
Hermès Bélusca-Maïto 7b4f42470f
[FREELDR] Reformat the boot editor strings in the code. 2024-04-17 22:25:14 +02:00
Hermès Bélusca-Maïto e5517176b8
[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.
2024-04-17 22:25:13 +02:00
Hermès Bélusca-Maïto c25a0e1919
[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.
2024-04-17 22:19:43 +02:00
Hermès Bélusca-Maïto c044201472
[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.
2024-04-17 21:57:12 +02:00
Hermès Bélusca-Maïto 93245d385d
[FREELDR] arcsupp.c: Relicense my code to MIT and use SAL2 annotations. 2024-04-17 21:57:11 +02:00
Hermès Bélusca-Maïto 5b2dcdd03d
[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
2024-04-17 21:57:09 +02:00
Joachim Henze 6cb18bc6a4
[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>
2024-04-17 16:53:09 +02:00
Timo Kreuzer 95bf896b10 [CRT] crtdefs.h: Wrap localeinfo_struct in ifdef
This prevents a redefinition error, when GCC 13 host headers are included when compiling c++ code.
2024-04-16 20:10:38 +02:00
Katayama Hirofumi MZ 1b85a5fa06
[BROWSEUI] SHExplorerParseCmdLine: Fix parsing of /root (#6752)
Remove excessive (!pInfo->pidlPath) check in SHExplorerParseCmdLine
function.
JIRA issue: CORE-16939
2024-04-15 09:41:01 +09:00
Carl J. Bialorucki ea34ecc9ec
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 55343f04b0
2024-04-15 01:08:01 +02:00
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