Author: jimtabor Date: Sat Jan 17 15:14:52 2009 New Revision: 38853
URL: http://svn.reactos.org/svn/reactos?rev=38853&view=rev Log: - It is understandable now why certain applications fail when accessing thread information from user mode, it is the wrong information being accessed.
Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h trunk/reactos/subsystems/win32/win32k/ntuser/misc.c
Modified: trunk/reactos/subsystems/win32/win32k/include/win32.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/inc... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/win32.h [iso-8859-1] Sat Jan 17 15:14:52 2009 @@ -4,7 +4,7 @@ typedef struct _WIN32HEAP WIN32HEAP, *PWIN32HEAP;
#include <pshpack1.h> - +// FIXME! Move to ntuser.h typedef struct _TL { struct _TL* next; @@ -28,17 +28,19 @@
typedef struct _THREADINFO { - W32THREAD W32Thread; - PVOID ppi; // FIXME: use PPROCESSINFO - PDESKTOPINFO pDeskInfo; - PCLIENTINFO pClientInfo; - LIST_ENTRY PtiLink; + W32THREAD W32Thread; + PTL ptl; + PVOID ppi; // FIXME: use PPROCESSINFO + struct _USER_MESSAGE_QUEUE* MessageQueue; + struct _KBL* KeyboardLayout; + PCLIENTTHREADINFO pcti; + struct _DESKTOP* Desktop; + PDESKTOPINFO pDeskInfo; + PCLIENTINFO pClientInfo; + LIST_ENTRY PtiLink;
- struct _USER_MESSAGE_QUEUE* MessageQueue; LIST_ENTRY WindowListHead; LIST_ENTRY W32CallbackListHead; - struct _KBL* KeyboardLayout; - struct _DESKTOP* Desktop; HANDLE hDesktop; BOOLEAN IsExiting; SINGLE_LIST_ENTRY ReferencesList;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c [iso-8859-1] Sat Jan 17 15:14:52 2009 @@ -505,6 +505,7 @@ ti->kpi = GetW32ProcessInfo(); ti->pi = UserHeapAddressToUser(ti->kpi); ti->Hooks = W32Thread->Hooks; + W32Thread->pcti = &ti->ClientThreadInfo; if (W32Thread->Desktop != NULL) { ti->Desktop = W32Thread->Desktop->DesktopInfo; @@ -518,6 +519,7 @@ /* update the TEB */ Teb = NtCurrentTeb(); ci = GetWin32ClientInfo(); + W32Thread->pClientInfo = ci; _SEH2_TRY { ProbeForWrite(Teb,