Author: jimtabor
Date: Tue Oct 6 06:22:11 2009
New Revision: 43310
URL:
http://svn.reactos.org/svn/reactos?rev=43310&view=rev
Log:
- Remove Thread from event structure and substitute with thread info from head structure.
Modified:
trunk/reactos/subsystems/win32/win32k/include/hook.h
trunk/reactos/subsystems/win32/win32k/ntuser/event.c
Modified: trunk/reactos/subsystems/win32/win32k/include/hook.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/hook.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/hook.h [iso-8859-1] Tue Oct 6 06:22:11
2009
@@ -17,7 +17,6 @@
{
THROBJHEAD head;
LIST_ENTRY Chain; /* Event chain entry */
- PETHREAD Thread; /* Thread owning the event */
UINT eventMin;
UINT eventMax;
DWORD idProcess;
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Tue Oct 6 06:22:11
2009
@@ -112,15 +112,15 @@
/* FIXME should get timeout from
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
- Status =
co_MsqSendMessage(((PTHREADINFO)pEH->Thread->Tcb.Win32Thread)->MessageQueue,
- hwnd,
- event,
- 0,
- (LPARAM)&EP,
- 5000,
- TRUE,
- MSQ_ISEVENT,
- &uResult);
+ Status = co_MsqSendMessage( pEH->head.pti->MessageQueue,
+ hwnd,
+ event,
+ 0,
+ (LPARAM)&EP,
+ 5000,
+ TRUE,
+ MSQ_ISEVENT,
+ &uResult);
return NT_SUCCESS(Status) ? uResult : 0;
}
@@ -199,7 +199,7 @@
// Must be inside the event window.
if ( (pEH->eventMin <= Event) && (pEH->eventMax >= Event))
{
- if ((pEH->Thread != PsGetCurrentThread()) && (pEH->Thread !=
NULL))
+ if (pEH->head.pti->pEThread != PsGetCurrentThread())
{ // if all process || all thread || other thread same process
if (!(pEH->idProcess) || !(pEH->idThread) ||
(NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess))
@@ -330,11 +330,10 @@
GlobalEvents->Counts++;
UserHMGetHandle(pEH) = Handle;
-// pEH->head.pti =?
if (Thread)
- pEH->Thread = Thread;
+ pEH->head.pti = Thread->Tcb.Win32Thread;
else
- pEH->Thread = PsGetCurrentThread();
+ pEH->head.pti = GetW32ThreadInfo();
pEH->eventMin = eventMin;
pEH->eventMax = eventMax;
pEH->idProcess = idProcess;