/
hook.h
53 lines (41 loc) · 1.04 KB
/
hook.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef HOOK_H
#define HOOK_H
BOOLEAN
MouFilter_IsrHook (
PVOID DeviceExtension,
PMOUSE_INPUT_DATA CurrentInput,
POUTPUT_PACKET CurrentOutput,
UCHAR StatusByte,
PUCHAR DataByte,
PBOOLEAN ContinueProcessing,
PMOUSE_STATE MouseState,
PMOUSE_RESET_SUBSTATE ResetSubState
);
//quick macro to log and write to the port
#define WRITE_BYTE(pde, byte) /*DebugPrint(("JMOUSE [%3d] -> %02hhx", pde->state, byte));*/ (*pde->IsrWritePort)(pde->CallContext, byte);
enum _MOUSE_STATE_EXTENDED
{
_placeholder_ = CustomHookStateMinimum,
WaitingForTrigger,
ResetMouse,
ReEnable,
SendMagicKnock,
SendExtendedCommand,
ReadRegister1,
ReadRegister2,
ReadRegister3,
ReadRegister4,
WriteRegister1,
WriteRegister2,
WriteRegister3,
WriteRegister4,
SetAbsoluteMode,
SetRange,
GetResolution,
SetResolution,
SetSamplingRate,
GotETPVersion,
GotETPCapabilities,
ReceivingPackets4
};
#endif