Commit graph

5228 commits

Author SHA1 Message Date
Oleg Dubinskiy d1b8feb690
[AUDIO] Implement retreiving audio playback position (#6817)
Implement GetWavePosition API for both Legacy and MMixer modes.
[WDMAUD.DRV]
- Fix wrong I/O control code passed to DeviceIoControl for Legacy mode. Use IOCTL_GETPOS instead of IOCTL_OPEN_WDMAUD, to use the correct routine.
- Implement WdmAudGetWavePosition for MMixer mode, as it was completely unimplemented there. Call an appropiate MMixer routine and return back resulting wave position.
[WDMAUD]
- Implement WdmAudGetPostion routine, which is used by Legacy mode, and call the same MMixer routine from it too.
- Handle it in IOCTL_GETPOS I/O control request of dispatch routine.
[MMIXER]
- Implement MMixerGetWavePosition internal routine, which is called by both Legacy and MMixer modes, and does the actual work of retrieving playback position.
- Call an apporpriate KSPROPERTY_AUDIO_POSITION property from it, and return in the output resulting KSAUDIO_POSITION.PlayOffset member, which contains the current playback position offset, to be returned to the caller.
This fixes a failure retreiving the current audio playback position snd subsequent playing the audio data by several 3rd-party applications which are using this API (for example, some Gecko based browsers by @roytam1: Basilisk (Serpent) 52.9.0 IA-32 build, NewMoon 28.10.7 IA-32 build and KMeleon 76.5.3 Goanna engine).
CORE-19542
2024-05-06 20:07:47 +02:00
Timo Kreuzer f4a9f9cde3 [CRT][NTDLL][MSVCRT] Add _swprintf implementation 2024-05-06 14:08:31 +02:00
Maj Soklič 28eb4e726a
[NETCFGX] Fix missing keyboard navigation (#6837)
Remove WS_GROUP from: IDC_TCP_RESTRICT, IDC_UDP_RESTRICT and IDC_IP_RESTRICT
fixes CORE-19569

Thanks to Maj Soklič for the PR, based on the investigations of Krosuser.
2024-05-05 19:15:04 +02:00
Maj Soklič 7ce96fd364
[SHELL32] Fix keyboard navigation in file deletion dialog CORE-19564 (#6833)
Fix usage of left/right arrow keys in file deletion dialog
JIRA issue: CORE-19564

Remove WS_GROUP from all but the 1st button

"Inshallah brother we will fix this bug"
2024-05-03 23:37:37 +02:00
Timo Kreuzer bd9bb36b18 [KERNEL32] Reduce diff to wine-3.3 2024-05-03 16:10:00 +02:00
winesync c08580dee3 [WINESYNC] kernel32: Don't return a parent locale for neutral locales in GetLocaleInfoEx.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id c63a08586f19af7e6a65a064696743f648006fcd by Alexandre Julliard <julliard@winehq.org>
2024-05-03 16:10:00 +02:00
winesync 90c0562935 [WINESYNC] kernel32: Keep the sublanguage specified by the script name when looking for the default.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id c5a39bd98f5388d48b728d19ce466665fa37bfbd by Alexandre Julliard <julliard@winehq.org>
2024-05-03 16:10:00 +02:00
winesync b46bf67c2e [WINESYNC] kernel32: Add stub for ResolveLocaleName.
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b9a9fe4a042f98521efea3275ded4af4b7cba4c9 by Jactry Zeng <jzeng@codeweavers.com>
2024-05-03 16:10:00 +02:00
winesync a8d367089c [WINESYNC] kernel32: Improve locale detection on Android.
setlocale is coded to just return 'C' for all inquiries ignoring locale
that may be set in the environment.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 9dc5d299f11c599862d39af3e32d92e787c1ae7b by Aric Stewart <aric@codeweavers.com>
2024-05-03 16:10:00 +02:00
winesync 535fffd824 [WINESYNC] kernel32: Check for invalid flags in codepage conversion functions.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 0b95ebd283986fa179c7ec6d2ea3f34c977c3aaf by Alex Henrie <alexhenrie24@gmail.com>
2024-05-03 16:10:00 +02:00
winesync 544f114459 [WINESYNC] kernel32: Use different default sublangs for Spanish and Chinese.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 7737693693ca46a88c41cfeab95d2b65423d8e51 by Andrew Eikum <aeikum@codeweavers.com>
2024-05-03 16:10:00 +02:00
winesync a3102dc0dd [WINESYNC] kernel32: Improved GetUserPreferredUILanguages stub.
Implementation and tests are based on GetSystemPreferredUILanguages.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 26d0105cd8a8ce1131033f1871de0dd9a7b4c43c by Jacek Caban <jacek@codeweavers.com>
2024-05-03 16:10:00 +02:00
winesync 6f4d2924f0 [WINESYNC] kernel32: Fixed handling LOCALE_NAME_USER_DEFAULT in GetLocaleInfoEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 505406fc83b65dd1f9ebcbaabb582f0fabec1b0a by Jacek Caban <jacek@codeweavers.com>
2024-05-03 16:10:00 +02:00
winesync 8c0ffa6f18 [WINESYNC] Assorted spelling/grammar fixes.
wine commit id 1e214eb5d354ffbb64699686913a5eb61998ed78 by Frédéric Delanoy <frederic.delanoy@gmail.com>
2024-05-03 16:10:00 +02:00
Timo Kreuzer f70a1d03b0 [KERNEL32] Import GetLocaleInfoEx from wine-1.9.17 2024-05-03 16:10:00 +02:00
Timo Kreuzer b01b6926a4 [KERNEL32] locale.c: Reduce diff to wine-1.9.17 2024-05-03 16:10:00 +02:00
Timo Kreuzer 98c4379291 [KERNEL32] locale.c: Move functions to match wine order 2024-05-03 16:10:00 +02:00
Timo Kreuzer 3016060883 [KERNEL32] Rename lang.c to locale.c as in wine 2024-05-03 16:10:00 +02:00
winesync 2d4d5b6359 [WINESYNC] kernel32: Add TRACE to SetCommState.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 60226ee37de52b470b98efa13f9a5e065cedc77b by Alex Henrie <alexhenrie24@gmail.com>
2024-05-03 16:10:00 +02:00
Timo Kreuzer c908716094 [KERNEL32] actctx.c: reduce diff to wine-1.7.55 2024-05-03 16:10:00 +02:00
Timo Kreuzer c04377bf03 [KERNEL32] Disable some warnings for wine code 2024-05-03 16:10:00 +02:00
Whindmar Saksit bbb3b00398
[ZIPFLDR] Don't handle DFM_INVOKECOMMANDEX if you need DFM_INVOKECOMMAND (#6766)
ZipFldr responds incorrectly to DFM_INVOKECOMMANDEX, it needs to return E_NOTIMPL to get the DFM_INVOKECOMMAND message.
2024-05-02 19:01:38 +02:00
Whindmar Saksit 07d55ce1cf
[SHELL32] CFSFolder parsing must only apply bind data to the last item (#6794)
When IShellFolder::ParseDisplayName is asked to parse multiple path elements, the IFileSystemBindData (if any) only applies to the last item. The other elements are always folders.
2024-05-02 18:00:12 +02:00
Whindmar Saksit db93cb1709
[SHELL32][VFDLIB] Handle size check of CMINVOKECOMMANDINFOEX correctly (#6767)
Older NT versions (< IE4) had a smaller CMINVOKECOMMANDINFOEX struct. Places where 3rd-party code passes in the struct needs to accept the small size.
2024-05-01 14:17:08 +02:00
Timo Kreuzer b388cb66de [CRT] Add mbrtowc (from wine) 2024-05-01 07:37:31 +02:00
Timo Kreuzer 76d33ee7f2 [CRT] Add wcrtomb (from wine) 2024-05-01 07:37:31 +02:00
Thamatip Chitpong 35dc2f2410
[WINMM] PlaySound: Add a note for ReactOS-specific modifications
Addendum to commit f18111b641
2024-04-29 17:56:03 +07:00
Thamatip Chitpong 7586fe5c1d [SHELL32] Rewrite CCopyAsPathMenu on top of IContextMenu
Also use the same registry key as Windows 10.
2024-04-28 21:03:43 +07:00
Thamatip Chitpong a706f6ba78 [SHELL32] Fix separator not showing for CopyTo and MoveTo menu
Fix wrong previous item index.
2024-04-28 21:03:43 +07:00
Thamatip Chitpong d4ca55f65e [SHELL32] Separate CCopyAsPathMenu implementation from CCopyMoveToMenu 2024-04-28 21:03:43 +07:00
Whindmar Saksit f9325370f5
[SHELL32] DefView must set CMF_EXTENDEDVERBS, CMF_CANRENAME and CMF_EXPLORE (#6776)
The caller of IContextMenu::QueryContextMenu must set these flags when needed, not CDefaultContextMenu.

Notes:
- CMF_CANRENAME is always set by DefView because it always supports rename in its current form. CDefaultContextMenu verifies that SFGAO_CANRENAME is also set on the items. All other callers are expected to not know how to rename unless they also set CMF_CANRENAME. This fixes the bug that the Rename item is present in the TreeView context menu even though the TreeView in ROS Explorer does not handle renaming.
- While DefView now tries to set CMF_EXPLORE correctly, the flag is never actually set because BROWSEUI does not handle FCW_TREE yet.
- This also fixes the bug where the File menu is missing the menu items when there is no selection.
2024-04-28 21:00:03 +07:00
Mark Jansen 24a56f89ab
Rework apisets to use a table
This removes all fake apiset forwarders,
and handles apisets inside ntdll.
This is not 100% compatible with how windows does it, but it should be good enough for us.
2024-04-27 22:51:34 +02:00
Ryan Kounter ab72bc06d6
[COMCTL32] Fix header redraw glitches when resizing (#6799)
Fixes COMCTL32 headers from being garbage text when resizing while drawn off screen.

- Invalidate header item rect before scrolling to prevent the divider from being redrawn over and over.
- Invalidate header item text through adding flag SW_INVALIDATE to ScrollWindowEx call to prevent the text from being redrawn over and over.

CORE-19404
2024-04-27 09:56:03 -06:00
Marcin Jabłoński dcf9eb060a
[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
2024-04-26 18:28:46 -06:00
Doug Lyons 3693d55404
[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>
2024-04-25 17:20:28 -05:00
Katayama Hirofumi MZ d55f49978d
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
2024-04-25 09:01:21 +09:00
Katayama Hirofumi MZ 91acf823d8
[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.
2024-04-24 19:44:30 +09:00
Katayama Hirofumi MZ 1dc8d80ca1
[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.
2024-04-23 08:28:38 +09:00
Katayama Hirofumi MZ 0240a87618
[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.
2024-04-20 23:11:31 +09:00
Serge Gautherie 68a8619b7b [SHELL32] Remove 2 redundant initializations
Addendum to 6146fd0 (r54688) and 99b2e3d (r54979).
2024-04-20 01:50:14 +04:00
Whindmar Saksit 62c30d1f93
[SHELL32] SHCreateDefaultContextMenu: Pass HWND to callback (#6764)
The caller's callback function is supposed to receive the window handle
passed to SHCreateDefaultContextMenu / CDefFolderMenu_Create2.
2024-04-20 00:34:45 +03:00
Whindmar Saksit dacdd80390
[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 bf2cec186c (#5411)

CORE-19506
2024-04-20 00:12:56 +03: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
Joachim Henze 21a9f78b2d [COMCTL32] Pt.rc: Place accelerator FIXMEs 2024-04-18 01:53:20 +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
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
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
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
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
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 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 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
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
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
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
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
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
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
Ratin Gao 1cf8759d69
[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 4c8a2a8815. CORE-11954
2024-03-30 15:46:34 +03:00
Katayama Hirofumi MZ 84f15b15fb
[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.
2024-03-29 11:15:38 +09:00
Joachim Henze 558ab78fc5
[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.
2024-03-27 23:37:41 +01:00
Joachim Henze e3bfcdf9e2
[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>
2024-03-27 21:08:17 +01:00
Katayama Hirofumi MZ 72a27e6d45
[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.
2024-03-27 17:36:48 +09:00
Katayama Hirofumi MZ f9a5585870
[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.
2024-03-27 17:04:49 +09:00
Joachim Henze 00c4b3d99f
[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.
2024-03-26 23:39:46 +01:00
Joachim Henze ee0329e0e2
[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 a5bff2457a (#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 bf88116252 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
2024-03-26 17:07:33 +01:00
Katayama Hirofumi MZ 6ac153632f
[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.
2024-03-25 07:35:15 +09:00
Whindmar Saksit a83e40f6d1
[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.
2024-03-24 21:37:59 +01:00
Whindmar Saksit 2449ed5d85
[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.
2024-03-24 18:28:26 +01:00
Whindmar Saksit 373816c729
[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
2024-03-24 18:23:07 +01:00
Julen Urizar Compains 54df31ccac
[TRANSLATION] Update Spanish (es-ES) translation (#6449)
- [REACTOS] es-ES: Fixes and typos
- [USETUP] es-ES: Fixes and typos
- [HOTPLUG] es-ES: Fixes and typos
- [OPENGLCFG] Add Spanish (es-ES) translation
- [NETSHELL] es-ES: Fixes and typos
- [SHELL32] es-ES: Fixes and typos
- [SYSSETUP] es-ES: Fixes and typos

Reviewed-by: Ismael Ferreras Morezuelas <swyterzone@gmail.com>
2024-03-24 12:30:56 +03:00
Whindmar Saksit 1408de02ce
[SHELL32] SHOpenFolderAndSelectItems should handle children correctly (#6151)
- Free pidl from ILCombine.
- ILGetNext will never return NULL on valid input, it is not the correct way to check.
2024-03-23 22:24:04 +01:00
Andrei Miloiu 8eb80987e4
[TIMEDATE] Update Romanian (ro-RO) translation (#6613) 2024-03-23 22:20:24 +01:00
Andrei Miloiu 269907e44c
[HOTPLUG] Add Romanian (ro-RO) translation (#6644) 2024-03-23 22:17:20 +01:00
Andrei Miloiu d0ce13a0e1
[APPWIZ] Improve Romanian (ro-RO) translation (#6532) 2024-03-23 22:12:30 +01:00
Andrei Miloiu 5e31354ff6
[DEVMGR] Update Romanian (ro-RO) translation (#6529) 2024-03-23 21:17:24 +01:00
Andrei Miloiu d1207f6f47
[WININET] Update Romanian (ro-RO) translation (#6527) 2024-03-23 21:14:12 +01:00
Andrei Miloiu 7d45bb2a21
[OPENGLCFG] Update Romanian (ro-RO) translation (#6507) 2024-03-23 21:07:32 +01:00
Stanislav Motylkov 2ec785b1ee [SHELL32] Update Russian (ru-RU) translation
Addendum to ad748b0b3b. CORE-19494
2024-03-20 12:26:58 +03:00
Katayama Hirofumi MZ ad748b0b3b
[EXPLORER][SHELL32] Smaller Start Menu (#6646)
Improve customization of Start Menu.
JIRA issue: CORE-19494
- Add SmallStartMenu flag to TW_STRUCKRECTS2
  structure.
- Add IDS_ADVANCED_SMALL_START_MENU
  resource string.
- Update g_TaskbarSettings.sr.SmallStartMenu via
  a callback function.
- Check g_TaskbarSettings.sr.SmallStartMenu
  when Start Menu is updated.
2024-03-20 07:32:52 +09:00
Timo Kreuzer d45876b810 [DBGHELP] Remove useless broken CMake defines 2024-03-19 07:43:58 +01:00
Katayama Hirofumi MZ e27f06b889
[SHLWAPI] SHLWAPI_DEF_ASSOCF: Add ASSOCF_INIT_NOREMAPCLSID (#6636)
Step up to correct shell32!FindExecutable.
JIRA issue: CORE-19493
2024-03-19 09:44:10 +09:00
Katayama Hirofumi MZ 10d9e9de05
[SHELL32][SDK] Implement RealShellExecute(,Ex)(A,W) (#5849)
Implementing missing features...
JIRA issue: CORE-19278
- Modify shell32.spec.
- Implement RealShellExecuteA, RealShellExecuteW, RealShellExecuteExA,
  and RealShellExecuteExW functions.
- Add the prototypes to <undocshell.h>.
- Modify SEE_MASK_... constants.
2024-03-19 08:58:07 +09:00
Katayama Hirofumi MZ c5e6456377
[MSCTFIME] Use QISearch for QueryInterface (#6630)
Simplify code and reduce binary size.
JIRA issue: CORE-19360
- Use shlwapi!QISearch for QueryInterface
  implementation.
- Add delay link to shlwapi.
2024-03-17 12:44:03 +09:00
Katayama Hirofumi MZ 1af0dbe36e
[MSUTB][SDK] Use QISearch for QueryInterface (#6631)
Simplify code and reduce binary size.
JIRA issue: CORE-19363
- Use shlwapi!QISearch for QueryInterface
  implementation.
- Add delay link to shlwapi.
- Define QITABENT macro in <shlwapi.h>.
2024-03-17 11:55:19 +09:00
Katayama Hirofumi MZ 1fbf09f531
[RAPPS][SHLWAPI][SDK] Un-escape URL filename (#6626)
Choosing the better filename.
JIRA issue: CORE-19490
- Add UrlUnescapeAndMakeFileNameValid helper function.
- Use UrlUnescapeW and PathIsValidCharW.
- Add PATH_CHAR_CLASS_... flags for PathIsValidCharA/W.
2024-03-17 08:15:08 +09:00
Katayama Hirofumi MZ cbad6cef24
[SHLWAPI] Implement SHSetDefaultDialogFont (#6620)
Implementing missing features...
JIRA issue: CORE-19278
- Implement SHSetDefaultDialogFont function.
- Add SHSetDefaultDialogFont prototype to
  <shlwapi_undoc.h>.
2024-03-15 21:25:53 +09:00
Oleg Dubinskiy c6b8638815
[SHELL32] Add transparent icon resource (#6621) CORE-19471
Add transparent 16x16 icon (just small picec of transparent background) as resource and use it for 50, 51, 52, 53 resource IDs.
Define it as IDI_SHELL_NONE_XX for all four IDs appropriately (since the icon displays nothing).
These resources are not used by anything yet, but they are confirmed to exist as resources with 50, 51, 52, 53 IDs in shell32.dll from Windows XP/Server 2003.
This allows to correct the ordering of all other resources those come starting from index 54, and hence it fixes the following icons displayed incorrectly after restoring to default system icon set via Stardock IconPackager 5.1:
- Control Panel folder icon;
- Folder Options item icon in Control Panel;
- My Music special folder in My Documents;
- several File extensions icons (.ini, .txt etc).
The icons are fixed as in the preview of IconPackager app, same in ReactOS itself.
Now only Web Browser item icon on the Desktop remains invalid. All other icons are restored correctly.
CORE-19471
2024-03-14 20:58:12 +01:00