simple_tests with mhook

This commit is contained in:
2017-12-27 19:07:15 +01:00
parent 72af6439a7
commit 72b73ee462
8 changed files with 64 additions and 14 deletions

View File

@@ -6,7 +6,7 @@
#include "abstracthook.h"
#include "mhook.h"
#pragma comment(lib, "..\\x64\\release\\test_cases.lib")
#pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
extern AbstractHookEngine* g_mhook;
@@ -16,7 +16,12 @@ int main(int argc, char** argv) {
};
for(auto&& x : engines) {
x->hook_all();
if (!x->hook_all()) {
std::cerr << x->name() << " can't hook\n";
x->unhook_all();
continue;
}
SelfTest();
std::cout << x->name() << ':' << x->all_hooked() << '\n';
x->unhook_all();