[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
This commit is contained in:
Katayama Hirofumi MZ 2022-07-31 10:25:07 +09:00 committed by GitHub
parent 23ecbb3ed5
commit 6c1b65d7a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;