[−][src]Struct windows_win::Process
Windows process representation
Methods
impl Process[src]
pub fn open(pid: u32, access_rights: u32) -> Result<Process>[src]
Creates handle to a new process by opening it through pid.
Note:
See information about access rights: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684880%28v=vs.85%29.aspx
Parameters:
pid- Pid of the process.access_rights- Bit mask that specifies desired access rights.
Return:
Ok- Process struct.Err- Error reason.
pub fn from_raw(handle: HANDLE) -> Self[src]
Creates instance from existing handle
pub fn inner(&self) -> HANDLE[src]
Retrieves underlying handle.
pub fn into_inner(self) -> HANDLE[src]
Retrieves underlying handle and consumes self.
Basically you're responsible to close handle now.
pub fn exe_path(&self) -> Result<String>[src]
Gets full path to process's exectuable.
Note
The process MUST be opened with either PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION flag.
Return
Ok- Success.Err- Error reason.
pub fn window(&self) -> Result<Option<HWND>>[src]
pub fn read_memory(&self, base_addr: usize, storage: &mut [u8]) -> Result<()>[src]
Reads memory from process.
Parameters:
base_addr- Address from where to start reading.storage- Storage to hold memory. Itslendetermines amount of bytes to read.
pub fn write_memory(&self, base_addr: usize, data: &[u8]) -> Result<()>[src]
Writes into process memory.
Parameters:
base_addr- Address from where to start writing.data- Slice with write data.
Return:
Ok- Success.Err- Error reason.
pub fn close(&mut self)[src]
Closes process
Note:
There is no need to explicitly close the process.
It shall be closed automatically when being dropped.
pub fn terminate(self, exit_code: c_uint) -> Result<()>[src]
Forces termination of process and consumes itself.
For details see raw::process::terminate().
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> From for T[src]
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,