mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 09:25:44 +00:00
- Remove Thread from event structure and substitute with thread info from head structure.
svn path=/trunk/; revision=43310
This commit is contained in:
parent
6d29703714
commit
ac17b39707
2 changed files with 12 additions and 14 deletions
|
@ -17,7 +17,6 @@ typedef struct tagEVENTHOOK
|
||||||
{
|
{
|
||||||
THROBJHEAD head;
|
THROBJHEAD head;
|
||||||
LIST_ENTRY Chain; /* Event chain entry */
|
LIST_ENTRY Chain; /* Event chain entry */
|
||||||
PETHREAD Thread; /* Thread owning the event */
|
|
||||||
UINT eventMin;
|
UINT eventMin;
|
||||||
UINT eventMax;
|
UINT eventMax;
|
||||||
DWORD idProcess;
|
DWORD idProcess;
|
||||||
|
|
|
@ -112,15 +112,15 @@ IntCallLowLevelEvent( PEVENTHOOK pEH,
|
||||||
|
|
||||||
/* FIXME should get timeout from
|
/* FIXME should get timeout from
|
||||||
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
|
* HKEY_CURRENT_USER\Control Panel\Desktop\LowLevelHooksTimeout */
|
||||||
Status = co_MsqSendMessage(((PTHREADINFO)pEH->Thread->Tcb.Win32Thread)->MessageQueue,
|
Status = co_MsqSendMessage( pEH->head.pti->MessageQueue,
|
||||||
hwnd,
|
hwnd,
|
||||||
event,
|
event,
|
||||||
0,
|
0,
|
||||||
(LPARAM)&EP,
|
(LPARAM)&EP,
|
||||||
5000,
|
5000,
|
||||||
TRUE,
|
TRUE,
|
||||||
MSQ_ISEVENT,
|
MSQ_ISEVENT,
|
||||||
&uResult);
|
&uResult);
|
||||||
|
|
||||||
return NT_SUCCESS(Status) ? uResult : 0;
|
return NT_SUCCESS(Status) ? uResult : 0;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ IntNotifyWinEvent(
|
||||||
// Must be inside the event window.
|
// Must be inside the event window.
|
||||||
if ( (pEH->eventMin <= Event) && (pEH->eventMax >= Event))
|
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 all process || all thread || other thread same process
|
||||||
if (!(pEH->idProcess) || !(pEH->idThread) ||
|
if (!(pEH->idProcess) || !(pEH->idThread) ||
|
||||||
(NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess))
|
(NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)pEH->idProcess))
|
||||||
|
@ -330,11 +330,10 @@ NtUserSetWinEventHook(
|
||||||
GlobalEvents->Counts++;
|
GlobalEvents->Counts++;
|
||||||
|
|
||||||
UserHMGetHandle(pEH) = Handle;
|
UserHMGetHandle(pEH) = Handle;
|
||||||
// pEH->head.pti =?
|
|
||||||
if (Thread)
|
if (Thread)
|
||||||
pEH->Thread = Thread;
|
pEH->head.pti = Thread->Tcb.Win32Thread;
|
||||||
else
|
else
|
||||||
pEH->Thread = PsGetCurrentThread();
|
pEH->head.pti = GetW32ThreadInfo();
|
||||||
pEH->eventMin = eventMin;
|
pEH->eventMin = eventMin;
|
||||||
pEH->eventMax = eventMax;
|
pEH->eventMax = eventMax;
|
||||||
pEH->idProcess = idProcess;
|
pEH->idProcess = idProcess;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue