From 62c5142b7a8662f1f0443ce2ac5fa97e35c57813 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 18 Sep 2022 08:23:50 +0200 Subject: [PATCH] Support getting hook locations --- src/common/utils/hook.cpp | 5 +++++ src/common/utils/hook.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/common/utils/hook.cpp b/src/common/utils/hook.cpp index e28196d5..38134d74 100644 --- a/src/common/utils/hook.cpp +++ b/src/common/utils/hook.cpp @@ -332,6 +332,11 @@ namespace utils::hook this->moved_data_ = move_hook(this->place_); } + void* detour::get_place() const + { + return this->place_; + } + void* detour::get_original() const { return this->original_; diff --git a/src/common/utils/hook.hpp b/src/common/utils/hook.hpp index ff9aead0..ade2fca2 100644 --- a/src/common/utils/hook.hpp +++ b/src/common/utils/hook.hpp @@ -125,6 +125,8 @@ namespace utils::hook void move(); + void* get_place() const; + template T* get() const {