diff options
author | Zeex <zeex@rocketmail.com> | 2017-03-31 22:31:59 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 22:31:59 +0600 |
commit | 2f9d0c1f1cfb3366c189b8bd52a5e8c266d96e8a (patch) | |
tree | 90ebf047474501cd235d5539ad136ff565145b6c /subhook.h | |
parent | 50a8d0ca24c514fb0b6946626e7856d85988f5a8 (diff) | |
parent | 46ebdb5e154dbee031c44c187402949b1291ba8a (diff) | |
download | subhook-2f9d0c1f1cfb3366c189b8bd52a5e8c266d96e8a.zip subhook-2f9d0c1f1cfb3366c189b8bd52a5e8c266d96e8a.tar.gz subhook-2f9d0c1f1cfb3366c189b8bd52a5e8c266d96e8a.tar.bz2 |
Merge pull request #24 from gocha/scoped-install-with-new-handler
Add new ScopedHookInstall constructor which can set/override the new hook destination
Diffstat (limited to 'subhook.h')
-rw-r--r-- | subhook.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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(); |