[][src]Type Definition ilhook::x64::RetnRoutine

type RetnRoutine = unsafe extern "sysv64" fn(regs: *mut Registers, ori_func_ptr: usize, src_addr: usize) -> usize;

The routine used in a function hook, which means the Routine will replace the original FUNCTION, and the EIP will retn directly instead of jumping back. Note that the being-hooked address must be the head of a function.

Arguments

  • regs - The registers
  • ori_func_ptr - Original function pointer. Call it after converted to the original function type.
  • src_addr - The address that has been hooked

Return the new return value of the replaced function.