Commit Graph

86248 Commits

Author SHA1 Message Date
Timo Kreuzer
201f00ab6f [USER32][NTUSER] Implement (NtUser)SetClassLongPtr(A/W) 2024-09-15 12:09:09 +03:00
Timo Kreuzer
53b304e6a9 [SDK] Add unaligned.h header for safely accessing unaligned variables
This supersedes RtlStoreUshort/RtlRetrieveUshort etc, which have a horrible interface and are inherently unsafe.
2024-09-15 12:09:09 +03:00
Timo Kreuzer
a0bbb9ef99 [XDK] Improve unaligned pointer read macros
- The #if was missing x86 (Windows SDK bug!)
- The unaligned attribute was on the wrong side (Windows SDK bug!)
- Add a comment that these are unsafe and shouldn't be used
2024-09-15 12:09:09 +03:00
Hermès Bélusca-Maïto
2af6fd4def
[PSDK] Add GetMenuPosFromID() declaration in shlwapi.h
This function is exported from shlwapi.dll since version 4.71.
It has been publicly documented in MS PSDK and MSDN since at least
Windows XP/2003 and claimed to be declared in shlwapi.h; however,
this is inaccurate: it has been declared only starting Vista PSDK.
2024-09-14 23:05:53 +02:00
Hermès Bélusca-Maïto
144a8b5b84
[SHELL32][SDK] Move SHMenuIndexFromID() definition to shlwapi_undoc.h 2024-09-14 23:05:52 +02:00
Hermès Bélusca-Maïto
4ba56962e6
[APPWIZ] NewLinkHereA(): Just call NewLinkHereW after the UNICODE conversion. 2024-09-14 23:05:51 +02:00
Timo Kreuzer
d9a287e9a5 [FASTFAT] Use debug bitmap
This is to figure out, whether the bitmap gets corrupted or if there is something else going on.
2024-09-14 20:15:07 +03:00
Timo Kreuzer
8f4acea874 [SDK] Implement RTL debug bitmap
This is a single header that wraps around the RTL bitmap API. It keeps track of the number of set bits and a hash of the bitmap. The integrity of the bitmap is checked on each call to any of the RTL bitmap APIs. This only works, if the bitmap is consistently modified using only RTL bitmap APIs and not manually messing with the bitmap buffer.
2024-09-14 20:15:07 +03:00
Timo Kreuzer
b5531f5126 [XDK] Add RtlFindNextForwardRunSet for wdm.h
Windows DDK doesn't have it, but I think it won't hurt to have it.
2024-09-14 20:15:07 +03:00
Whindmar Saksit
7b081be46d
[SHELL32][MKSHELLLINK] Support EXP_SPECIAL_FOLDER datablock in shortcuts (#7158)
CORE-19692
2024-09-14 13:10:49 +02:00
Whindmar Saksit
751641c2be
[SHELL32][COMCTL32][BROWSEUI][EXPLORER] Update color usage on WM_SYSCOLORCHANGE (#7325) 2024-09-14 13:07:11 +02:00
Laura Konopinska
e2fc578f6d [FREELDR] Support drives with 4k sector size
PR was reviewed at pull/5784
2024-09-12 20:53:10 -07:00
Whindmar Saksit
bad0dd5991
[SHELL32] Store target FS attributes in .lnk header (#7302) 2024-09-12 19:28:15 +02:00
Thomas Faber
44bdafa17e [KMTESTS:SE] Fix failing tests. 2024-09-12 17:44:13 +03:00
Thomas Faber
bf6af0f52e [NTOS:SE] Mark output parameters as such. 2024-09-12 17:44:13 +03:00
Thomas Faber
156053cafd [NDK] Match AUX_ACCESS_DATA definition with publicly available version.
Looks like public symbols contain this structure starting with Win7,
so we can deduce what it looked like in Win2003.
Note that our previous definition was missing a second ULONG at the
end, which can be seen in the SeQueryInfoToken kmtest -- if you
allocated only sizeof(AUX_ACCESS_DATA), the test would crash with
a 4 byte buffer overflow.
2024-09-12 17:44:13 +03:00
Thomas Faber
ff410211e9 [KMTESTS:SE] Don't modify internal data structure, this might cause buffer overrun. 2024-09-12 17:44:13 +03:00
Thomas Faber
206df96bc4 [KMTESTS:SE] Correctly allocate PrivilegeSet buffers. 2024-09-12 17:44:13 +03:00
Thomas Faber
64a6bd4c3e [KMTESTS:SE] Avoid use of uninitialized pool and hardcoded offsets. 2024-09-12 17:44:13 +03:00
Timo Kreuzer
2913ef5c93 [NTOS:KE/x64] Fix exception information on page faults
Pass a proper write/execute flag in the ExceptionInformation[0] field of the exception record instead of the raw fault code. This fixes comdlg:filedlg wine test, which writes to a write protected resource section, which needs to be handled by kernel32 UnhandledExceptionFilter, which relies on this parameter to be correct.
2024-09-12 17:07:59 +03:00
Timo Kreuzer
5eab2ddb2e [RTL/x64] Do not overwrite the original context during exception handling
This fixes ExceptionContinueExecution cases, where we want to continue execution on the original context (or as modified by the handler), not on some halfway unwinded one.
2024-09-12 17:07:59 +03:00
Timo Kreuzer
402bc38ba7 [NTGDI] Rewrite NtGdiPolyDraw
It is now a wrapper around GdiPolyDraw, which implements the main body of the function, while the Nt function only probes and captures the user mode data into safe kernel mode buffers.
Previously some people thought it was a great idea to just wrap the entire implementation in SEH, so when something throws an exception somewhere for whatever reason, we can just catch it here... and LEAK ALL RESOURCES IN THE PROCESS!
TODO: Rewrite all of this. It's broken everywhere.
2024-09-12 15:52:30 +03:00
Andrei Miloiu
02a6913590
[SERIALUI] Update Romanian (ro-RO) translation (#7341) 2024-09-12 00:14:10 +02:00
Joachim Henze
cf26321e3b
[DESK] *.rc: Strip ", 0, 0" from the only font-line which is doing that (#7337)
Each language had exactly one dlg which specified its font like that.
All other dialogs didn't use that style.

This doesn't fix anything. It also doesn't shrink the binary.
It just saves a few keystrokes in the rc's.
Shorter is better. Pure janitorial.
2024-09-11 00:35:50 +02:00
Joachim Henze
a44192dc98 [SDK] Raise KERNEL_VERSION_PATCH_LEVEL to 16 in the version.cmake
0.4.16-dev starts here.
2024-09-10 20:01:25 +02:00
Hermès Bélusca-Maïto
0604640c14
[DESK][STOBJECT] Minor UI fixes.
- Fix "icone" typo in French (must be "icône");
- Add missing trailing semicolons for options introducing a choice;
- Tweak the IDC_EFFAPPEARANCE_KEYBOARDCUES translation to make it
  a little bit shorter and allowing to reduce the dialog a bit more
  (not yet "perfect" but towards the goal).
2024-09-10 19:53:28 +02:00
Hermès Bélusca-Maïto
0293d0c597
[SHELL32] CDefView.cpp: fix MSVC build warning C5208
"unnamed class used in typedef name cannot declare members other than
non-static data members, member enumerations, or member classes."

Suggestion by Whindmar Saksit.

Use `struct LISTVIEW_SORT_INFO` instead of the typedef, since this
is a structure defined and used only in this file, and we don't use
pointers to it (LPLISTVIEW_SORT_INFO).
2024-09-10 15:12:10 +02:00
Joachim Henze
945e856031
[DESK] _countof and rc-trivia (#7298)
- use _countof() consistently throughout the module instead of mixed ARRAYSIZE/countof.

In *.rc:
- the 3 AUTORADIOBUTTONS should not end with dots. In Windows 2k3sp2 ARB do never end with dots, I double-checked that here also in desk.cpl
- all 3 ARB should have an accel. I added the german ones, and added FIXMEs where I didn't know the correct accels
- the GROUPBOX IDC_SCREENS_DUMMY2 should not have an accel, but the only button in there PUSHBUTTON IDC_SCREENS_POWER_BUTTON should have an accel. This fixes a few existing accel collisions, e.g. in nl-NL.rc
- add a few additional FIXMEs for missing accels where I stumbled over them (most of them I fixed by guessing in the older branches, but I think it makes sense to let the actual native speakers fix them with the same accel that would be used in the 2k3sp2-version of *their* language)
- ro-RO.rc: Fix the forbidden characters according to the romanian-translation-rules

I noticed those glitches while porting back stuff, and acted on the FIXMEs in the backport instead of just fingerpointing to them (what I did on master).
2024-09-10 01:46:08 +02:00
Timo Kreuzer
7774a249ba [WIN32K:ENG] Fix return value in EngAlphaBlend 2024-09-09 22:16:00 +03:00
Stanislav Motylkov
c4f42b5a65 [UXTHEME] DrawNCPreview: Use DrawThemeTextEx() for drawing "Window Text"
Addendum to 118869f69 and d4dc0cb54. CORE-5991
2024-09-09 15:26:54 +03:00
Ethan Rodensky
d4dc0cb545 [UXTHEME] Import DrawThemeTextEx() function from Wine (part of #6622)
This is a Vista+ function, but it exists in Windows XP/2003 internally
and used for drawing "Window Text" with a shadow in DrawNCPreview().

And DrawThemeText() now acts as wrapper on top of it. CORE-5991
2024-09-09 15:26:40 +03:00
Whindmar Saksit
bc8c7d185d
[SHELL32] Fix CRecycleBin crash caused by PR #7173 (#7330)
PR #7173 (22b913928f) fails to initialize the DELETED_FILE_RECORD struct when constructing a RecycleBin5File instance. This causes _ILCreateRecycleItem to create PIDLs without filenames and the CRecycleBin IShellFolder does not expect this to happen.

Also fixes incorrect usage of SHFileOperationW when restoring deleted files. The previous code might have worked by chance in the past if the string just happened to be double-null terminated as required by this API!
2024-09-08 22:08:15 +02:00
Oleg Dubinskiy
5d44157452 [ELF] Remove remnant elf-powerpc.h header
Addendum to 6ef6fabfc5, e372f2b19b and c020a0ca28. It was forgotten to be removed in those commits.
2024-09-08 21:50:24 +02:00
Oleg Dubinskiy
c020a0ca28 [NDK] Remove remnant PowerPC headers
Remove remaining ketypes.h and mmtypes.h public headers for PowerPC architecture.
Addendum to 6ef6fabfc5 and e372f2b19b. These headers were forgotten to be removed in those previous commits.
2024-09-08 20:59:55 +02:00
Stanislav Motylkov
9dae161631 [UXTHEME] DrawNCPreview: Do not draw the icon for inactive/active windows
This is how preview works in Windows. Addendum to 118869f69. CORE-5991
2024-09-08 21:34:23 +03:00
Stanislav Motylkov
3bda42114a [UXTHEME] Draw message box background properly in DrawNCPreview
Addendum to 118869f69. CORE-19592 CORE-5991
2024-09-08 21:34:18 +03:00
Hermès Bélusca-Maïto
c1e642fdb5
Revert "[SHELL32] Show Product version on About dialog bmp (#3621)" (#7327)
This reverts commit 2636cff09f
by Cătălin Gabriel Drăghiță (@jeffbox12) as well as any subsequent changes.

This was agreed upon by the original author on our official Mattermost
chat (chat.reactos.org)

The reactos.bmp banners are again generated from the file:
  dll/win32/msgina/resources/svg/reactos.svg
2024-09-08 14:55:47 +02:00
Whindmar Saksit
d9afe73de4
[NOTEPAD] Display error code if no error string is available (#7319) 2024-09-08 13:47:32 +02:00
Whindmar Saksit
da26ec3465
[NOTEPAD] Don't handle main window accelerators in Find dialog (#7320) 2024-09-08 13:45:51 +02:00
Splitwirez
3fa740aa81
[SHELL32] Revise "Desktop" icon (#7312)
Makes the "Desktop" icon look a bit more than the thing from Windows 7. Both: bottom-most right-most within the taskbar, and also used within the comdlg32 file-open-dialog.

* Update desktop icon (35) in shell32

* Fix SVGs
2024-09-08 13:10:05 +02:00
Katayama Hirofumi MZ
8bba3c4333
[COMDLG32] ChooseColor: Apply DarkShadow44's suggestions (#6971)
Co-authored-by: Fabian Maurer <dark.shadow4@web.de>

Based on @DarkShadow44's merge
request to WineHQ.
JIRA issue: CORE-19402
Merge Request: https://gitlab.winehq.org/wine/wine/-/merge_requests/5756

Proposed changes
Extend CC_CheckDigitsInEdit's
parameters and set infoPtr->updating
to TRUE when updating.
Call CC_PaintLumBar function in
CC_WMCommand function.
2024-09-08 16:59:28 +09:00
Timo Kreuzer
78e94a5083 [NTOS:MM] Increase x64 system view and session view size
We have plenty of address space and the desktop heap has grown, so we need some more space.
2024-09-08 10:33:55 +03:00
Serge Gautherie
4b051b914f
[NTOS:PO] Update a comment (#6443)
Addendum to 9e43518 (0.4.15-dev-7560).
2024-09-08 02:29:37 +02:00
Timo Kreuzer
9414fb6b59 [NTGDI] Prevent NULL pointer dereference in CLIPPING_UpdateGCRegion
This can happen, when the paged pool is full. This will probably cause drawing issues, but at least we don't crash (in this place).
2024-09-08 03:20:52 +03:00
Tibor Lajos Füzi
299e4305ef
[KEYBOARD] Fix left key code in extended_key_names in several layouts (#7311)
I found this bug while testing random games, the left key didn't work.
After switching to other keyboard layouts (German, English) the problem
disappeared. There are games (e.g. Doom 3 demo, Tomb Raider 2 demo) that
somehow use this code from extended_key_names to determine which key the
user pressed. It might be a good idea to check other keyboard layouts too,
since I found that table inconsistent across languages.
2024-09-08 02:32:27 +03:00
Timo Kreuzer
b385fc5985 [NTUSER] Fix a 64 bit bug in timer code
The return value of RtlFindClearBitsAndSet is an ULONG, assigning it to an ULONG_PTR will not sign extend it. The error value will stay 0xFFFFFFFF. Comparing it to (UINT_PTR)-1 will sign extend and thus compare it to 0xFFFFFFFFFFFFFFFF on x64.
Also use NUM_WINDOW_LESS_TIMERS to initialize the bitmap, rather than the calculated size. This does not make a difference with the current value (32768), but if it was not the case, the bitmap would be larger than this, resulting in invalid bitmap indices being returned, which would cause bugs later on. Finally remove an ASSERT that can be triggered by tests.
2024-09-08 01:52:50 +03:00
Ethem De Santa
8351fbf04f
[EXPLORER] Update Turkish (tr-TR) translation (#7301)
Translated the old English explorer shell lines into Turkish and fixed
some incorrect Turkish translations.

Adapted the translation from Windows 7 with Turkish locale.
2024-09-08 01:43:04 +03:00
Ethem De Santa
0ff8271cd5
[UXTHEME] Add Turkish (tr-TR) translation (#7307)
Matches Turkish translation in the desk.cpl applet, except one string
that I borrowed from Windows 7 with Turkish localization.

Updated the latter in desk.cpl as well.
2024-09-07 19:36:27 +03:00
Timo Kreuzer
6ca6088f2c [NTUSER] Increase desktop heap size
Distinguish between the following 3 scenarios:
1. Interactive Winsta0, "Winlogon" desktop: use 128 KB
2. Interactive Winsta0, "Default" & other desktop: use 3 MB (x86) / 20 MB (x64)
3. Non-interactive winsta: use 128 KB

This is what Windows 2003 uses for the interactive desktops on x86 and what Windows 7 uses for x64. Fixes desktop heap exhaustion during testing. The previous value was 512 KB for all desktops.
It doesn't handle the even smaller "Disconnected" desktop, which is only meaningful for RDP sessions and we don't use it anyway.
See comments in the file for references.
2024-09-07 18:47:49 +03:00
Doug Lyons
bc76250bd8
[COMCTL32] Fix edit control cursor positioning (#7317)
Fix caret positioning regression from Wine Sync to Wine 5.0 affecting notepad.
Restore older Wine code that handles caret position with ReactOS better.
This was a regression from 0.4.15-dev-8612-g0707475 0707475f69

CORE-19731
2024-09-06 08:25:40 -05:00