Author: fireball Date: Sun Sep 16 21:37:41 2007 New Revision: 29069
URL: http://svn.reactos.org/svn/reactos?rev=29069&view=rev Log: - Move W32CLTINFO_TEB structure out of NDK, since it's module-internal structure. - Add a define for easier accessing this field.
Modified: trunk/reactos/include/ndk/pstypes.h trunk/reactos/subsystems/win32/win32k/include/misc.h trunk/reactos/subsystems/win32/win32k/ntuser/callback.c
Modified: trunk/reactos/include/ndk/pstypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/pstypes.h (original) +++ trunk/reactos/include/ndk/pstypes.h Sun Sep 16 21:37:41 2007 @@ -675,21 +675,6 @@ } 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 // typedef struct _INITIAL_TEB @@ -748,7 +733,7 @@ ULONG GdiClientPID; ULONG GdiClientTID; PVOID GdiThreadLocalInfo; - W32CLTINFO_TEB Win32ClientInfo; + ULONG Win32ClientInfo[62]; PVOID glDispatchTable[0xE9]; ULONG glReserved1[0x1D]; PVOID glReserved2;
Modified: trunk/reactos/subsystems/win32/win32k/include/misc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/misc.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/misc.h Sun Sep 16 21:37:41 2007 @@ -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 */
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/callback.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/callback.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/callback.c Sun Sep 16 21:37:41 2007 @@ -116,22 +116,22 @@ { HWND hWndS = *hWnd; PWINDOW_OBJECT Window = UserGetWindowObject(*hWnd); - PTEB Teb = NtCurrentTeb(); - - *hWnd = Teb->Win32ClientInfo.hWND; - *pWnd = Teb->Win32ClientInfo.pvWND; - - Teb->Win32ClientInfo.hWND = hWndS; - Teb->Win32ClientInfo.pvWND = (PVOID) Window; + PW32CLTINFO_TEB ClientInfo = GetWin32ClientInfo(); + + *hWnd = ClientInfo->hWND; + *pWnd = ClientInfo->pvWND; + + ClientInfo->hWND = hWndS; + ClientInfo->pvWND = (PVOID) Window; }
static VOID IntRestoreTebWndCallback (HWND hWnd, PVOID pWnd) { - PTEB Teb = NtCurrentTeb(); - - Teb->Win32ClientInfo.hWND = hWnd; - Teb->Win32ClientInfo.pvWND = pWnd; + PW32CLTINFO_TEB ClientInfo = GetWin32ClientInfo(); + + ClientInfo->hWND = hWnd; + ClientInfo->pvWND = pWnd; }
/* FUNCTIONS *****************************************************************/