pub struct DllInjectionVec<D: DllApp> { /* private fields */ }Available on crate feature
inject-dll only.Expand description
A collection of injected processes that can be ejected together.
Implementations§
Source§impl<D: DllApp> DllInjectionVec<D>
impl<D: DllApp> DllInjectionVec<D>
pub fn new() -> Self
pub fn injections(&self) -> &[DllInjection<D>]
pub fn injections_mut(&mut self) -> &mut [DllInjection<D>]
Sourcepub fn leak(&mut self)
pub fn leak(&mut self)
Leak existing and new injections, preventing automatic cleanup on drop.
(Unlike DllInjection::leak, this doesn’t prevent manual eject())
Sourcepub fn inject<'f1, 'f2, 'f3, I1, I2>(
&'f1 mut self,
processes: I1,
) -> DllInjectionVecInjectBuilder<'f1, 'f2, 'f3, D, I1, I2>
pub fn inject<'f1, 'f2, 'f3, I1, I2>( &'f1 mut self, processes: I1, ) -> DllInjectionVecInjectBuilder<'f1, 'f2, 'f3, D, I1, I2>
Inject the DLL into the given processes.
Before DllInjectionVec::eject(), the DLL file will be locked and can’t be deleted.
§Returns
Ok(DllInjectionVec): Successfully injected processesErr(InjectError): Error during injection
Sourcepub fn inject_with_process_name<'f1, 'f2, 'f3, 'f4, I1>(
&'f1 mut self,
process_name: &'f2 str,
) -> DllInjectionVecInjectWithProcessNameBuilder<'f1, 'f2, 'f3, 'f4, D, I1>
pub fn inject_with_process_name<'f1, 'f2, 'f3, 'f4, I1>( &'f1 mut self, process_name: &'f2 str, ) -> DllInjectionVecInjectWithProcessNameBuilder<'f1, 'f2, 'f3, 'f4, D, I1>
Inject the DLL into all processes with the given name.
Before DllInjectionVec::eject(), the DLL file will be locked and can’t be deleted.
§Returns
Ok(DllInjectionVec): Successfully injected processesErr(InjectError): Error during injection
Sourcepub fn apply<'f1, 'f2, I1>(
&'f1 self,
input: &'f2 D::Input,
) -> DllInjectionVecApplyBuilder<'f1, 'f2, D, I1>
pub fn apply<'f1, 'f2, I1>( &'f1 self, input: &'f2 D::Input, ) -> DllInjectionVecApplyBuilder<'f1, 'f2, D, I1>
Call apply on all injections.
Errors are reported via the on_error callback.
Sourcepub fn unapply<'f1, I1>(&'f1 self) -> DllInjectionVecUnapplyBuilder<'f1, D, I1>
pub fn unapply<'f1, I1>(&'f1 self) -> DllInjectionVecUnapplyBuilder<'f1, D, I1>
Call unapply on all injections.
Errors are reported via the on_error callback.
Sourcepub fn eject<'f1, I1>(&'f1 mut self) -> DllInjectionVecEjectBuilder<'f1, D, I1>
pub fn eject<'f1, I1>(&'f1 mut self) -> DllInjectionVecEjectBuilder<'f1, D, I1>
Eject all DLL injections.
Trait Implementations§
Source§impl<D: DllApp> Default for DllInjectionVec<D>
#[derive(Debug)] will require D: Default
impl<D: DllApp> Default for DllInjectionVec<D>
#[derive(Debug)] will require D: Default
Auto Trait Implementations§
impl<D> Freeze for DllInjectionVec<D>
impl<D> !RefUnwindSafe for DllInjectionVec<D>
impl<D> Send for DllInjectionVec<D>
impl<D> !Sync for DllInjectionVec<D>
impl<D> Unpin for DllInjectionVec<D>
impl<D> UnsafeUnpin for DllInjectionVec<D>
impl<D> !UnwindSafe for DllInjectionVec<D>
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