- It is understandable now why certain applications fail when accessing thread inform...
authorJames Tabor <james.tabor@reactos.org>
Sat, 17 Jan 2009 21:14:52 +0000 (21:14 +0000)
committerJames Tabor <james.tabor@reactos.org>
Sat, 17 Jan 2009 21:14:52 +0000 (21:14 +0000)
svn path=/trunk/; revision=38853

reactos/subsystems/win32/win32k/include/win32.h
reactos/subsystems/win32/win32k/ntuser/misc.c

index e19dbcc..e33ac6d 100644 (file)
@@ -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 _W32THREAD
 
 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;
index a124f0c..d9103b2 100644 (file)
@@ -505,6 +505,7 @@ GetW32ThreadInfo(VOID)
             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 @@ GetW32ThreadInfo(VOID)
             /* update the TEB */
             Teb = NtCurrentTeb();
             ci = GetWin32ClientInfo();
+            W32Thread->pClientInfo = ci;
             _SEH2_TRY
             {
                 ProbeForWrite(Teb,