pub struct Hook {
pub hook_on_interrupt: Option<fn(emu: &mut Emu, ip_addr: u64, interrupt: u64) -> bool>,
pub hook_on_exception: Option<fn(emu: &mut Emu, ip_addr: u64) -> bool>,
pub hook_on_memory_read: Option<fn(emu: &mut Emu, ip_addr: u64, mem_addr: u64, sz: u32)>,
pub hook_on_memory_write: Option<fn(emu: &mut Emu, ip_addr: u64, mem_addr: u64, sz: u32, value: u128) -> u128>,
pub hook_on_pre_instruction: Option<fn(emu: &mut Emu, ip_addr: u64, ins: &Instruction, sz: usize)>,
pub hook_on_post_instruction: Option<fn(emu: &mut Emu, ip_addr: u64, ins: &Instruction, sz: usize, emu_ok: bool)>,
pub hook_on_winapi_call: Option<fn(emu: &mut Emu, ip_addr: u64, called_addr: u64) -> bool>,
}
Fields§
§hook_on_interrupt: Option<fn(emu: &mut Emu, ip_addr: u64, interrupt: u64) -> bool>
§hook_on_exception: Option<fn(emu: &mut Emu, ip_addr: u64) -> bool>
§hook_on_memory_read: Option<fn(emu: &mut Emu, ip_addr: u64, mem_addr: u64, sz: u32)>
§hook_on_memory_write: Option<fn(emu: &mut Emu, ip_addr: u64, mem_addr: u64, sz: u32, value: u128) -> u128>
§hook_on_pre_instruction: Option<fn(emu: &mut Emu, ip_addr: u64, ins: &Instruction, sz: usize)>
§hook_on_post_instruction: Option<fn(emu: &mut Emu, ip_addr: u64, ins: &Instruction, sz: usize, emu_ok: bool)>
§hook_on_winapi_call: Option<fn(emu: &mut Emu, ip_addr: u64, called_addr: u64) -> bool>
Implementations§
source§impl Hook
impl Hook
pub fn new() -> Hook
pub fn on_interrupt( &mut self, hook: fn(emu: &mut Emu, ip_addr: u64, interrupt: u64) -> bool )
pub fn disable_interrupt(&mut self)
pub fn on_exception(&mut self, hook: fn(emu: &mut Emu, ip_addr: u64) -> bool)
pub fn disable_exception(&mut self)
pub fn on_memory_read( &mut self, hook: fn(emu: &mut Emu, ip_addr: u64, mem_addr: u64, sz: u32) )
pub fn disable_memory_read(&mut self)
pub fn on_memory_write( &mut self, hook: fn(emu: &mut Emu, ip_addr: u64, mem_addr: u64, sz: u32, value: u128) -> u128 )
pub fn disable_memory_write(&mut self)
pub fn on_pre_instruction( &mut self, hook: fn(emu: &mut Emu, ip_addr: u64, ins: &Instruction, sz: usize) )
pub fn disable_pre_instruction(&mut self)
pub fn on_post_instruction( &mut self, hook: fn(emu: &mut Emu, ip_addr: u64, ins: &Instruction, sz: usize, emu_ok: bool) )
pub fn disable_post_instruction(&mut self)
pub fn on_winapi_call( &mut self, hook: fn(emu: &mut Emu, ip_addr: u64, called_addr: u64) -> bool )
pub fn disable_winapi_call(&mut self)
Auto Trait Implementations§
impl Freeze for Hook
impl RefUnwindSafe for Hook
impl Send for Hook
impl Sync for Hook
impl Unpin for Hook
impl UnwindSafe for Hook
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