Enter an SEH2_TRY one time and do all testing within it instead of entering the SEH_TRY multiple times.
The commit is an addendum to 0.4.15-dev-2734-g 514147776a
Thanks to patches author Doug-Lyons
This is 1:1 the final approved content of #3758, but I committed
by hand and closed the PR to avoid squash+rebase.
in CreateDIBPalette() when passing invalid arguments to CreateDIBSection.
This could be triggered by using the broken test-application "GDIProg".
After this patch not only the BSOD is fixed but also the app does
properly start up, like it is the case on 2k3sp2.
Thanks to the patches author Doug Lyons.
DLGWINDOWEXTRA is 30 (both on win32 and win64). This has storage for the following entries: DWLP_MSGRESULT (0), DWLP_DLGPROC (8), DWLP_USER (16)
We used to store the dialog info pointer using SetWindowLongPtr (DWLP_ROS_DIALOGINFO == DWLP_USER+sizeof(ULONG_PTR) == 24), which was fine on win32, but failed on win64, since there wasn't enough space left (24 + 8 = 32 > 30).
Rewrite the way the DLGINFO pointer is stored, by adding an additional field to the WND structure and set it using NtUserxSetDialogPointer (which is what it is for).
Also fix too small cbWndExtra for the button class.
But include registry changes and INF files depending on SARCH variable.
This commit is expected to uncover pc98vid build error on MSVC 2015.
Addendum to 8c475e4. CORE-17529
Fix Clang-Cl
'...\printerdrivers.c(97,98): warning: variable 'cbBuf' is uninitialized when used here [-Wuninitialized]'
Addendum to 62c4b82.
CORE-14306
CORE-17545
win32ss/user/winsrv/consrv/frontends/wcwidth.c:203:30: warning: result of comparison of constant 262141 with expression of type 'wchar_t' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare]
(ucs >= 0x30000 && ucs <= 0x3fffd)));
~~~ ^ ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:203:12: warning: result of comparison of constant 196608 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
(ucs >= 0x30000 && ucs <= 0x3fffd)));
~~~ ^ ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:202:30: warning: result of comparison of constant 196605 with expression of type 'wchar_t' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare]
(ucs >= 0x20000 && ucs <= 0x2fffd) ||
~~~ ^ ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:202:12: warning: result of comparison of constant 131072 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
(ucs >= 0x20000 && ucs <= 0x2fffd) ||
~~~ ^ ~~~~~~~
CORE-17545
Fix 3 warnings:
win32ss/user/winsrv/consrv/alias.c:648:16: warning: variable 'Status' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (CurEntry)
^~~~~~~~
win32ss/user/winsrv/consrv/alias.c:693:12: note: uninitialized use occurs here
return Status;
^~~~~~
win32ss/user/winsrv/consrv/alias.c:715:9: warning: variable 'Status' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (Header)
^~~~~~
win32ss/user/winsrv/consrv/alias.c:727:12: note: uninitialized use occurs here
return Status;
^~~~~~
win32ss/user/winsrv/consrv/alias.c:771:16: warning: variable 'Status' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized]
while (RootHeader)
^~~~~~~~~~
win32ss/user/winsrv/consrv/alias.c:807:12: note: uninitialized use occurs here
return Status;
It allows to properly pass the surface handle (and palette entry pointer) from MS ddraw into win32k.
Otherwise, they are passing into the wrong parameters of actual NtGdi* function, and due to this,
since they're detected as invalid, they become NULL, and that function does not work correctly.
See https://docs.microsoft.com/en-us/windows/win32/devnotes/-dxgkernel-ntgdiddgetdc for the reference
(and confirmed by our headers).
Required by MS DirectDraw stack (ddraw.dll & dxg.sys).
CORE-17561
Thanks goes to I_Kill_Bugs for the patch (and partly to Kyle Katarn for the PR) and Hermes for tweaking the patch code. Had to make a commit myself as the PR author's account is deleted.
Signed-off by: I_Kill_Bugs (original patch author)
Signed-off by: Kyle Katarn <contact@kcsoftwares.com>
Signed-off by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>