mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +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;
|
typedef struct _WIN32HEAP WIN32HEAP, *PWIN32HEAP;
|
||||||
|
|
||||||
#include <pshpack1.h>
|
#include <pshpack1.h>
|
||||||
|
// FIXME! Move to ntuser.h
|
||||||
typedef struct _TL
|
typedef struct _TL
|
||||||
{
|
{
|
||||||
struct _TL* next;
|
struct _TL* next;
|
||||||
|
@ -28,17 +28,19 @@ typedef struct _W32THREAD
|
||||||
|
|
||||||
typedef struct _THREADINFO
|
typedef struct _THREADINFO
|
||||||
{
|
{
|
||||||
W32THREAD W32Thread;
|
W32THREAD W32Thread;
|
||||||
PVOID ppi; // FIXME: use PPROCESSINFO
|
PTL ptl;
|
||||||
PDESKTOPINFO pDeskInfo;
|
PVOID ppi; // FIXME: use PPROCESSINFO
|
||||||
PCLIENTINFO pClientInfo;
|
struct _USER_MESSAGE_QUEUE* MessageQueue;
|
||||||
LIST_ENTRY PtiLink;
|
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 WindowListHead;
|
||||||
LIST_ENTRY W32CallbackListHead;
|
LIST_ENTRY W32CallbackListHead;
|
||||||
struct _KBL* KeyboardLayout;
|
|
||||||
struct _DESKTOP* Desktop;
|
|
||||||
HANDLE hDesktop;
|
HANDLE hDesktop;
|
||||||
BOOLEAN IsExiting;
|
BOOLEAN IsExiting;
|
||||||
SINGLE_LIST_ENTRY ReferencesList;
|
SINGLE_LIST_ENTRY ReferencesList;
|
||||||
|
|
|
@ -505,6 +505,7 @@ GetW32ThreadInfo(VOID)
|
||||||
ti->kpi = GetW32ProcessInfo();
|
ti->kpi = GetW32ProcessInfo();
|
||||||
ti->pi = UserHeapAddressToUser(ti->kpi);
|
ti->pi = UserHeapAddressToUser(ti->kpi);
|
||||||
ti->Hooks = W32Thread->Hooks;
|
ti->Hooks = W32Thread->Hooks;
|
||||||
|
W32Thread->pcti = &ti->ClientThreadInfo;
|
||||||
if (W32Thread->Desktop != NULL)
|
if (W32Thread->Desktop != NULL)
|
||||||
{
|
{
|
||||||
ti->Desktop = W32Thread->Desktop->DesktopInfo;
|
ti->Desktop = W32Thread->Desktop->DesktopInfo;
|
||||||
|
@ -518,6 +519,7 @@ GetW32ThreadInfo(VOID)
|
||||||
/* update the TEB */
|
/* update the TEB */
|
||||||
Teb = NtCurrentTeb();
|
Teb = NtCurrentTeb();
|
||||||
ci = GetWin32ClientInfo();
|
ci = GetWin32ClientInfo();
|
||||||
|
W32Thread->pClientInfo = ci;
|
||||||
_SEH2_TRY
|
_SEH2_TRY
|
||||||
{
|
{
|
||||||
ProbeForWrite(Teb,
|
ProbeForWrite(Teb,
|
||||||
|
|
Loading…
Reference in a new issue