Commit graph

2969 commits

Author SHA1 Message Date
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
Timo Kreuzer 49ed915759 [RTL] actctx.c: Revert NtCurrentProcess() changes 2024-04-29 01:15:50 +02:00
Timo Kreuzer 3b9b26f912 [RTL] actctx.c: Revert GetProcessHeap -> RtlGetProcessHeap changes 2024-04-29 01:15:50 +02:00
Timo Kreuzer 9d8ea85398 [RTL] Disable an MSVC warning in wine source 2024-04-29 01:15:50 +02: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
Timo Kreuzer 701b0a3f24
[MSVCRTEX] Only include _CrtDbgReport*, if we don't already export them (#6797)
* [MSVCRTEX] Only include _CrtDbgReport*, if we don't already export them

For some reason clang builds now want the ___chkstk_ms on x64 as well, so add it.
2024-04-27 14:59:06 +03:00
Timo Kreuzer 45aa8f8111 [CRT] Remove useless #undef abort from process.h 2024-04-26 15:16:31 +02:00
Timo Kreuzer 6beff505d7 [CRT] Add _Exit to process.h
This is already done this way in our stdlib.h. It is needed by GCC 13 C++ headers. The problem happens like this:
- telnet/precomp.h includes fstream from GCC
- fstream includes pthread.h from GCC
- pthread.h includes process.h from ReactOS
- process.h defines _CRT_TERMINATE_DEFINED, but doesn't declare _Exit
- fstream includes cstdlib from GCC
- cstdlib includes stdlib.h from GCC (#include_next)
- stdlib.h doesn't declare _Exit, because _CRT_TERMINATE_DEFINED is defined
- cstdlib uses _Exit
2024-04-26 15:16:31 +02:00
Timo Kreuzer 1f49173f82 [CRT] Massively improve performance of rand_s
Cache the pointer to RtlGenRandom instead of loading and unloading advapi32 every single time this function is called.
2024-04-25 05:25:12 +02:00
Timo Kreuzer f319538d98 [CRT] Move rand_s into it's own file 2024-04-25 05:25:12 +02:00
Timo Kreuzer 0ea48e79fc [CRT] Move _invalid_parameter into its own file
As the author of the code, I changed to license to MIT.
2024-04-25 05:25:12 +02:00
Timo Kreuzer 43beb913da [CRT] Move rand to stdlib, where it belongs 2024-04-25 05:25:12 +02:00
Oleg Dubinskiy 24e088daa8
[MMEBUDDY] Implement support for looped wave playback (#6761)
Fix playing wave header multiple times in case the caller requests to do it.
In Windows, it is supported by WHDR_BEGINLOOP and WHDR_ENDLOOP flags (specified together) and dwLoops member of WAVEHDR structure (ususally set to 0xFFFFFFFF (INFINITE constant)).
- Check whenther WHDR_BEGINLOOP | WHDR_ENDLOOP flags are set by the caller.
- If they are, get the amount of times to play the header from WAVEHDR.dwLoops.
- Perform wave header competion only when the loop count is equal to zero. Otherwise, don't do it.
- When the header is entirely committed, in case completion is not needed, reset committed bytes count to the starting value to allow the header play again.
- Decrement loop count in case it isn't set to INFINITE, to mark loop as played correctly. When this count becomes zero, then the playback is finished.
- Get rid from SOUND_OVERLAPPED.PerformCompletion member. Use SOUND_DEVICE_INSTANCE.LoopsRemaining == 0 condition instead.
- Do this only for WaveOut devices, since MSDN states it works only with output buffers. Hence, there is nothing changed for WaveIn.
- Update an appropriate statement about unimplemented functionality from mmebuddy notes.
TODO: handle the case when multiple headers are requested to be looped (WHDR_BEGINLOOP and WHDR_ENDLOOP are set separatedly: 1st flag - in the 1st header, and 2nd in the last header). Currently, only looping a single wave header is supported.
This fixes the playback in the apps those request looped wave playback of some audio data (e. g., BRD Demo app, which did play its sound only first 500 ms before, now it plays endlessly until closing it manually).
CORE-10118
2024-04-24 11:08:40 +02:00
Timo Kreuzer 9229709312 [NTOS:KE/x64] Implement processor freeze code 2024-04-23 15:50:06 +02:00
Timo Kreuzer a8ece7e81a [EVTLIB] Fix size of event log record
The size is 32bit, don't read a SIZE_T. Fixes crashes of advapi32_winetest eventlog on x64.
2024-04-22 16:42:02 +02:00
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
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