You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
582B

  1. #include <Windows.h>
  2. #include <cstdint>
  3. #include <iostream>
  4. #include "../test_cases/test_cases.h"
  5. #include "abstracthook.h"
  6. #include "mhook.h"
  7. #pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
  8. extern AbstractHookEngine* g_mhook,
  9. *g_PolyHook;
  10. int main(int argc, char** argv) {
  11. AbstractHookEngine* engines[] = {
  12. g_mhook,
  13. g_PolyHook
  14. };
  15. for(auto&& x : engines) {
  16. if (!x->hook_all()) {
  17. std::cerr << x->name() << " can't hook\n";
  18. x->unhook_all();
  19. continue;
  20. }
  21. SelfTest();
  22. std::cout << x->name() << ':' << x->all_hooked() << '\n';
  23. x->unhook_all();
  24. }
  25. }