ReactOS  0.4.14-dev-49-gfb4591c
hook.h
Go to the documentation of this file.
1 #pragma once
2 
3 #define HOOK_THREAD_REFERENCED (0x1)
4 #define HOOKID_TO_INDEX(HookId) (HookId - WH_MINHOOK)
5 #define HOOKID_TO_FLAG(HookId) (1 << ((HookId) + 1))
6 #define ISITHOOKED(HookId) (((PTHREADINFO)PsGetCurrentThreadWin32Thread())->fsHooks & HOOKID_TO_FLAG(HookId))
7 
8 /* NOTE: The following definition is not a real hook but
9  a pseudo-id that will be used only for
10  injecting user api hook module to all processes.
11  It is used internally in win32k */
12 #define WH_APIHOOK WH_MAX + 1
13 
14 
15 typedef struct tagEVENTHOOK
16 {
18  LIST_ENTRY Chain; /* Event chain entry */
23  WINEVENTPROC Proc; /* Event function */
24  ULONG Flags; /* Some internal flags */
28 
29 typedef struct tagEVENTTABLE
30 {
34 
35 typedef struct _NOTIFYEVENT
36 {
42 
52 
54 BOOL IntLoadHookModule(int iHookID, HHOOK hHook, BOOL Unload);
56 
58 
59 /* EOF */
LRESULT APIENTRY co_HOOK_CallHooks(INT HookId, INT Code, WPARAM wParam, LPARAM lParam)
Definition: hook.c:1103
UINT Counts
Definition: hook.h:32
BOOL FASTCALL IntUnhookWindowsHook(int, HOOKPROC)
Definition: hook.c:1320
INT_PTR ihmod
Definition: hook.h:26
struct tagEVENTTABLE EVENTTABLE
LONG idChild
Definition: hook.h:39
PHOOK FASTCALL IntGetNextHook(PHOOK Hook)
Definition: hook.c:996
BOOL IntLoadHookModule(int iHookID, HHOOK hHook, BOOL Unload)
Definition: hook.c:31
LRESULT APIENTRY co_CallHook(INT HookId, INT Code, WPARAM wParam, LPARAM lParam)
Definition: hook.c:322
BOOL FASTCALL UserUnregisterUserApiHook(VOID)
Definition: hook.c:207
LIST_ENTRY Events
Definition: hook.h:31
VOID NTAPI Unload(PDRIVER_OBJECT DriverObject)
Definition: csqtest.c:160
THROBJHEAD head
Definition: hook.h:17
struct tagEVENTTABLE * PEVENTTABLE
UINT_PTR WPARAM
Definition: windef.h:207
struct _NOTIFYEVENT NOTIFYEVENT
int32_t INT_PTR
Definition: typedefs.h:62
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
LRESULT(CALLBACK * HOOKPROC)(int, WPARAM, LPARAM)
Definition: winuser.h:2873
BOOL FASTCALL UserLoadApiHook(VOID)
Definition: hook.c:132
struct tagEVENTHOOK EVENTHOOK
PHOOK FASTCALL IntGetHookObject(HHOOK)
Definition: hook.c:938
uint32_t ULONG_PTR
Definition: typedefs.h:63
ULONG Flags
Definition: hook.h:24
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
unsigned char BOOLEAN
LONG_PTR LPARAM
Definition: windef.h:208
WINEVENTPROC Proc
Definition: hook.h:23
UINT eventMin
Definition: hook.h:19
struct tagEVENTHOOK * PEVENTHOOK
#define Code
Definition: deflate.h:80
VOID(CALLBACK * WINEVENTPROC)(HWINEVENTHOOK, DWORD, HWND, LONG, LONG, DWORD, DWORD)
Definition: winable.h:68
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
static IUnknown Object
Definition: main.c:512
DWORD event
Definition: hook.h:37
PPROCESSINFO ppiUahServer
Definition: hook.c:25
Definition: typedefs.h:117
DWORD idThread
Definition: hook.h:22
LRESULT APIENTRY UserCallNextHookEx(PHOOK pHook, int Code, WPARAM wParam, LPARAM lParam, BOOL Ansi)
BOOLEAN IntRemoveEvent(PVOID Object)
Definition: event.c:127
UINT eventMax
Definition: hook.h:20
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
LIST_ENTRY Chain
Definition: hook.h:18
unsigned int ULONG
Definition: retypes.h:1
LRESULT APIENTRY co_EVENT_CallEvents(DWORD, HWND, UINT_PTR, LONG_PTR)
Definition: event.c:151
ULONG_PTR offPfn
Definition: hook.h:25
LONG_PTR LRESULT
Definition: windef.h:209
BOOLEAN IntRemoveHook(PVOID Object)
Definition: hook.c:1037
DWORD flags
Definition: hook.h:40
LPARAM lParam
Definition: combotst.c:139
struct _NOTIFYEVENT * PNOTIFYEVENT
LONG idObject
Definition: hook.h:38
#define APIENTRY
Definition: api.h:79
DWORD idProcess
Definition: hook.h:21