From ab5811a5129fa63754d74dd40b3ac1726f79075c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sun, 16 Sep 2007 17:37:41 +0000 Subject: [PATCH] - Move W32CLTINFO_TEB structure out of NDK, since it's module-internal structure. - Add a define for easier accessing this field. svn path=/trunk/; revision=29069 --- reactos/include/ndk/pstypes.h | 17 +---------------- reactos/subsystems/win32/win32k/include/misc.h | 14 ++++++++++++++ .../subsystems/win32/win32k/ntuser/callback.c | 16 ++++++++-------- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/reactos/include/ndk/pstypes.h b/reactos/include/ndk/pstypes.h index 427b139cd19..c586c29f352 100644 --- a/reactos/include/ndk/pstypes.h +++ b/reactos/include/ndk/pstypes.h @@ -674,21 +674,6 @@ typedef struct _GDI_TEB_BATCH ULONG Buffer[0x136]; } GDI_TEB_BATCH, *PGDI_TEB_BATCH; -// -// Window Client Information structure -// -typedef struct _W32CLTINFO_TEB -{ - ULONG Win32ClientInfo0[2]; - ULONG ulWindowsVersion; - ULONG ulAppCompatFlags; - ULONG ulAppCompatFlags2; - ULONG Win32ClientInfo1[5]; - HWND hWND; - PVOID pvWND; - ULONG Win32ClientInfo2[50]; -} W32CLTINFO_TEB, *PW32CLTINFO_TEB; - // // Initial TEB // @@ -748,7 +733,7 @@ typedef struct _TEB ULONG GdiClientPID; ULONG GdiClientTID; PVOID GdiThreadLocalInfo; - W32CLTINFO_TEB Win32ClientInfo; + ULONG Win32ClientInfo[62]; PVOID glDispatchTable[0xE9]; ULONG glReserved1[0x1D]; PVOID glReserved2; diff --git a/reactos/subsystems/win32/win32k/include/misc.h b/reactos/subsystems/win32/win32k/include/misc.h index 4a76cfd2a3f..195d06c2a11 100644 --- a/reactos/subsystems/win32/win32k/include/misc.h +++ b/reactos/subsystems/win32/win32k/include/misc.h @@ -8,5 +8,19 @@ ULONG FASTCALL IntSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni); +/* Window Client Information structure */ +typedef struct _W32CLTINFO_TEB +{ + ULONG Win32ClientInfo0[2]; + ULONG ulWindowsVersion; + ULONG ulAppCompatFlags; + ULONG ulAppCompatFlags2; + ULONG Win32ClientInfo1[5]; + HWND hWND; + PVOID pvWND; + ULONG Win32ClientInfo2[50]; +} W32CLTINFO_TEB, *PW32CLTINFO_TEB; + +#define GetWin32ClientInfo() (PW32CLTINFO_TEB)(NtCurrentTeb()->Win32ClientInfo) #endif /* __WIN32K_MISC_H */ diff --git a/reactos/subsystems/win32/win32k/ntuser/callback.c b/reactos/subsystems/win32/win32k/ntuser/callback.c index c0e86dc8156..b369a4728a0 100644 --- a/reactos/subsystems/win32/win32k/ntuser/callback.c +++ b/reactos/subsystems/win32/win32k/ntuser/callback.c @@ -116,22 +116,22 @@ IntSetTebWndCallback (HWND * hWnd, PVOID * pWnd) { HWND hWndS = *hWnd; PWINDOW_OBJECT Window = UserGetWindowObject(*hWnd); - PTEB Teb = NtCurrentTeb(); + PW32CLTINFO_TEB ClientInfo = GetWin32ClientInfo(); - *hWnd = Teb->Win32ClientInfo.hWND; - *pWnd = Teb->Win32ClientInfo.pvWND; + *hWnd = ClientInfo->hWND; + *pWnd = ClientInfo->pvWND; - Teb->Win32ClientInfo.hWND = hWndS; - Teb->Win32ClientInfo.pvWND = (PVOID) Window; + ClientInfo->hWND = hWndS; + ClientInfo->pvWND = (PVOID) Window; } static VOID IntRestoreTebWndCallback (HWND hWnd, PVOID pWnd) { - PTEB Teb = NtCurrentTeb(); + PW32CLTINFO_TEB ClientInfo = GetWin32ClientInfo(); - Teb->Win32ClientInfo.hWND = hWnd; - Teb->Win32ClientInfo.pvWND = pWnd; + ClientInfo->hWND = hWnd; + ClientInfo->pvWND = pWnd; } /* FUNCTIONS *****************************************************************/