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.

28 lines
555B

  1. #include <Windows.h>
  2. #include <cstdint>
  3. #include "../third_party/mhook/mhook-lib/mhook.h"
  4. #include "typedefs.h"
  5. #include "abstracthook.h"
  6. #include "mhook.h"
  7. #pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
  8. static TypeSmall trueSmall = &_small;
  9. AbstractHookEngine* g_mhook = new MHook();
  10. static uint64_t hookSmall(void) {
  11. return trueSmall();
  12. }
  13. bool MHook::hook_all(void) {
  14. return Mhook_SetHook((PVOID*)&trueSmall, hookSmall);
  15. }
  16. bool MHook::unhook_all() {
  17. return Mhook_Unhook((PVOID*)&trueSmall);
  18. }
  19. bool MHook::all_hooked() {
  20. return true;
  21. }