aboutsummaryrefslogtreecommitdiff
path: root/subhook.h
diff options
context:
space:
mode:
Diffstat (limited to 'subhook.h')
-rw-r--r--subhook.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/subhook.h b/subhook.h
index c74e5d1..3fd0dc8 100644
--- a/subhook.h
+++ b/subhook.h
@@ -217,6 +217,15 @@ class ScopedHookInstall {
{
}
+ ScopedHookInstall(Hook *hook,
+ void *src,
+ void *dst,
+ HookOptions options = HookOptionsNone)
+ : hook_(hook)
+ , installed_(hook_->Install(src, dst, options))
+ {
+ }
+
~ScopedHookInstall() {
if (installed_) {
hook_->Remove();