DllForwarder

Struct DllForwarder 

Source
pub struct DllForwarder<const N: usize> {
    pub initialized: bool,
    pub module_handle: HMODULE,
    pub target_functions_address: [usize; N],
    pub target_function_names: [&'static str; N],
    pub lib_name: &'static str,
}
Expand description

DLL 转发类型的具体实现。该类型不要自己实例化,应调用 forward_dll 宏生成具体的实例。

Fields§

§initialized: bool§module_handle: HMODULE§target_functions_address: [usize; N]§target_function_names: [&'static str; N]§lib_name: &'static str

Implementations§

Source§

impl<const N: usize> DllForwarder<N>

Source

pub fn forward_all(&mut self) -> ForwardResult<()>

将所有函数的跳转地址设置为对应的 DLL 的同名函数地址。

Auto Trait Implementations§

§

impl<const N: usize> Freeze for DllForwarder<N>

§

impl<const N: usize> RefUnwindSafe for DllForwarder<N>

§

impl<const N: usize> Send for DllForwarder<N>

§

impl<const N: usize> Sync for DllForwarder<N>

§

impl<const N: usize> Unpin for DllForwarder<N>

§

impl<const N: usize> UnwindSafe for DllForwarder<N>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.