pub struct InlineHook<A: Architecture> { /* private fields */ }Expand description
standard inline hook
overwrites the function prologue with a jump to the detour. creates a trampoline for calling the original function.
Implementations§
Source§impl<A: Architecture> InlineHook<A>
impl<A: Architecture> InlineHook<A>
Sourcepub fn new(target: usize, detour: usize) -> Self
pub fn new(target: usize, detour: usize) -> Self
create a new inline hook
§Arguments
target- address of the function to hookdetour- address of the detour function
Sourcepub fn install_stateful(self) -> Result<StatefulHookGuard<A>>
pub fn install_stateful(self) -> Result<StatefulHookGuard<A>>
install and return a stateful guard with enable/disable support
Trait Implementations§
Source§impl<A: Architecture> Hook for InlineHook<A>
impl<A: Architecture> Hook for InlineHook<A>
Auto Trait Implementations§
impl<A> Freeze for InlineHook<A>
impl<A> RefUnwindSafe for InlineHook<A>where
A: RefUnwindSafe,
impl<A> Send for InlineHook<A>where
A: Send,
impl<A> Sync for InlineHook<A>where
A: Sync,
impl<A> Unpin for InlineHook<A>where
A: Unpin,
impl<A> UnwindSafe for InlineHook<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more