mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
- [Win32k] Removed W32THREADINFO.
- Tested AbiWord, User32 wine tests. Yes, of course, this needs more testing. svn path=/trunk/; revision=42746
This commit is contained in:
parent
c365f1c1bb
commit
46af179093
20 changed files with 80 additions and 168 deletions
|
@ -100,7 +100,7 @@ IsThreadHooked(PCLIENTINFO pci)
|
|||
static __inline PDESKTOPINFO
|
||||
GetThreadDesktopInfo(VOID)
|
||||
{
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
PDESKTOPINFO di = NULL;
|
||||
|
||||
ti = GetW32ThreadInfo();
|
||||
|
|
|
@ -199,7 +199,7 @@ typedef struct _USER_HANDLE_ENTRY
|
|||
union
|
||||
{
|
||||
PVOID pi;
|
||||
PW32THREADINFO pti; // pointer to Win32ThreadInfo
|
||||
PTHREADINFO pti; // pointer to Win32ThreadInfo
|
||||
PPROCESSINFO ppi; // pointer to W32ProcessInfo
|
||||
};
|
||||
unsigned short type; /* object type (0 if free) */
|
||||
|
|
|
@ -335,7 +335,7 @@ GetConnected(VOID)
|
|||
USERCONNECT UserCon;
|
||||
// ERR("GetConnected\n");
|
||||
|
||||
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
|
||||
if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo == NULL)
|
||||
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
|
||||
|
||||
if (gpsi && g_ppi) return;
|
||||
|
|
|
@ -104,17 +104,17 @@ UpdatePerUserSystemParameters(
|
|||
return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable);
|
||||
}
|
||||
|
||||
PW32THREADINFO
|
||||
PTHREADINFO
|
||||
GetW32ThreadInfo(VOID)
|
||||
{
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
|
||||
ti = (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo;
|
||||
ti = (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo;
|
||||
if (ti == NULL)
|
||||
{
|
||||
/* create the W32THREADINFO structure */
|
||||
/* create the THREADINFO structure */
|
||||
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
|
||||
ti = (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo;
|
||||
ti = (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo;
|
||||
}
|
||||
|
||||
return ti;
|
||||
|
@ -250,13 +250,13 @@ WINAPI
|
|||
IsGUIThread(
|
||||
BOOL bConvert)
|
||||
{
|
||||
PW32THREADINFO ti = (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo;
|
||||
PTHREADINFO ti = (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo;
|
||||
if (ti == NULL)
|
||||
{
|
||||
if(bConvert)
|
||||
{
|
||||
NtUserGetThreadState(THREADSTATE_GETTHREADINFO);
|
||||
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo) return TRUE;
|
||||
if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo) return TRUE;
|
||||
else
|
||||
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ BOOL
|
|||
FASTCALL
|
||||
TestWindowProcess(PWND Wnd)
|
||||
{
|
||||
if (Wnd->head.pti == (PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo)
|
||||
if (Wnd->head.pti == (PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo)
|
||||
return TRUE;
|
||||
else
|
||||
return (NtUserQueryWindow(Wnd->head.h, QUERY_WINDOW_UNIQUE_PROCESS_ID) ==
|
||||
|
|
|
@ -369,7 +369,7 @@ WINAPI
|
|||
IsWinEventHookInstalled(
|
||||
DWORD event)
|
||||
{
|
||||
if ((PW32THREADINFO)NtCurrentTeb()->Win32ThreadInfo)
|
||||
if ((PTHREADINFO)NtCurrentTeb()->Win32ThreadInfo)
|
||||
{
|
||||
return (gpsi->dwInstalledEventHooks & GetMaskFromEvent(event)) != 0;
|
||||
}
|
||||
|
|
|
@ -1333,7 +1333,7 @@ DispatchMessageA(CONST MSG *lpmsg)
|
|||
if (lpmsg->hwnd != NULL)
|
||||
{
|
||||
Wnd = ValidateHwnd(lpmsg->hwnd);
|
||||
if (!Wnd || SharedPtrToUser(Wnd->head.pti) != GetW32ThreadInfo())
|
||||
if (!Wnd || Wnd->head.pti != GetW32ThreadInfo())
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
@ -1394,7 +1394,7 @@ DispatchMessageW(CONST MSG *lpmsg)
|
|||
if (lpmsg->hwnd != NULL)
|
||||
{
|
||||
Wnd = ValidateHwnd(lpmsg->hwnd);
|
||||
if (!Wnd || SharedPtrToUser(Wnd->head.pti) != GetW32ThreadInfo())
|
||||
if (!Wnd || Wnd->head.pti != GetW32ThreadInfo())
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
|
@ -1791,10 +1791,10 @@ SendMessageW(HWND Wnd,
|
|||
if (Wnd != HWND_BROADCAST && (Msg < WM_DDE_FIRST || Msg > WM_DDE_LAST))
|
||||
{
|
||||
PWND Window;
|
||||
PW32THREADINFO ti = GetW32ThreadInfo();
|
||||
PTHREADINFO ti = GetW32ThreadInfo();
|
||||
|
||||
Window = ValidateHwnd(Wnd);
|
||||
if (Window != NULL && SharedPtrToUser(Window->head.pti) == ti && !IsThreadHooked(GetWin32ClientInfo()))
|
||||
if (Window != NULL && Window->head.pti == ti && !IsThreadHooked(GetWin32ClientInfo()))
|
||||
{
|
||||
/* NOTE: We can directly send messages to the window procedure
|
||||
if *all* the following conditions are met:
|
||||
|
@ -1855,10 +1855,10 @@ SendMessageA(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
|||
if (Wnd != HWND_BROADCAST && (Msg < WM_DDE_FIRST || Msg > WM_DDE_LAST))
|
||||
{
|
||||
PWND Window;
|
||||
PW32THREADINFO ti = GetW32ThreadInfo();
|
||||
PTHREADINFO ti = GetW32ThreadInfo();
|
||||
|
||||
Window = ValidateHwnd(Wnd);
|
||||
if (Window != NULL && SharedPtrToUser(Window->head.pti) == ti && !IsThreadHooked(GetWin32ClientInfo()))
|
||||
if (Window != NULL && Window->head.pti == ti && !IsThreadHooked(GetWin32ClientInfo()))
|
||||
{
|
||||
/* NOTE: We can directly send messages to the window procedure
|
||||
if *all* the following conditions are met:
|
||||
|
|
|
@ -1316,12 +1316,12 @@ GetWindowThreadProcessId(HWND hWnd,
|
|||
LPDWORD lpdwProcessId)
|
||||
{
|
||||
DWORD Ret = 0;
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
PWND pWnd = ValidateHwnd(hWnd);
|
||||
|
||||
if (!pWnd) return Ret;
|
||||
|
||||
ti = SharedPtrToUser(pWnd->head.pti);
|
||||
ti = pWnd->head.pti;
|
||||
|
||||
if (ti)
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __WIN32K_NTUSER_H
|
||||
|
||||
typedef struct _PROCESSINFO *PPROCESSINFO;
|
||||
typedef struct _THREADINFO *PTHREADINFO;
|
||||
struct _DESKTOP;
|
||||
struct _WND;
|
||||
|
||||
|
@ -72,13 +73,6 @@ typedef struct _CLIENTTHREADINFO
|
|||
DWORD dwcPumpHook;
|
||||
} CLIENTTHREADINFO, *PCLIENTTHREADINFO;
|
||||
|
||||
typedef struct _W32THREADINFO
|
||||
{
|
||||
PPROCESSINFO ppi; /* [KERNEL] */
|
||||
PDESKTOPINFO pDeskInfo;
|
||||
ULONG fsHooks;
|
||||
} W32THREADINFO, *PW32THREADINFO;
|
||||
|
||||
typedef struct _HEAD
|
||||
{
|
||||
HANDLE h;
|
||||
|
@ -88,7 +82,7 @@ typedef struct _HEAD
|
|||
typedef struct _THROBJHEAD
|
||||
{
|
||||
HEAD;
|
||||
PW32THREADINFO pti;
|
||||
PTHREADINFO pti;
|
||||
} THROBJHEAD, *PTHROBJHEAD;
|
||||
|
||||
typedef struct _THRDESKHEAD
|
||||
|
@ -701,7 +695,7 @@ typedef struct _BROADCASTPARM
|
|||
LUID luid;
|
||||
} BROADCASTPARM, *PBROADCASTPARM;
|
||||
|
||||
PW32THREADINFO GetW32ThreadInfo(VOID);
|
||||
PTHREADINFO GetW32ThreadInfo(VOID);
|
||||
PPROCESSINFO GetW32ProcessInfo(VOID);
|
||||
|
||||
typedef struct _WNDMSG
|
||||
|
|
|
@ -22,7 +22,7 @@ typedef struct _USER_HANDLE_ENTRY
|
|||
union
|
||||
{
|
||||
PVOID pi;
|
||||
PW32THREADINFO pti; // pointer to Win32ThreadInfo
|
||||
PTHREADINFO pti; // pointer to Win32ThreadInfo
|
||||
PPROCESSINFO ppi; // pointer to W32ProcessInfo
|
||||
};
|
||||
unsigned short type; /* object type (0 if free) */
|
||||
|
|
|
@ -88,8 +88,7 @@ typedef struct _THREADINFO
|
|||
LIST_ENTRY W32CallbackListHead;
|
||||
BOOLEAN IsExiting;
|
||||
SINGLE_LIST_ENTRY ReferencesList;
|
||||
PW32THREADINFO ThreadInfo;
|
||||
} THREADINFO, *PTHREADINFO;
|
||||
} THREADINFO;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ typedef struct _WINDOW_OBJECT
|
|||
PWND Wnd;
|
||||
|
||||
/* Pointer to the thread information */
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
/* Pointer to the desktop */
|
||||
PDESKTOPINFO Desktop;
|
||||
/* system menu handle. */
|
||||
|
|
|
@ -306,12 +306,6 @@ Win32kThreadCallback(struct _ETHREAD *Thread,
|
|||
IntSetThreadDesktop(NULL,
|
||||
TRUE);
|
||||
|
||||
if (Win32Thread->ThreadInfo != NULL)
|
||||
{
|
||||
UserHeapFree(Win32Thread->ThreadInfo);
|
||||
Win32Thread->ThreadInfo = NULL;
|
||||
}
|
||||
|
||||
PsSetThreadWin32Thread(Thread, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -1171,7 +1171,6 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
|||
IN DWORD dwFlags)
|
||||
{
|
||||
PTHREADINFO pti;
|
||||
PW32THREADINFO ti;
|
||||
PPROCESSINFO pi;
|
||||
PCLS Class;
|
||||
RTL_ATOM ClassAtom;
|
||||
|
@ -1179,15 +1178,14 @@ UserRegisterClass(IN CONST WNDCLASSEXW* lpwcx,
|
|||
|
||||
/* NOTE: Accessing the buffers in ClassName and MenuName may raise exceptions! */
|
||||
|
||||
pti = PsGetCurrentThreadWin32Thread();
|
||||
ti = GetW32ThreadInfo();
|
||||
if (ti == NULL || !RegisteredSysClasses)
|
||||
pti = GetW32ThreadInfo();
|
||||
if (pti == NULL || !RegisteredSysClasses)
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
return (RTL_ATOM)0;
|
||||
}
|
||||
|
||||
pi = ti->ppi;
|
||||
pi = pti->ppi;
|
||||
|
||||
/* try to find a previously registered class */
|
||||
ClassAtom = IntGetClassAtom(ClassName,
|
||||
|
|
|
@ -1846,7 +1846,7 @@ CLEANUP:
|
|||
static NTSTATUS
|
||||
IntUnmapDesktopView(IN PDESKTOP DesktopObject)
|
||||
{
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
PPROCESSINFO CurrentWin32Process;
|
||||
PW32HEAP_USER_MAPPING HeapMapping, *PrevLink;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
@ -1883,10 +1883,6 @@ IntUnmapDesktopView(IN PDESKTOP DesktopObject)
|
|||
ti = GetW32ThreadInfo();
|
||||
if (ti != NULL)
|
||||
{
|
||||
if (ti->pDeskInfo == DesktopObject->DesktopInfo)
|
||||
{
|
||||
ti->pDeskInfo = NULL;
|
||||
}
|
||||
GetWin32ClientInfo()->pDeskInfo = NULL;
|
||||
}
|
||||
GetWin32ClientInfo()->ulClientDelta = 0;
|
||||
|
@ -1897,7 +1893,7 @@ IntUnmapDesktopView(IN PDESKTOP DesktopObject)
|
|||
static NTSTATUS
|
||||
IntMapDesktopView(IN PDESKTOP DesktopObject)
|
||||
{
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
PPROCESSINFO CurrentWin32Process;
|
||||
PW32HEAP_USER_MAPPING HeapMapping, *PrevLink;
|
||||
PVOID UserBase = NULL;
|
||||
|
@ -1965,11 +1961,11 @@ IntMapDesktopView(IN PDESKTOP DesktopObject)
|
|||
GetWin32ClientInfo()->ulClientDelta = DesktopHeapGetUserDelta();
|
||||
if (ti != NULL)
|
||||
{
|
||||
if (ti->pDeskInfo == NULL)
|
||||
if (GetWin32ClientInfo()->pDeskInfo == NULL)
|
||||
{
|
||||
ti->pDeskInfo = DesktopObject->DesktopInfo;
|
||||
GetWin32ClientInfo()->pDeskInfo =
|
||||
(PVOID)((ULONG_PTR)ti->pDeskInfo - GetWin32ClientInfo()->ulClientDelta);
|
||||
(PVOID)((ULONG_PTR)DesktopObject->DesktopInfo -
|
||||
GetWin32ClientInfo()->ulClientDelta);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2012,15 +2008,6 @@ IntSetThreadDesktop(IN PDESKTOP DesktopObject,
|
|||
}
|
||||
}
|
||||
|
||||
if (W32Thread->Desktop == NULL)
|
||||
{
|
||||
PW32THREADINFO ti = GetW32ThreadInfo();
|
||||
if (ti != NULL)
|
||||
{
|
||||
ti->pDeskInfo = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hack for system threads */
|
||||
if (NtCurrentTeb())
|
||||
{
|
||||
|
|
|
@ -117,9 +117,6 @@ IntAddHook(PETHREAD Thread, int HookId, BOOLEAN Global, PWINSTATION_OBJECT WinSt
|
|||
W32Thread->fsHooks |= HOOKID_TO_FLAG(HookId);
|
||||
|
||||
GetWin32ClientInfo()->fsHooks = W32Thread->fsHooks;
|
||||
|
||||
if (W32Thread->ThreadInfo != NULL)
|
||||
W32Thread->ThreadInfo->fsHooks = W32Thread->fsHooks;
|
||||
}
|
||||
|
||||
RtlInitUnicodeString(&Hook->ModuleName, NULL);
|
||||
|
@ -243,9 +240,6 @@ IntRemoveHook(PHOOK Hook, PWINSTATION_OBJECT WinStaObj, BOOL TableAlreadyLocked)
|
|||
|
||||
GetWin32ClientInfo()->fsHooks = W32Thread->fsHooks;
|
||||
|
||||
if (W32Thread->ThreadInfo != NULL)
|
||||
W32Thread->ThreadInfo->fsHooks = W32Thread->fsHooks;
|
||||
|
||||
if (0 != Table->Counts[HOOKID_TO_INDEX(Hook->HookId)])
|
||||
{
|
||||
Hook->Proc = NULL; /* chain is in use, just mark it and return */
|
||||
|
|
|
@ -1,21 +1,3 @@
|
|||
/*
|
||||
* ReactOS W32 Subsystem
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -307,7 +289,7 @@ IntCallWndProc
|
|||
{
|
||||
BOOL SameThread = FALSE;
|
||||
|
||||
if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->ThreadInfo)
|
||||
if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread()))
|
||||
SameThread = TRUE;
|
||||
|
||||
if ((!SameThread && (Window->ti->fsHooks & HOOKID_TO_FLAG(WH_CALLWNDPROC))) ||
|
||||
|
@ -329,7 +311,7 @@ IntCallWndProcRet
|
|||
{
|
||||
BOOL SameThread = FALSE;
|
||||
|
||||
if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->ThreadInfo)
|
||||
if (Window->ti == ((PTHREADINFO)PsGetCurrentThreadWin32Thread()))
|
||||
SameThread = TRUE;
|
||||
|
||||
if ((!SameThread && (Window->ti->fsHooks & HOOKID_TO_FLAG(WH_CALLWNDPROCRET))) ||
|
||||
|
|
|
@ -451,11 +451,10 @@ GetW32ProcessInfo(VOID)
|
|||
return (PPROCESSINFO)PsGetCurrentProcessWin32Process();
|
||||
}
|
||||
|
||||
PW32THREADINFO
|
||||
PTHREADINFO
|
||||
GetW32ThreadInfo(VOID)
|
||||
{
|
||||
PTEB Teb;
|
||||
PW32THREADINFO ti;
|
||||
PPROCESSINFO ppi;
|
||||
PCLIENTINFO pci;
|
||||
PTHREADINFO pti = PsGetCurrentThreadWin32Thread();
|
||||
|
@ -465,67 +464,49 @@ GetW32ThreadInfo(VOID)
|
|||
/* FIXME - temporary hack for system threads... */
|
||||
return NULL;
|
||||
}
|
||||
/* initialize it */
|
||||
pti->ppi = ppi = GetW32ProcessInfo();
|
||||
|
||||
/* allocate a THREADINFO structure if neccessary */
|
||||
if (pti->ThreadInfo == NULL)
|
||||
pti->pcti = &pti->cti; // FIXME Need to set it in desktop.c!
|
||||
|
||||
if (pti->Desktop != NULL)
|
||||
{
|
||||
ti = UserHeapAlloc(sizeof(W32THREADINFO));
|
||||
if (ti != NULL)
|
||||
pti->pDeskInfo = pti->Desktop->DesktopInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
pti->pDeskInfo = NULL;
|
||||
}
|
||||
/* update the TEB */
|
||||
Teb = NtCurrentTeb();
|
||||
pci = GetWin32ClientInfo();
|
||||
pti->pClientInfo = pci;
|
||||
_SEH2_TRY
|
||||
{
|
||||
ProbeForWrite( Teb,
|
||||
sizeof(TEB),
|
||||
sizeof(ULONG));
|
||||
|
||||
Teb->Win32ThreadInfo = (PW32THREAD) pti;
|
||||
|
||||
pci->pClientThreadInfo = NULL; // FIXME Need to set it in desktop.c!
|
||||
pci->ppi = ppi;
|
||||
pci->fsHooks = pti->fsHooks;
|
||||
/* CI may not have been initialized. */
|
||||
if (!pci->pDeskInfo && pti->pDeskInfo)
|
||||
{
|
||||
RtlZeroMemory(ti,
|
||||
sizeof(W32THREADINFO));
|
||||
if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta();
|
||||
|
||||
/* initialize it */
|
||||
ti->ppi = ppi = GetW32ProcessInfo();
|
||||
ti->fsHooks = pti->fsHooks;
|
||||
pti->pcti = &pti->cti; // FIXME Need to set it in desktop.c!
|
||||
if (pti->Desktop != NULL)
|
||||
{
|
||||
pti->pDeskInfo = ti->pDeskInfo = pti->Desktop->DesktopInfo;
|
||||
}
|
||||
else
|
||||
{
|
||||
pti->pDeskInfo = ti->pDeskInfo = NULL;
|
||||
}
|
||||
|
||||
pti->ThreadInfo = ti;
|
||||
/* update the TEB */
|
||||
Teb = NtCurrentTeb();
|
||||
pci = GetWin32ClientInfo();
|
||||
pti->pClientInfo = pci;
|
||||
_SEH2_TRY
|
||||
{
|
||||
ProbeForWrite(Teb,
|
||||
sizeof(TEB),
|
||||
sizeof(ULONG));
|
||||
|
||||
Teb->Win32ThreadInfo = UserHeapAddressToUser(pti->ThreadInfo);
|
||||
|
||||
pci->pClientThreadInfo = NULL; // FIXME Need to set it in desktop.c!
|
||||
pci->ppi = ppi;
|
||||
pci->fsHooks = pti->fsHooks;
|
||||
/* CI may not have been initialized. */
|
||||
if (!pci->pDeskInfo && pti->pDeskInfo)
|
||||
{
|
||||
if (!pci->ulClientDelta) pci->ulClientDelta = DesktopHeapGetUserDelta();
|
||||
|
||||
pci->pDeskInfo =
|
||||
(PVOID)((ULONG_PTR)pti->pDeskInfo - pci->ulClientDelta);
|
||||
}
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastNtError(_SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
|
||||
pci->pDeskInfo = (PVOID)((ULONG_PTR)pti->pDeskInfo - pci->ulClientDelta);
|
||||
}
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
SetLastNtError(_SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
return pti->ThreadInfo;
|
||||
return pti;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ NtUserCallOneParam(
|
|||
|
||||
case ONEPARAM_ROUTINE_GETDESKTOPMAPPING:
|
||||
{
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
ti = GetW32ThreadInfo();
|
||||
if (ti != NULL)
|
||||
{
|
||||
|
|
|
@ -1,21 +1,3 @@
|
|||
/*
|
||||
* ReactOS W32 Subsystem
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -162,7 +144,8 @@ ValidateTimerCallback(PTHREADINFO pti,
|
|||
{
|
||||
if ( (lParam == (LPARAM)pTmr->pfn) &&
|
||||
(pTmr->flags & (TMRF_SYSTEM|TMRF_RIT)) &&
|
||||
(pTmr->pti->ThreadInfo->ppi == pti->ThreadInfo->ppi) )
|
||||
// (pTmr->head.pti->ppi == pti->ppi) )
|
||||
(pTmr->pti->ppi == pti->ppi) )
|
||||
break;
|
||||
|
||||
pTmr = (PTIMER)pTmr->ptmrList.Flink;
|
||||
|
|
|
@ -103,7 +103,7 @@ PWINDOW_OBJECT FASTCALL IntGetWindowObject(HWND hWnd)
|
|||
/* temp hack */
|
||||
PWINDOW_OBJECT FASTCALL UserGetWindowObject(HWND hWnd)
|
||||
{
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
PWINDOW_OBJECT Window;
|
||||
|
||||
if (PsGetCurrentProcess() != PsInitialSystemProcess)
|
||||
|
@ -314,7 +314,7 @@ static void IntSendDestroyMsg(HWND hWnd)
|
|||
}
|
||||
|
||||
static VOID
|
||||
UserFreeWindowInfo(PW32THREADINFO ti, PWINDOW_OBJECT WindowObject)
|
||||
UserFreeWindowInfo(PTHREADINFO ti, PWINDOW_OBJECT WindowObject)
|
||||
{
|
||||
PCLIENTINFO ClientInfo = GetWin32ClientInfo();
|
||||
PWND Wnd = WindowObject->Wnd;
|
||||
|
@ -1551,7 +1551,7 @@ co_IntCreateWindowEx(DWORD dwExStyle,
|
|||
HWND hWnd;
|
||||
POINT Pos;
|
||||
SIZE Size;
|
||||
PW32THREADINFO ti = NULL;
|
||||
PTHREADINFO ti = NULL;
|
||||
#if 0
|
||||
|
||||
POINT MaxSize, MaxPos, MinTrack, MaxTrack;
|
||||
|
@ -3311,7 +3311,7 @@ NtUserSetShellWindowEx(HWND hwndShell, HWND hwndListView)
|
|||
DECLARE_RETURN(BOOL);
|
||||
USER_REFERENCE_ENTRY Ref;
|
||||
NTSTATUS Status;
|
||||
PW32THREADINFO ti;
|
||||
PTHREADINFO ti;
|
||||
|
||||
DPRINT("Enter NtUserSetShellWindowEx\n");
|
||||
UserEnterExclusive();
|
||||
|
|
Loading…
Reference in a new issue