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 b7934f0..90a5eb7 100644
--- a/subhook.h
+++ b/subhook.h
@@ -219,6 +219,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();