inital commit of the tester
This commit is contained in:
28
tester/mhook.cpp
Normal file
28
tester/mhook.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include <Windows.h>
|
||||
#include <cstdint>
|
||||
#include "../third_party/mhook/mhook-lib/mhook.h"
|
||||
#include "typedefs.h"
|
||||
#include "abstracthook.h"
|
||||
#include "mhook.h"
|
||||
|
||||
#pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
|
||||
|
||||
static TypeSmall trueSmall = &_small;
|
||||
|
||||
AbstractHookEngine* g_mhook = new MHook();
|
||||
|
||||
static uint64_t hookSmall(void) {
|
||||
return trueSmall();
|
||||
}
|
||||
|
||||
bool MHook::hook_all(void) {
|
||||
return Mhook_SetHook((PVOID*)&trueSmall, hookSmall);
|
||||
}
|
||||
|
||||
bool MHook::unhook_all() {
|
||||
return Mhook_Unhook((PVOID*)&trueSmall);
|
||||
}
|
||||
|
||||
bool MHook::all_hooked() {
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user