https://git.reactos.org/?p=reactos.git;a=commitdiff;h=abbe656407b7ff56d902c…
commit abbe656407b7ff56d902c3f970d618eb269b9753
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Mon Sep 7 20:32:00 2020 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Mon Sep 7 20:32:00 2020 +0200
[SDK][NDK][PSTYPES] Fix regressions CORE-17247 & CORE-17248
By reverting the guilty rev 0.4.14-dev-1239-g
7481bda679eccdf1eba3666e500074dcb966e748
and placing a C_ASSERT() to protect us from doing the
same fault again in the future. (proposed by Mark Jansen)
This will allow again to use kernel32.dll from 2k3sp2 to
reach desktop and it will allow Google Earth to run again.
Unfortunately it will break CORE-16757 again,
but we did not ship that improvement yet
and we believe that revert to be correct.
When approaching CORE-16757 later, make sure to double-check
also CORE-17247 & CORE-17248 with your fix.
We did excessive testing here, see
https://jira.reactos.org/browse/CORE-17247?focusedCommentId=125166&page=com…
---
sdk/include/ndk/pstypes.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sdk/include/ndk/pstypes.h b/sdk/include/ndk/pstypes.h
index 55839aca37a..d10199097a3 100644
--- a/sdk/include/ndk/pstypes.h
+++ b/sdk/include/ndk/pstypes.h
@@ -910,12 +910,15 @@ typedef struct _PROCESS_SESSION_INFORMATION
#endif
-typedef struct DECLSPEC_ALIGN(4) _PROCESS_PRIORITY_CLASS
+typedef struct _PROCESS_PRIORITY_CLASS
{
BOOLEAN Foreground;
UCHAR PriorityClass;
} PROCESS_PRIORITY_CLASS, *PPROCESS_PRIORITY_CLASS;
+// Compatibility with windows, see CORE-16757, CORE-17106, CORE-17247
+C_ASSERT(sizeof(PROCESS_PRIORITY_CLASS) == 2);
+
typedef struct _PROCESS_FOREGROUND_BACKGROUND
{
BOOLEAN Foreground;