pub struct Process { /* private fields */ }
Expand description
Windows process representation
Implementations§
Source§impl Process
impl Process
Sourcepub fn open(pid: u32, access_rights: u32) -> Result<Process>
pub fn open(pid: u32, access_rights: u32) -> Result<Process>
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.
Sourcepub fn into_inner(self) -> HANDLE
pub fn into_inner(self) -> HANDLE
Retrieves underlying handle and consumes self.
Basically you’re responsible to close handle now.
Sourcepub fn read_memory(&self, base_addr: usize, storage: &mut [u8]) -> Result<()>
pub fn read_memory(&self, base_addr: usize, storage: &mut [u8]) -> Result<()>
Reads memory from process.
§Parameters:
base_addr
- Address from where to start reading.storage
- Storage to hold memory. Itslen
determines amount of bytes to read.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Process
impl RefUnwindSafe for Process
impl !Send for Process
impl !Sync for Process
impl Unpin for Process
impl UnwindSafe for Process
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