https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6c1b65d7a4a4036331636…
commit 6c1b65d7a4a40363316362e12aa54b9a8ec6d4eb
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Jul 31 10:25:07 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Jul 31 10:25:07 2022 +0900
[NTUSER] Improve WINSTATION_OBJECT compatibility (#4591)
- Modify WINSTATION_OBJECT structure with inserting struct tagKL *spklList member.
- Add some C_ASSERT(offsetof(WINSTATION_OBJECT, ...) == ...);.
CORE-18252
---
win32ss/user/ntuser/winsta.h | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/win32ss/user/ntuser/winsta.h b/win32ss/user/ntuser/winsta.h
index b36aaa1ce55..2918ca510fa 100644
--- a/win32ss/user/ntuser/winsta.h
+++ b/win32ss/user/ntuser/winsta.h
@@ -11,18 +11,16 @@
#define WSS_DYING (16)
#define WSS_REALSHUTDOWN (32)
+// See also:
https://reactos.org/wiki/Techwiki:Win32k/WINDOWSTATION
typedef struct _WINSTATION_OBJECT
{
DWORD dwSessionId;
LIST_ENTRY DesktopListHead;
PRTL_ATOM_TABLE AtomTable;
- HANDLE ShellWindow;
- HANDLE ShellListView;
-
- ULONG Flags;
- struct _DESKTOP* ActiveDesktop;
+ ULONG Flags;
+ struct tagKL* spklList;
PTHREADINFO ptiClipLock;
PTHREADINFO ptiDrawingClipboard;
PWND spwndClipOpen;
@@ -40,8 +38,22 @@ typedef struct _WINSTATION_OBJECT
LUID luidUser;
PVOID psidUser;
+ /* ReactOS-specific */
+ struct _DESKTOP* ActiveDesktop;
+ HANDLE ShellWindow;
+ HANDLE ShellListView;
} WINSTATION_OBJECT, *PWINSTATION_OBJECT;
+#ifndef _WIN64
+C_ASSERT(offsetof(WINSTATION_OBJECT, Flags) == 0x10);
+C_ASSERT(offsetof(WINSTATION_OBJECT, spklList) == 0x14);
+C_ASSERT(offsetof(WINSTATION_OBJECT, ptiClipLock) == 0x18);
+C_ASSERT(offsetof(WINSTATION_OBJECT, ptiDrawingClipboard) == 0x1c);
+C_ASSERT(offsetof(WINSTATION_OBJECT, spwndClipOpen) == 0x20);
+C_ASSERT(offsetof(WINSTATION_OBJECT, spwndClipViewer) == 0x24);
+C_ASSERT(offsetof(WINSTATION_OBJECT, spwndClipOwner) == 0x28);
+#endif
+
extern WINSTATION_OBJECT *InputWindowStation;
extern HANDLE gpidLogon;
extern HWND hwndSAS;