Files
hook_tests/tester/main.cpp
2017-12-27 22:47:29 +01:00

33 lines
578 B
C++

#include <cstdint>
#include <iostream>
#include <iomanip>
#include "../test_cases/test_cases.h"
#include "abstracthook.h"
#include "mhook.h"
#pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
extern AbstractHookEngine* g_mhook,
*g_PolyHook,
*g_MinHook;
int main(int argc, char** argv) {
AbstractHookEngine* engines[] = {
g_mhook,
g_PolyHook,
g_MinHook
};
for(auto&& x : engines) {
if (!x->hook_all()) {
std::cerr << x->name() << " can't hook\n";
x->unhook_all();
continue;
}
SelfTest();
std::cout << *x << std::endl;
x->unhook_all();
}
}