mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
- It is understandable now why certain applications fail when accessing thread information from user mode, it is the wrong information being accessed.
svn path=/trunk/; revision=38853
This commit is contained in:
parent
f134ca1ab1
commit
1335fe7f13
2 changed files with 13 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue