-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhook.h
31 lines (26 loc) · 874 Bytes
/
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
#pragma once
#include "logger.h"
#include <Windows.h>
#include <shellapi.h>
typedef BOOL(__stdcall *_SwapBuffers)(HDC);
typedef BOOL(__stdcall *_ShellExcuteExW)(LPSHELLEXECUTEINFOW);
BOOL __stdcall InitPlugin(HDC hdc);
BOOL __stdcall DetourSwapBuffers(HDC hdc);
LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
DWORD WINAPI MsgHookThread(LPVOID lpParam);
namespace Hook {
extern UINT raw_devices_count;
extern RAWINPUTDEVICE *raw_devices;
extern _SwapBuffers OriSwapBuffers;
extern _SwapBuffers BakOriSwapBuffers;
extern _ShellExcuteExW OriShellExecuteExW;
extern _ShellExcuteExW BakShellExecuteExW;
extern HHOOK msgHook;
extern HWND hwnd;
int InitHook();
int ReHookSwapBuffers();
int UninitHook();
int BackupRawInputDevices();
int DisablRawInputDevices();
int RestoreRawInputDevices();
};