Struct ilhook::x86::Registers

source ·
#[repr(C)]
pub struct Registers { pub eflags: u32, pub edi: u32, pub esi: u32, pub ebp: u32, pub esp: u32, pub ebx: u32, pub edx: u32, pub ecx: u32, pub eax: u32, }
Expand description

The common registers.

Fields§

§eflags: u32

The flags register.

§edi: u32

The edi register.

§esi: u32

The esi register.

§ebp: u32

The ebp register.

§esp: u32

The esp register.

§ebx: u32

The ebx register.

§edx: u32

The edx register.

§ecx: u32

The ecx register.

§eax: u32

The eax register.

Implementations§

source§

impl Registers

source

pub unsafe fn get_arg(&self, cnt: usize) -> u32

Get the value by the index from register esp.

Parameters
  • cnt - The index of the arguments.
Safety

Process may crash if register esp does not point to a valid stack.

Trait Implementations§

source§

impl Debug for Registers

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.