|
| | Hook () |
| | Constructs an unapplied hook.
|
| | ~Hook () noexcept |
| | Destroys hook; removes if applied. Never throws.
|
| template<typename T> |
| void | apply (T pFunc, type detour) |
| | Attaches detour to target function.
|
| void | remove () |
| | Removes hook if applied.
|
| bool | remove_nothrow () noexcept |
| | Removes hook if applied. Never throws; safe to call under loader lock.
|
| retn | call_orig (args ... p) |
| | Calls the original (unhooked) function.
|
| bool | is_applied () const |
| | Returns true if hook is currently applied.
|
| type | original () const |
| | Trampoline while applied; otherwise the address last passed to apply.
|
template<
CallConvention cc, typename retn, typename ... args>
class Hook< cc, retn, args >
RAII Detours hook wrapper for function interception.
- Template Parameters
-
| cc | Calling convention (stdcall_t or cdecl_t). |
| retn | Return type. |
| args | Argument types. |
Definition at line 85 of file Hook.h.
| type Hook< cc, retn, args >::original |
( |
| ) |
const |
|
inline |
Trampoline while applied; otherwise the address last passed to apply.
While the detour is attached, this is the Detours trampoline. A saved copy of that trampoline is valid only until detachment commits (remove, remove_nothrow, or a destructor that is not suppressed). Detours frees the trampoline at that commit. If destruction is suppressed, the trampoline stays valid until a later detach.
Definition at line 374 of file Hook.h.