diff options
author | gocha <gochaism@gmail.com> | 2017-03-31 15:42:52 +0900 |
---|---|---|
committer | gocha <gochaism@gmail.com> | 2017-03-31 15:42:52 +0900 |
commit | 46ebdb5e154dbee031c44c187402949b1291ba8a (patch) | |
tree | 90ebf047474501cd235d5539ad136ff565145b6c /subhook.h | |
parent | 50a8d0ca24c514fb0b6946626e7856d85988f5a8 (diff) | |
download | subhook-46ebdb5e154dbee031c44c187402949b1291ba8a.zip subhook-46ebdb5e154dbee031c44c187402949b1291ba8a.tar.gz subhook-46ebdb5e154dbee031c44c187402949b1291ba8a.tar.bz2 |
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(); |