Struct inject_lib::Injector
source · [−]Fields
dll: &'a str
pid: u32
Implementations
sourceimpl<'a> Injector<'a>
impl<'a> Injector<'a>
pub fn find_pid(name: &str) -> Result<Vec<u32>, Error>
pub fn eject(&self) -> Result<(), Error>
sourcepub fn inject(&self) -> Result<(), Error>
pub fn inject(&self) -> Result<(), Error>
Actually Inject the DLL. For now, the injection is only likely to succeed, if the injector, dll and target process have the same bitness (all x64, or all x86) Open a Pr, if you know more about this! Return information (Outside of Ok and Err) is purely informational (for now)! It should not be relied upon, and may change in Minor updates. Notice:This implementation blocks, and waits, until the library is injected, or the injection failed.
Panic
This function may panic, if a Handle cleanup fails.
sourcepub fn find_pid_selector<F>(select: F) -> Result<Vec<u32>, Error> where
F: Fn(&PROCESSENTRY32W) -> bool,
pub fn find_pid_selector<F>(select: F) -> Result<Vec<u32>, Error> where
F: Fn(&PROCESSENTRY32W) -> bool,
Find a PID, where the process-name matches some user defined selector
sourcepub fn get_is_dll_x64(&self) -> Result<bool, Error>
pub fn get_is_dll_x64(&self) -> Result<bool, Error>
This function will return, whether a dll is x64, or x86. The Return value will be Ok(true), if the dll is x64(64bit), and Ok(false), if the dll is x86(32bit).
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Injector<'a>
impl<'a> Send for Injector<'a>
impl<'a> Sync for Injector<'a>
impl<'a> Unpin for Injector<'a>
impl<'a> UnwindSafe for Injector<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more