reactos/win32ss/user/ntuser
Joachim Henze 4ea9a8a667 [0.4.10][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907
The main motivation to port all that back is to get rid of Win32K-BSODs 0x50 like CORE-13907
that could be triggered by user-mode-applications.
Technical reason was CORE-14857 "RtlImageNtHeaderEx needs SEH" and issues with hooks+callbacks.
All other tickets mentioned in here were regressions that we experienced on the long
journey towards perfecting the fixes on master head, and those were not happening yet in the older builds,
so they are mentioned in here only to allow tracking where that code went into.

Thanks to Jim Tabor, Mark Jansen & Thomas Faber
By squashed backmerge of the following commits:
0.4.15-dev-3440-g a89844f740
0.4.15-dev-3430-g 9cff384c22
0.4.14-dev-1287-g 568b6d0558
0.4.14-dev-1255-g 177ae91bf6
0.4.14-dev-1241-g 915a5764a9
0.4.14-dev-1240-g d8add40e89
0.4.14-dev-1002-g feb7df42b4

JIRA-tickets: CORE-13907, CORE-16769, CORE-14857, CORE-17856, CORE-17857, partially CORE-13019.
We also had some more dupes of CORE-13907 in JIRA, but I linked all of them (transitively)
towards the initial report, and resolved them without setting a fixVer for them.

In more detail:
--------------
[USER32] Fix BSOD 0x50 in 'WineVDM + Castle Of Winds' CORE-17856 CORE-17857

CORE-17856 BSOD 0x50 when starting Castle of the Winds second time, with WineVDM
CORE-17857 BSOD 0x50 on shutdown after closing Castle of the Winds with WineVDM

0.4.15-dev-3430-g 9cff384c22
0.4.15-dev-3440-g a89844f740
--------------
[NTUSER] Fix Strings and Format to Hooks

Allocate heap instead of data segment to be used for callbacks on user side.
Move and correct initial hook call out setup. Use it in more than one hook call.

This fixes issues with strings out of alignment and use of kernel pointers.

See CORE-13907 (HXD-portable BSOD) and CORE-16769 (HXD-portable exception)

Small wow update.

cherry picked from commit 0.4.14-dev-1287-g 568b6d0558
--------------
[RTL] Introduce RtlpImageNtHeader,
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857

cherry picked from commit 0.4.14-dev-1255-g 177ae91bf6
--------------
[WIN32SS] Form Sanity to Hook Callbacks

Fix WH_CALLWNDPROC/RET data to user hook calls.
Helps with CORE-13907 "(HXD-portable BSOD)"
Fixes the logging of "(win32ss/user/ntuser/callback.c:748) err: Failure to make Callback! Status 0xc00000fd" within CORE-13019, but not the whole ticket.

cherry picked from commit 0.4.14-dev-1241-g 915a5764a9
--------------
[USER32] Fix null return.

See CORE-16769 "HxD 1.7.7.0 portable unhandled exception"

cherry picked from commit 0.4.14-dev-1240-g d8add40e89
--------------
[WIN32SS] Fix a typo in dbg print

cherry picked from commit 0.4.14-dev-1002-g feb7df42b4
2022-03-17 14:01:19 +01:00
..
misc [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
accelerator.c
accelerator.h
callback.c [0.4.10][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907 2022-03-17 14:01:19 +01:00
callback.h [0.4.10][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907 2022-03-17 14:01:19 +01:00
callproc.c
caret.c
caret.h
class.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
class.h
clipboard.c [0.4.10][WIN32SS] Fix BSOD 0x1E nullptr deref via Git-bash CORE-16586 2021-01-16 14:24:29 +01:00
clipboard.h
console.c
csr.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
csr.h
cursoricon.c [REACTOS] Improve/Fix some "printf" formats (#555) 2018-05-30 14:18:23 +02:00
cursoricon.h
dce.h
dde.c
defwnd.c [0.4.10][WIN32SS] Fix last user visible parts of regression CORE-10855 2020-11-09 23:16:59 +01:00
desktop.c [WIN32K:NTUSER] For processes that start without any window station and no desktops but manage these (e.g. winlogon.exe), assign their startup desktop when they assign a desktop to one of their threads. 2018-08-19 22:18:41 +02:00
desktop.h [WIN32K:NTUSER] Make NtUserResolveDesktop() and IntResolveDesktop() work in a more Win2k3-compatible manner. 2018-08-19 22:18:37 +02:00
display.c [0.4.10][WIN32SS] Fix many regressions of fullscreen switching, all caused by SVN r75407 2020-10-07 02:42:39 +02:00
draw.c [0.4.10][WIN32SS] Fix Mask for Draw Frame States CORE-8808 2022-01-30 22:49:08 +01:00
event.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
focus.c [0.4.10][WIN32SS] Improve many apps not starting with active taskbar pane (#2396) 2020-12-19 20:48:19 +01:00
focus.h
guicheck.c
guicheck.h
hook.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
hook.h [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
hotkey.c
hotkey.h
ime.c
input.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
input.h
kbdlayout.c [NDK] Replace the SYSTEMTIME fields StandardDate and DaylightDate in RTL_TIME_ZONE_INFORMATION by TIME_FIELDs and fix resulting errors 2018-05-31 17:48:29 +02:00
keyboard.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
layered.c
main.c [0.4.10][NTUSER] Fix regression CORE-11828 2020-10-11 23:45:48 +02:00
menu.c [0.4.10][NTUSER][USER32] Tracking menu CORE-17338 (#4048), [EXPLORER] Send WM_POPUPSYSTEMMENU asynchronously (#4047) CORE-16353 2022-01-10 07:17:39 +01:00
menu.h
message.c [0.4.10][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907 2022-03-17 14:01:19 +01:00
metric.c
misc.c [0.4.10][WIN32SS] Remove an ambiguous assert entirely CORE-16738 2022-02-05 01:57:47 +01:00
mmcopy.h
monitor.c
monitor.h
mouse.c [WIN32K] Check if the window being destroyed is currently tracked. (#103) 2017-11-04 15:00:54 +01:00
msgqueue.c [0.4.10][USER32][NTUSER][3DTEXT] Squashed backport 2022-02-08 13:04:25 +01:00
msgqueue.h
nonclient.c [0.4.10][WIN32K:NTUSER] Avoid dereferencing a null pointer in NC_DoNCPaint. 2020-10-12 23:03:10 +02:00
ntstubs.c [0.4.10][WIN32K][NTUSER] Tiny codestyle fix to NtUserLockWindowUpdate (#1066) 2020-12-21 10:12:21 +01:00
ntuser.c [NTDLL][NTUSER][SPOOLSS][WINSPOOL] Add some missing VOIDs. CORE-11799 (#94) 2017-10-28 13:46:11 +01:00
ntuser.h [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
object.c [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
object.h
painting.c [WIN32SS][FONT] Fix font metrics (#713) 2018-08-12 15:12:13 +02:00
painting.h
prop.c
prop.h
scroll.h
scrollbar.c [0.4.10][WIN32SS] Fix scrollbar bug CORE-15557 & CORE-13986 2020-12-01 16:43:09 +01:00
scrollex.c
session.c
shutdown.c [WIN32K:NTUSER] Add an extra optional "Process" parameter to the GetProcessLuid() function to be used alternatively in place of "Thread" to retrieve the LUID. 2018-08-19 22:18:30 +02:00
shutdown.h
simplecall.c [0.4.10][WIN32SS] Fix regression CORE-15165 LMarbles Installer 2021-01-03 18:19:18 +01:00
sysparams.c [WIN32K:NTUSER] Code style fixes only. 2018-08-19 22:18:36 +02:00
sysparams.h [WIN32K][DESK.CPL]: Add fit and fill background placement options (#28) 2017-10-13 21:44:02 +02:00
tags.h
timer.c
timer.h
useratom.c
useratom.h
userfuncs.h [WIN32K:NTUSER] Similarly to what was done in USERSRV for harderrors, introduce the _scwprintf() helper function based on the imported _vscwprintf(). 2018-08-19 22:18:34 +02:00
usrheap.c
usrheap.h
vis.c
vis.h
win32.h [WIN32K] Fix 64 bit issues (#420) 2018-03-18 15:53:52 +01:00
win32kdebug.h [0.4.10] Avoid regression CORE-14839 2018-08-23 22:02:44 +02:00
windc.c
window.c [0.4.10][WIN32SS][RTL] Fix regression CORE-16769 + BSOD 0x50 CORE-13907 2022-03-17 14:01:19 +01:00
window.h [USER32][WIN32SS] Fix display of owned popup windows (#683) 2018-07-13 16:03:45 +02:00
winpos.c [0.4.10][COMCTL32][WIN32SS] Fix multiple scrollbar redraw issues 2020-12-20 06:41:12 +01:00
winpos.h
winsta.c [WIN32K:NTUSER] In UserSetProcessWindowStation(), use a duplicated window station handle to be set in the EPROCESS:Win32WindowStation cache. 2018-08-19 22:18:42 +02:00
winsta.h [WIN32K:NTUSER] Fixes for NtUserCreateWindowStation(), IntCreateWindowStation() and NtUserOpenWindowStation(). 2018-08-19 22:18:35 +02:00