pub struct DllInjectionVecWithInput<D: DllApp> { /* private fields */ }inject-dll only.Expand description
A collection of injected processes that can be ejected together, with a shared input for apply.
Unlike DllInjectionVec, this stores the input and applies it automatically during inject.
Implementations§
Source§impl<D: DllApp> DllInjectionVecWithInput<D>
impl<D: DllApp> DllInjectionVecWithInput<D>
Sourcepub fn new(dll_path: PathBuf) -> Result<Self, InjectError>
pub fn new(dll_path: PathBuf) -> Result<Self, InjectError>
Creates a new DllInjectionVecWithInput with the given DLL path.
The DLL path is checked to ensure it exists.
pub fn with_input( dll_path: PathBuf, input: Option<D::Input>, ) -> Result<Self, InjectError>
pub fn dll_path(&self) -> &PathBuf
pub fn input(&self) -> Option<&D::Input>
Source§impl<D: DllApp> DllInjectionVecWithInput<D>
impl<D: DllApp> DllInjectionVecWithInput<D>
Sourcepub fn inject<'f1, I1, I2>(
&'f1 mut self,
processes: I1,
) -> DllInjectionVecWithInputInjectBuilder<'f1, D, I1, I2>
pub fn inject<'f1, I1, I2>( &'f1 mut self, processes: I1, ) -> DllInjectionVecWithInputInjectBuilder<'f1, D, I1, I2>
Inject the DLL into the given processes with the stored input and dll_path.
Before [DllInjectionVecWithInput::eject()], the DLL file will be locked and can’t be deleted.
§Returns
Ok(DllInjectionVecWithInput): Successfully injected processesErr(InjectError): Error during injection
Sourcepub fn inject_with_process_name<'f1, 'f2, I1>(
&'f1 mut self,
process_name: &'f2 str,
) -> DllInjectionVecWithInputInjectWithProcessNameBuilder<'f1, 'f2, D, I1>
pub fn inject_with_process_name<'f1, 'f2, I1>( &'f1 mut self, process_name: &'f2 str, ) -> DllInjectionVecWithInputInjectWithProcessNameBuilder<'f1, 'f2, D, I1>
Inject the DLL into all processes with the given name.
Before [DllInjectionVecWithInput::eject()], the DLL file will be locked and can’t be deleted.
§Returns
Ok(DllInjectionVecWithInput): Successfully injected processesErr(InjectError): Error during injection
Sourcepub fn apply<'f1, I1>(
&'f1 mut self,
input: D::Input,
) -> DllInjectionVecWithInputApplyBuilder<'f1, D, I1>
pub fn apply<'f1, I1>( &'f1 mut self, input: D::Input, ) -> DllInjectionVecWithInputApplyBuilder<'f1, D, I1>
Call apply on all injections with the stored input.
Updates the stored input to the new value.
Sourcepub fn unapply<'f1, I1>(
&'f1 mut self,
) -> DllInjectionVecWithInputUnapplyBuilder<'f1, D, I1>
pub fn unapply<'f1, I1>( &'f1 mut self, ) -> DllInjectionVecWithInputUnapplyBuilder<'f1, D, I1>
Call unapply on all injections.
Updates the stored input to None.
Methods from Deref<Target = DllInjectionVec<D>>§
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.