simple_tests with mhook
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user