Commit graph

86709 commits

Author SHA1 Message Date
Timo Kreuzer
9db517f324 [UCRT] Fix definition of _alloca for GCC/Clang 2025-01-22 18:56:08 +02:00
Timo Kreuzer
61175644d0 [UCRT] Add architecturally optimized code to build 2025-01-22 18:56:08 +02:00
Timo Kreuzer
a015b91e6b [VCRUNTIME] Fix emmintrin.h for GCC 2025-01-22 18:56:08 +02:00
Timo Kreuzer
94eb475177 [UCRT][ASM] Make asm code GCC compatible 2025-01-22 18:56:08 +02:00
Timo Kreuzer
4fec953e6e [UCRT][ASM] Rename all .asm files to .s 2025-01-22 18:56:08 +02:00
Timo Kreuzer
901cd2704c [ASM] macamd64.inc: Fix up entry point macros a bit
This is the minimal version to be compatible with GAS. Code segment and NoPad could probably be added later, but they are not strictly required.
2025-01-22 18:56:08 +02:00
Timo Kreuzer
72aed01dbd [ASM] Fix up some x86 assembly code 2025-01-22 18:56:08 +02:00
Timo Kreuzer
e2ffc35894 [UCRT] Fix/improve __crt_state_management 2025-01-22 18:56:08 +02:00
Timo Kreuzer
c2b1271dbe [UCRT] Improve __crt_seh_guarded_call
This is a workaround for an MSVC compiler bug, which would result in degraded performance. See https://developercommunity.visualstudio.com/t/_local_unwind-generated-when-returning-f/10673261?
2025-01-22 18:56:08 +02:00
Timo Kreuzer
a58b713a5e [UCRT] Properly implement __crt_fast_encode/decode_pointer 2025-01-22 18:56:08 +02:00
Timo Kreuzer
c1145f0c89 [UCRT] Properly implement parameter checking macros
Partly copied from corecrt_internal_strtox.h, partly imported from dotnet runtime (https://github.com/dotnet/runtime/blob/release/8.0/src/coreclr/pal/src/safecrt/internal.h)
2025-01-22 18:56:08 +02:00
Hermès Bélusca-Maïto
a857b28008
[NTOS:INBV] We are now past Christmas time. 2025-01-22 17:30:43 +01:00
Timo Kreuzer
85f42a25d5 [NTOS:KE/x64] Improve freeze code
- Set ACTIVE flag on freeze owner like on Windows
- Add a nice state graph
- Change license to MIT
2025-01-22 14:04:18 +02:00
Timo Kreuzer
a17d32a373 [MSHTML_WINETEST] Fix crash of mshtml_winetest:activex 2025-01-22 13:38:18 +02:00
Timo Kreuzer
6b3406e630 [URLMON] Define PROXY_CLSID_IS on the command line
Fixes crash of mshtml_winetest:htmldoc (introduced by 716613c). Please do not ask me why.
The test started crashing with commit 716613cddc "[CMAKE] Use new policies for CMP0005 and CMP0018 (#1481)", which moved this definition from the command line to urlmon_main.h. This got later removed by commit 6c3c2e33f6 "[URLMON] Sync with Wine Staging 4.18. CORE-16441"
2025-01-22 13:38:18 +02:00
Katayama Hirofumi MZ
1868985dde
[FREETYPE][NTGDI] Simplify IntGdiLoadFontsFromMemory (#7651)
Simplify code logic and reduce management cost.
JIRA issue: CORE-19973
- Add IntGdiLoadFontByIndexFromMemory helper function.
- Simplify IntGdiLoadFontsFromMemory function.
2025-01-22 11:56:41 +09:00
Katayama Hirofumi MZ
bb7cf5a5b7
[FREETYPE][FTFD][NTGDI] Split FT_Bitmap_Convert hack (#7628)
Our FT_Bitmap_Convert function had a hack to make the
bitmap image compatible to ReactOS. I think the hack on
FT_Bitmap_Convert should be separated from our font
engine.
JIRA issue: CORE-16047
- Add FT_Bitmap_Convert_ReactOS_Hack function, that is
  based on FT_Bitmap_Convert, and split the hack of
  FT_Bitmap_Convert.
- Use FT_Bitmap_Convert_ReactOS_Hack in
  IntGetBitmapGlyphWithCache function instead of
  FT_Bitmap_Convert.
- Modify ftfd.spec to add 
  FT_Bitmap_Convert_ReactOS_Hack.
2025-01-22 10:57:40 +09:00
Hermès Bélusca-Maïto
0e01cbc6cd
[NTOS:IO] IoVolumeDeviceToDosName(): Fix returned DosName buffer initialization (#6990)
The VolumePath buffer returned by IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH
contains one string stored as a multi-NUL-terminated string, whose
total length is given by its `MultiSzLength` member.

The DosName UNICODE_STRING just returns the (single) string as a normal
NUL-terminated string. So, we need to remove the two NUL-terminators
from the `MultiSzLength` count to retrieve the correct length.
2025-01-21 19:16:03 +01:00
Hermès Bélusca-Maïto
f315111bb5
[NTOS:IO] Improve some comments in IoVolumeDeviceToDosName()
Addendum to commit 5afb7ab003.
2025-01-21 19:16:02 +01:00
Hermès Bélusca-Maïto
c306a27941
[MOUNTMGR] Fix the buffer returned by IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH (#6990)
The buffer returned by MountMgrQueryDosVolumePath()
should be a multi-string containing one single string.
2025-01-21 19:16:01 +01:00
Hermès Bélusca-Maïto
8bb7cd286b
[MOUNTMGR] Fix three more bugs in MountMgrQueryDosVolumePath() (#6990)
- When trying to find a device, don't fail with STATUS_NOT_FOUND if no
  associated symbolic links are present. Instead, that test was wrong,
  and should go out of the search loop to do the drive-letter processing.

  Addendum to commit f9f5a78715.

- In addition, when using the associated-device method, fix the list
  used to retrieve the corresponding device.

- In the TryWithVolumeName: block, reset DeviceString to NULL after
  freeing, so that we can correctly fail with STATUS_NOT_FOUND if no
  suitable device was found, before initializing the output data.
2025-01-21 19:16:01 +01:00
Hermès Bélusca-Maïto
28c3533d11
[MOUNTMGR] Simplify a bit the code in MountMgrQueryDosVolumePath(s) (#6990) 2025-01-21 19:16:00 +01:00
Hermès Bélusca-Maïto
e72a9a78b0
[MOUNTMGR] Fix some other bugs (#6990)
- Use FIELD_OFFSET to correct structure and member instead of hardcoding
  sizeof-s of fields until the member of interest.

- Fix a bug in MountMgrQueryDosVolumePath() where the FIELD_OFFSET used
  in the entry structure size validation was incorrect.

  FIELD_OFFSET(MOUNTMGR_TARGET_NAME, DeviceNameLength) is == 0 since
  DeviceNameLength is the first member of the MOUNTMGR_TARGET_NAME
  structure. The intended member was DeviceName.

  Addendum to commit f9f5a78715.
2025-01-21 19:15:59 +01:00
Hermès Bélusca-Maïto
be97a36f25
[MOUNTMGR] Simplify MountMgrQueryDosVolumePath() code (#6990)
- Use a variable of correct type instead of casting every time.
- Remove one level of indentation by returning early.
2025-01-21 19:15:59 +01:00
Hermès Bélusca-Maïto
bae799382a
[KMTESTS] Improve IoVolumeDeviceToDosName() tests (#6990)
- Limit the HarddiskVolume loop to 32 trials (instead of an unknown
  number of them). Ideally the list of volumes has to be queried from
  the volume manager, instead of hardcoding them (TODO).

- Verify that the buffer returned by IoVolumeDeviceToDosName() is
  indeed a unicode multi-string (ends with two NULs), and, in the
  case it specifies a volume GUID, that it's a valid one.
2025-01-21 19:15:58 +01:00
Hermès Bélusca-Maïto
cc1deb2902
[MOUNTMGR_APITEST] Add tests for mountmgr IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH(S) (#6990)
These tests verify the output of IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATH,
IOCTL_MOUNTMGR_QUERY_DOS_VOLUME_PATHS and IOCTL_MOUNTMGR_QUERY_POINTS,
as well as their consistency.

References:
https://www.osronline.com/article.cfm%5Eid=107.htm
https://community.osr.com/t/obtaining-volume-name-with-deviceobject/15121/3
2025-01-21 19:15:57 +01:00
Hermès Bélusca-Maïto
bb264f6828
[MOUNTMGR_APITEST] Improve QueryPoints.c test (#6990)
- Use %lu instead of %lx for printf-ing last-errors;

- Don't call GetLastError() within ok, or after a previous invocation,
  when the aim is to retrieve the last-error set by a tested API.
  Instead, store its value in a local variable, that is then used in
  the ok() tests.

- Use win_skip() only for functionality that _may_ not be implemented
  in Windows/ReactOS yet, but not for unexpected situations leading to
  tests being skipped.

- Add comments; improve buffer size specifications.

- Reformat the file license header.
2025-01-21 19:15:57 +01:00
Hermès Bélusca-Maïto
2da5db933c
[MOUNTMGR_APITEST] Add utils.c for some utility functions (#6990)
And update the precompiled header.
2025-01-21 19:15:50 +01:00
Whindmar Saksit
357505e752
[PSDK] Avoid CO_E_NOTINITIALIZED macro redefinition warning (#7649)
Addendum to commit 0e88f0485c
2025-01-21 19:15:09 +01:00
Whindmar Saksit
c8b2c4c94d
[RAPPS] Check Let's Encrypt issuer prefix (#7650) 2025-01-21 13:06:55 +01:00
Doug Lyons
690643fc77
[SHELL32] SHELL_FindExecutable: Fix last regression from PR#7588 (#7643)
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
2025-01-20 19:10:04 -06:00
Katayama Hirofumi MZ
853b8ebd02
[EXPLORER] Use STDMETHODIMP and override (#7645)
Follow the standard way.
JIRA issue: CORE-19469
- Use STDMETHODIMP and override keyword
  instead of virtual HRESULT STDMETHODCALLTYPE.
- Delete CTaskBand::ProcessMessage and
  CTaskBand::ContainsWindow methods.
  I think they are useless.
2025-01-21 10:03:52 +09:00
Katayama Hirofumi MZ
56988ffbf8
[EXPLORER] Support Unicode on Start Button InvokeCommand (#7644)
Support Unicode on Start Button
context menu for international text
support.
JIRA issue: N/A
- Support Unicode in
  CStartMenuBtnCtxMenu::InvokeCommand
  method by using
  CMINVOKECOMMANDINFOEX structure.
2025-01-20 22:26:33 +09:00
Katayama Hirofumi MZ
d4f283b67b
[FREETYPE][NTGDI] Use Face->num_faces instead of ttc_header.count (#7646)
Supporting raster fonts. Using
num_faces is the generic way.
JIRA issue: CORE-16165
- Use FT_FaceRec.num_faces instead
  of TT_Face.ttc_header.count in
  counting the font faces in
  IntGdiLoadFontsFromMemory function.
2025-01-20 22:09:16 +09:00
Daniel Victor
d72864de95 [FREELDR] Fix wrong segment register at lgdt instruction in amd64.S 2025-01-20 08:34:44 +02:00
Katayama Hirofumi MZ
2186ce3d58 [SHELL32][SDK] Follow-up of #7622; LPWSTR to PWSTR etc.
And LPCWSTR to PCWSTR. CORE-19278
2025-01-20 10:12:35 +09:00
Katayama Hirofumi MZ
84607161b4
[SHELL32][SHELL32_APITEST][SDK] Implement SHGetUnreadMailCountW (#7622)
Implementing missing features...
JIRA issue: CORE-19278
- Modify shell32.spec.
- Move function definition from stubs.cpp into utils.cpp.
- Add SHELL_ReadSingleUnreadMailCount helper function.
- Add prototype to <shellapi.h>.
2025-01-20 09:51:27 +09:00
Katayama Hirofumi MZ
157e18b215
[SHELL32][SHELL32_APITEST][SDK] Implement StrRStrA/W (#7621)
Implementing missing features...
JIRA issue: CORE-19278
- Move function definitions from stubs.cpp to utils.cpp.
- Add prototypes to <undocshell.h>.
2025-01-20 08:50:26 +09:00
Katayama Hirofumi MZ
aa52c3f5eb
[SHELL32][SHELL32_APITEST][SDK] Implement SHEnumerateUnreadMailAccountsW (#7619)
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from stubs.cpp into utils.cpp.
- Add prototype to <shellapi.h>.
2025-01-20 08:32:07 +09:00
Katayama Hirofumi MZ
0bb8b46ba8 [SHELL32] Follow-up of #7620: Simplify string handling
CORE-19278
2025-01-20 08:28:58 +09:00
Whindmar Saksit
b87c6b8799
[SHELL32] Temporarily disable LVS_EX_DOUBLEBUFFER in DefView (#7642)
Hackfix for CORE-19624 and CORE-19818 until ListView is fixed
2025-01-19 23:20:34 +01:00
Whindmar Saksit
aebaa14eba
[SHELL32] Allow DnD to create shortcuts across different drives (#7607)
CORE-17871 CORE-18271
2025-01-19 21:00:55 +01:00
Katayama Hirofumi MZ
17eff53f35
[REGEDIT] Add ES_AUTOHSCROLL to address bar window (#7638)
Enable horizontal scroll on address bar.
JIRA issue: CORE-19743
- Add ES_AUTOHSCROLL style to the
  address bar window on its creation.
2025-01-20 01:01:30 +09:00
Katayama Hirofumi MZ
2da2fba042
[SHELL32][SHELL32_APITEST][SDK] Implement SHSetUnreadMailCountW (#7620)
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from
  stubs.cpp into utils.cpp.
- Add prototype to <shellapi.h>.
2025-01-19 21:26:19 +09:00
Timo Kreuzer
dc25409cbf [SPEC2DEF] Implement support for debug-only exports 2025-01-19 09:02:58 +02:00
Timo Kreuzer
93ba586ec3 [NTDLL] Make _alloca_probe(_16) private
This avoids a linker error due to a duplicated symbol in ntdll and the statically linked chkstk library. This happens when the linker first resolves _chkstk from the CRT or the chkstk library (which also pulls in _alloca_probe(_16)) and then tries to resolve _alloca_probe(_16) from ntdll.
2025-01-19 09:02:58 +02:00
Timo Kreuzer
c2c4d853c2 [EXPLORER-OLD] Fix build when _DEBUG is defined 2025-01-19 09:02:58 +02:00
Timo Kreuzer
888540c2d3 [BROWSEUI] Check if ATL windows are valid, before destroying them
Prevents ATL assertion failure.
2025-01-19 09:02:58 +02:00
Timo Kreuzer
40b45515a4 [IERNONCE] Check m_RegKey before deleting a value from it
This fixes an assert, when _DEBUG is defined.
2025-01-19 09:02:58 +02:00
Timo Kreuzer
a6a07059c1 [CRT] crtdbg.h: Add missing inttrin.h include for __debugbreak() 2025-01-19 09:02:58 +02:00