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 strImplementations§
Source§impl<const N: usize> DllForwarder<N>
impl<const N: usize> DllForwarder<N>
Sourcepub fn forward_all(&mut self) -> ForwardResult<()>
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> 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