Struct windows_win::Process [] [src]

pub struct Process { /* fields omitted */ }

Windows process representation

Methods

impl 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.

Creates instance from existing handle

Retrieves underlying handle.

Retrieves underlying handle and consumes self.

Basically you're responsible to close handle now.

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.

Retrieves handle to process's window

Note

It can return None if process hasn't created window.

Reads memory from process.

Parameters:

  • base_addr - Address from where to start reading.
  • storage - Storage to hold memory. Its len determines amount of bytes to read.

Writes into process memory.

Parameters:

  • base_addr - Address from where to start writing.
  • data - Slice with write data.

Return:

  • Ok - Success.
  • Err - Error reason.

Closes process

Note:

There is no need to explicitly close the process.

It shall be closed automatically when being dropped.

Forces termination of process and consumes itself.

For details see raw::process::terminate().

Trait Implementations

impl Drop for Process
[src]

A method called when the value goes out of scope. Read more