inital commit of the tester

This commit is contained in:
2017-12-27 13:47:10 +01:00
parent c7b6246025
commit 3d1dddba12
9 changed files with 136 additions and 4 deletions

28
tester/mhook.cpp Normal file
View 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;
}