Commit graph

2987 commits

Author SHA1 Message Date
Whindmar Saksit 71a3be2497
[SHELL32][EXPLORER][SHLWAPI][SDK] Implement SHGetSetSettings (#6982)
These settings are cached per-process (and invalidated by the global counter). This should reduce the number of registry reads performed by DefView and CFSFolder.
2024-07-05 20:35:45 +02:00
Hermès Bélusca-Maïto 2cdd5eca7b
[PSDK] ntdddisk.h, winioctl.h: Improve/sync partition types and Is[FT|Recognized]Partition() macros (#7033)
- Synchronize PARTITION_*** definitions between ntdddisk.h and winioctl.h

- Make IsFTPartition() macro definition more accurate with Win2003/Vista+
  WDK definition. In particular, partition types that would conflict with
  3rd-party ones are not present in this macro. (See comment in header
  for more details.)
  Simplify also its definition by factoring the common
    ((PartitionType) & PARTITION_NTFT)
  piece.

- It can be recognized, in all DDK/WDK versions, that the first part of
  the IsRecognizedPartition() macro definition is basically the definition
  of IsFTPartition(). So, take this opportunity to simplify the definition
  of IsRecognizedPartition() accordingly without losing any functionality.
2024-06-24 16:29:13 +02:00
Whindmar Saksit 674136bcd0
[BROWSEUI] Save/Restore ShellBrowser bar states (#7035)
Save/Restore the state of the ShellBrowser toolbar/addressbar/statusbar.

Windows shares the state of the Go button and the locked state between Explorer and Internet Explorer but the bar states are not shared.

Notes:
- Seems to fix CORE-17236.
- The stream layout does not match Windows so it uses a different name. The toolbar customize dialog needs to be fixed before it makes sense trying to save the toolbar state and the layout of other bands.

CORE-17236
2024-06-21 19:17:13 +02:00
Hermès Bélusca-Maïto 6aed3b5117
[PSDK] ntdddisk.h: Add missing global parentheses around IsFTPartition() definition
CORE-16499

Addendum to commit 0a0e6a9f0 that introduced the problem.

Thanks to Hervé Poussineau for having caught it.

Fixes logic errors, and resulting compilation warnings/errors with GCC
in situations like the following one:
```c
if ((PartitionInfo.PartitionStyle == PARTITION_STYLE_MBR) &&
    IsFTPartition(PartitionInfo.Mbr.PartitionType))
{ ... }
```
error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
 if ((PartitionInfo.PartitionStyle == PARTITION_STYLE_MBR) &&
cc1: all warnings being treated as errors
2024-06-17 17:18:18 +02:00
Hermès Bélusca-Maïto 50271949e7
[PSDK] winioctl.h fixes; make ntddvol.h winioctl.h-compatible (#7010)
winioctl.h:
- Re-organize definitions according to the
  NT DDK headers they have been taken from.
- Add missing include guards to some definitions.
- Add missing IsFTPartition() macro.
- Add missing volume definitions.

ntddvol.h:
- Guard definitions duplicated in winioctl.h.
- Add missing NTDDI_VERSION checks.
  Note: IOCTL_VOLUME_POST_ONLINE is Win8+.
2024-06-13 19:53:23 +02:00
Hermès Bélusca-Maïto ed27d733f7
[MOUNTMGR][DDK] Fix some IOCTLs definitions to Win2k3+ compatibility (#6959)
Fix IOCTL_MOUNTDEV_LINK_CREATED, IOCTL_MOUNTDEV_LINK_DELETED,
IOCTL_MOUNTDEV_UNIQUE_ID_CHANGE_NOTIFY, to Win2k3+ compatible definitions.
The previous versions of these IOCTLs (in Win2000 and XP) were defined without any access protection.

This was noticed here:
https://community.osr.com/t/ioctl-mountdev-link-created-definition-changed/29428
2024-06-12 12:31:32 +02:00
Hermès Bélusca-Maïto 7930bed0a1
[MPR][MOUNTMGR][DDK] Remove unused wine-specific code (#6958)
Usage of these in MPR was already inside #ifndef __REACTOS__ block,
so, "This Is Fine".
2024-06-12 12:29:22 +02:00
Hermès Bélusca-Maïto e47d08fc5a
[DDK] mountdev.h, mountmgr.h: Minor cleanup (#6957)
- Add missing file info headers.
- Make the headers C++ friendly.
2024-06-12 12:28:50 +02:00
Justin Miller bc6c731db3
[KERNEL32_VISTA][SDK] Move SRW definitions to NDK (#6806)
Move SRW and condition variable definitions out of kernel32_vista and into the NDK.

Essentially grabbed from PR #1190
Trying to reduce diff needed for Rtl/ntdll sync.
2024-06-11 22:03:57 +02:00
Hermès Bélusca-Maïto 0b366ea122
[CMAKE][REACTOS] Introduce a utf16le_convert() cmake helper (#6904)
Used when we convert files to UTF16-LE during our build process.
Removes duplicated code.
2024-06-10 21:23:12 +02:00
Hermès Bélusca-Maïto ee92f4b28e
[SDK:CMAKE/IDL] Fix dependency tracking in generate_idl_iids() and extra cleanup.
Do the same in add_idl_reg_script() (currently unused helper) as well.

This is an addendum to commit b587e7b32, where the removal of the
IDL_FILE_FULL variable definition, broke dependency tracking with
the DEPENDS option. Now we use the correct variable.

The problem was caught after doing a partial (non-clean) build after
commit 0d10fb814. In this commit, two new interfaces, IExecuteCommand
and IObjectWithSelection, were added in the psdk/shobjidl.idl file
and used elsewhere. Recompilation correctly regenerated the corresponding
header, psdk/shobjidl.h, but did not trigger a regeneration of the uuid
static library (via the regeneration of sdk/lib/uuid/shobjidl_i.c),
due to broken dependency tracking on the shobjidl.idl file.
Because of this, the shobjidl_i.c did not contain the new GUID
definitions for these new interfaces, IID_IExecuteCommand and
IID_IObjectWithSelection, and triggered linking errors for the
com_apitest, actxprxy and shell32 modules:

```
error LNK2001: unresolved external symbol _IID_IExecuteCommand
error LNK2001: unresolved external symbol _IID_IObjectWithSelection
fatal error LNK1120: 2 unresolved externals
```
2024-06-04 22:21:59 +02:00
Whindmar Saksit c97c1ad4c5
[SHELL32][BROWSEUI] Implement ShellBrowser Apply/Reset default folder settings (#6912) 2024-06-04 18:37:19 +02:00
Carl J. Bialorucki ad73e17418
[USER32] Introduce user32_vista and stubplement GetDpiForWindow() (#6208)
Add user32_vista.dll to introduce new NT6+ User32 features without changing the existing User32.dll when compiled as NT5.x. Also implements a stub for GetDpiForWindow(). The GetDpiForWindow() function will be required to Wine-sync common controls to modern Wine versions.

Changes:
Expose GetDpiForWindow() function and USER_DEFAULT_SCREEN_DPI to appropriate versions in winuser.h
Introduce a basic user32_vista library that can be expanded as needed.
2024-06-04 10:19:32 -06:00
Whindmar Saksit 0d10fb814f
[SHELL32] Implement DelegateExecute verb handler and basic IShellItemArray (#6972) 2024-06-04 15:38:49 +02:00
Serge Gautherie 01fbf25dab
[DBGHELP][NDK][RTL] *RtlComputeCrc32(): Add 'const' to 2nd parameter (#6973)
and sync SAL2 annotations.

It didn't always warn in the past, our gutfeeling (we have *not* double-checked that thesis!) is that the warnings might have been triggered when 0.4.15-dev-958-g 237aa3a9c1 was committed
2024-06-04 13:35:57 +02:00
Oleg Dubinskiy 9046cc97ee
[AUDIO] Implement volume control support (#6922)
Implement volume level changing for Aux/MidiOut/WaveOut devices. It's represented the following WINMM functions:
- auxGetVolume,
- auxSetVolume,
- midiOutGetVolume,
- midiOutSetVolume,
- waveOutGetVolume,
- waveOutSetVolume,
which are calling the followind messages appropriately:
- AUXDM_GETVOLUME,
- AUXDM_SETVOLUME,
- MODM_GETVOLUME,
- MODM_SETVOLUME,
- WODM_GETVOLUME,
- WODM_SETVOLUME.
This fixes volume control for several 3rd-party programs (like Fox Audio Player 0.10.2 from Rapps, Winamp 2.95 with WaveOut plugin). However it does not fix changing the volume in system volume mixers (SndVol32, MMSys), since they are using their own functionality instead. They technically do the same things, but apart from the functions mentioned above.
CORE-14780
2024-06-01 12:30:33 +02:00
Serge Gautherie 3cc4361cca
[CMAKE] Clang*: Add '-Werror=unknown-warning-option' for C/CXX (#6383)
* [UDFS] Clang: Fix a #pragma

'warning: unknown warning group '-Wstringop-overflow', ignored [-Wunknown-warning-option]'

Follow-up to 612b1f2e6 (0.4.15-dev-1129).

* [CREATESPEC] Clang: Fix a target_compile_options()

'warning: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Wunknown-warning-option]'

Addendum to 00ed72d7e (0.4.15-dev-1169).

* [MSVCRT_WINETEST] Clang*: Fix a target_compile_options()

'warning: unknown warning option '-Wno-stringop-truncation'; did you mean '-Wno-string-concatenation'? [-Wunknown-warning-option]'

Addendum to commits 00ed72d7e (0.4.15-dev-1169) then f155b9377 (0.4.15-dev-4612).

* [TELNET] Clang*: Fix a target_compile_options()

'warning: unknown warning option '-Wno-restrict' [-Wunknown-warning-option]'

Addendum to 447ef2aa4 (0.4.15-dev-4613).
2024-05-31 16:26:11 +02:00
Katayama Hirofumi MZ 38b7a6816c
[SHELL32][BROWSEUI] CDefView: Implement SFVM_ADDPROPERTYPAGES callback (#6944)
Implementing missing folder view callbacks...
JIRA issue: CORE-19616
- Add SFVM_PROPPAGE_DATA structure to "shobjidl.idl".
- Implement CDefView::AddPropertySheetPages by calling
  SFVM_ADDPROPERTYPAGES callback.
- Modify CShellBrowser::DoFolderOptions that uses AddPropertySheetPages.
2024-05-28 08:07:29 +09:00
Ratin Gao ce0460b131
[CMAKE] Update sdk/cmake/baseaddress[_msvc].cmake (#6869)
Fix system boot crash with `STATUS_ILLEGAL_DLL_RELOCATION` when compiled with `-DDLL_EXPORT_VERSION=0x600`
2024-05-24 16:10:05 -07:00
Katayama Hirofumi MZ 53518bbab3
[SHLWAPI][SHLWAPI_APITEST][SDK] Implement IShellFolder_GetDisplayNameOf (#6918)
This export function is needed to implement
shell32!SHGetRealIDL function correctly.
JIRA issue: CORE-19278
- Implement IShellFolder_GetDisplayNameOf
  function (This function is not inline function in
  this case) with retry data.
- Add SFGDNO_RETRYALWAYS flag to
  <shlwapi_undoc.h>.
- Add IShellFolderHelpers testcase.
2024-05-23 22:57:31 +09:00
George Bișoc 0b97a997d2
[DDK] Add the GUID_DEVICE_FAN identifier
This identifier will be used to regiser incoming ACPI fans with the I/O PnP manager from the ACPI driver.
2024-05-22 20:22:56 +02:00
Timo Kreuzer 60f4493a68 [SPEC2DEF] Implement support for import symbol aliases 2024-05-22 17:55:38 +02:00
Oleg Dubinskiy 09965760e0 [MMIXER] Remove duplicated MIXERCONTROL_CONTROLTYPE_MUX handling
Don't check for KSNOTETYPE_MUX and don't return MIXERCONTROL_CONTROLTYPE_MUX twice.
2024-05-19 10:46:02 +02:00
Katayama Hirofumi MZ 6c2d1c31dd
[SHLWAPI][SDK] Add IShellFolder_... helper functions (#6893)
Implementing missing features...
JIRA issue: CORE-19278
- Implement IShellFolder_GetDisplayNameOf,
  IShellFolder_ParseDisplayName, and
  IShellFolder_CompareIDs functions.
- Add them to <shlwapi_undoc.h>.
- Modify shlwapi.spec.
- Add some SHCIDS_... macros into shobjidl.idl.
- Provide a macro option
  SHLWAPI_ISHELLFOLDER_HELPERS to
  avoid conflict with <shobjidl.h>
  IShellFolder_... inline functions. Ugly hack
  but effective!
2024-05-18 21:33:33 +09:00
Maj Soklic f22704ad4f [CRT] Fix ARM64 VS2022 debug build (#6899)
__globallocalestatus is missing on VS2022/ARM64 just like on Clang-cl.

Addendum to 861360c65f. CORE-14042 CORE-18200
2024-05-17 12:06:17 +03:00
Katayama Hirofumi MZ 3285f698fd
[SHELL32][SDK] SHChangeNotify: Re-work Part 1 (#6898)
Making shell change notification implementation better.
Now recycle bin icon change is working.
JIRA issue: CORE-13950
JIRA issue: CORE-19591
JIRA issue: CORE-11453
- Delete SHSimpleIDListFromPathA/W hacks.
- Translate simple PIDLs (coming from SHSimpleIDListFromPathA/W)
  in CDefView::OnChangeNotify method.
- Add CDefView::LV_RefreshIcons method for SHCNE_UPDATEIMAGE
  change event.
- Rename CDefView::LV_ProdItem method as CDefView::LV_UpdateItem.
- Call SHUpdateRecycleBinIcon in SHFileOperationW function.
- Half-implement SHUpdateRecycleBinIcon.
- Call SHChangeNotify in DeleteExt function.
2024-05-17 08:10:15 +09:00
Katayama Hirofumi MZ ac0bcf4a90
[SHLWAPI][SHLWAPI_APITEST][SDK] PathFileExistsDefExtAndAttributesW (#6879)
Implementing missing features...
JIRA issue: CORE-19278
- Implement PathFileExistsDefExtAndAttributesW function.
- Add its prototype to <shlwapi_undoc.h>.
- Modify shlwapi.spec.
- Add PathFileExistsDefExtAndAttributesW testcase.
2024-05-15 07:42:43 +09:00
Whindmar Saksit 9e8214fa13
[BROWSEUI] GetControlWindow must support FCW_TREE for DefView usage (#6781)
Support GetControlWindow, ShowControlWindow and IsControlWindowShown for TREE and STATUS in the Shell Browser so DefView can set CMF_EXPLORE correctly.
2024-05-09 18:56:19 +02:00
Joe Mason d234dc2d52
[AVRT] Import Audio/Video Runtime module from Wine 9.7 (#6826)
Enhance compatibility with future programs, including browsers.
AVRT is an acronym for "Audio/Video Multimedia Realtime Runtime" and is NT6.
2024-05-07 15:40:27 +03:00
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 67c28b723e [PSEH/x64] Fix our GCC-SEH-plugin hack
The change is needed, because the previous version emitted multiple ".seh_handlerdata" blocks and GAS isn't able to merge them into one, but will instead only include the first one. This is fixed by generating "asm defines" in the code and pass the line number to the "REACTOS seh" pragma, which is then used to create all handler data by referring to the predefined symbols, that include the line number.
Also the EstablisherFrame parameter passed to the filter/finally function is the original stack pointer, not the frame pointer! Take this into account by passing __builtin_frame_address(0) from the filter context to the global wrapper function, which includes the frame-offset, and use that to recalculate the frame-pointer from the passed in stack pointer.
2024-05-06 14:23:48 +02:00
Timo Kreuzer f4a9f9cde3 [CRT][NTDLL][MSVCRT] Add _swprintf implementation 2024-05-06 14:08:31 +02:00
Hermès Bélusca-Maïto 8e799e2d3e
[SDK:WINE] Some minor additions to wine/test.h (#6822)
- Add two missing debugstr_w* helpers. These will be needed for
  future winetest syncs.

Note that such change would be unnecessary, would wine/test.h and
wine/debug.h be also updated with latest Wine versions. Indeed,
wine/debug.h is now allowed to be included in wine tests since
wine commit:
```
include: Allow using debug.h in tests.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id c8f338369695d360e021f2cbd82a18b2c0eb1514 by Alexandre Julliard <julliard@winehq.org>
```

- Since our wine/test.h doesn't include wine/debug.h for now, include
  instead stdio.h for the time being, in order to get support for
  s(w)printf() in tests that don't include stdio.h
2024-05-04 23:04:21 +02:00
Hermès Bélusca-Maïto 30226f834d
[SDK:WINE] Improve wine/unicode.h (v)sprintfW defines, regarding the (v)swprintf functions (#6823)
These defines assumed that the (v)swprintf functions were the
non-conformant ones (that don't take a 'count' 2nd parameter).
Because of that, use instead the _(v)swprintf functions. However,
those exist only in NT6+. Therefore, redefine these locally
using the _(v)snprintf functions.

NOTE: wine/unicode.h has been removed in wine commit
348eebae872e90a735041a153635d00b01178cfa from July 13, 2022
2024-05-04 13:47:51 +02:00
Timo Kreuzer 6f83cdfdb3 [WINESYNC] Update kernel32.cfg and WINESYNC.txt to wine-3.3 2024-05-03 16:10:00 +02:00
Whindmar Saksit ef80b3dde4
[SDK] ReleaseCComPtrExpectZero should print the relevant file:line (#6772)
ReleaseCComPtrExpectZero currently always prints the same line from shellutils.h in the warning which is not very useful. A macro is required for __FILE__ to be correct.
2024-05-02 17:56:28 +02:00
Timo Kreuzer dc3b208625 [RTL/x64] Fix a bug in RtlRaiseException 2024-05-01 11:30:29 +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
Timo Kreuzer 06a35089eb [RTL] actctx.c: Reduce diff to wine
The changes are:
- Do not allocate an additional WCHAR for the terminating UNICODE_NULL, since we already have that accounted for by sizeof(manifest_dirW)
- Use strcpyW intead of memcpy / strlenW, which does the same thing
- Add a define for user_shared_data
2024-04-29 01:15:50 +02:00
Timo Kreuzer 6e277fc0c0 [RTL] actctx.c: Revert parameter change 2024-04-29 01:15:50 +02:00
Timo Kreuzer f9d3a50ee3 [RTL] actctx.c: Add some #ifdef __REACTOS__ 2024-04-29 01:15:50 +02:00
Timo Kreuzer ad5d8bb477 [RTL] actctx.c: Reduce diff to wine 2024-04-29 01:15:50 +02:00
Timo Kreuzer 55f4e2a581 [RTL] actctx.c: Revert RELATIVE_PATH change 2024-04-29 01:15:50 +02:00
Timo Kreuzer 1a6dc01f69 [RTL] actctx.c: Revert FILE_END_OF_FILE_INFORMATION changes
We still need to hack it, because FileEndOfFileInformation is not supported in user mode, neither in ReactOS, nor in Windows.
2024-04-29 01:15:50 +02:00
Timo Kreuzer 41ff75ce36 [RTL] actctx.c: Revert __TRY / __EXCEPT changes 2024-04-29 01:15:50 +02:00
Timo Kreuzer e46364314b [RTL] actctx.c: Revert casts 2024-04-29 01:15:50 +02:00
Timo Kreuzer 86e28b67ce [RTL] actctx.c: Remove unused stuff that isn't in wine 2024-04-29 01:15:50 +02:00
Timo Kreuzer be76eb7c91 [RTL] actctx.c: Revert ERR, WARN, TRACE changes 2024-04-29 01:15:50 +02:00
Timo Kreuzer 37b2e791ee [RTL] actctx.c: Revert pointless formatting changes 2024-04-29 01:15:50 +02:00