public class WinEventHook
extends java.lang.Object
WinEventHook class provides windows event hook functionality.| Modifier and Type | Class and Description |
|---|---|
static class |
WinEventHook.WinEvent
WinEvents class contains windows events constants which used
in the WinEventHook class
|
static class |
WinEventHook.WinEventFlag
WinEventFlag class specifies whether hook function contained in a DLL or not and events to skip |
| Constructor and Description |
|---|
WinEventHook() |
| Modifier and Type | Method and Description |
|---|---|
static int |
setWinEventHook(WinEventHook.WinEvent eventMin,
WinEventHook.WinEvent eventMax,
Handle dllModule,
HookFunction function,
int processID,
int threadID,
WinEventHook.WinEventFlag eventFlag)
The
SetWinEventHook function sets an event hook function for a range of events. |
static boolean |
unhookWinEvent(int hookID)
The
UnhookWinEvent function removes specified event hook function. |
public static int setWinEventHook(WinEventHook.WinEvent eventMin, WinEventHook.WinEvent eventMax, Handle dllModule, HookFunction function, int processID, int threadID, WinEventHook.WinEventFlag eventFlag)
SetWinEventHook function sets an event hook function for a range of events.eventMin - - WinEvents constant with specifies the lowest event value of the range.eventMax - - WinEvents constant with specifies the highest event value of the range.dllModule - - handle to the DLL with the hook function.function - - the event hook function. An instance of a class nested from the HookFunction.processID - - the ID of the process from which the hook function receives events.threadID - - the ID of the thread from which the hook function receives events.eventFlag - - an instance of WinEventFlag.public static boolean unhookWinEvent(int hookID)
UnhookWinEvent function removes specified event hook function.hookID - - handle to the event hook.