pub struct Detour {
pub entry_point: usize,
/* private fields */
}
Expand description
Struct that contains its entry point and original bytes. The purpose of this struct is that when it goes out of scope, it automatically removes the modified bytes in order to do a clean remove of the DLL.
Fields§
§entry_point: usize
Pointer where the detour will be injected.
Implementations§
Source§impl Detour
impl Detour
pub fn new( entry_point: usize, size: usize, new_function: usize, function_end: Option<&'static mut usize>, ) -> Detour
Sourcepub fn new_from_aob(
scan: MemoryPattern,
region: &MemoryRegion,
new_function: usize,
function_end: Option<&'static mut usize>,
size_injection: usize,
offset: Option<isize>,
) -> Result<Detour>
pub fn new_from_aob( scan: MemoryPattern, region: &MemoryRegion, new_function: usize, function_end: Option<&'static mut usize>, size_injection: usize, offset: Option<isize>, ) -> Result<Detour>
Creates a Detour from scan_aob. This function can fail in the case when the scan_aob can’t find it’s target.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Detour
impl RefUnwindSafe for Detour
impl Send for Detour
impl Sync for Detour
impl Unpin for Detour
impl !UnwindSafe for Detour
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