Type Definition process_memory::ProcessHandle
source · [−]pub type ProcessHandle = (mach_port_name_t, Architecture);
Expand description
On OS X a ProcessHandle
is a mach port.
Trait Implementations
sourceimpl CopyAddress for ProcessHandle
impl CopyAddress for ProcessHandle
Use vm_read_overwrite
to read memory from another process on OS X.
We use vm_read_overwrite
instead of vm_read
because it can handle non-aligned reads and
won’t read an entire page.
sourcefn get_pointer_width(&self) -> Architecture
fn get_pointer_width(&self) -> Architecture
Get the the pointer width of the underlying process.
This is required for
get_offset
to work. Read moresourceimpl ProcessHandleExt for ProcessHandle
impl ProcessHandleExt for ProcessHandle
sourcefn check_handle(&self) -> bool
fn check_handle(&self) -> bool
sourcefn null_type() -> ProcessHandle
fn null_type() -> ProcessHandle
Return the null equivalent of a
ProcessHandle
.sourcefn set_arch(self, arch: Architecture) -> Self
fn set_arch(self, arch: Architecture) -> Self
Set this handle to use some architecture
sourceimpl PutAddress for ProcessHandle
impl PutAddress for ProcessHandle
Here we use mach_vm_write
to write a buffer to some arbitrary address on a process.
sourceimpl TryIntoProcessHandle for ProcessHandle
impl TryIntoProcessHandle for ProcessHandle
sourcefn try_into_process_handle(&self) -> Result<ProcessHandle>
fn try_into_process_handle(&self) -> Result<ProcessHandle>
Attempt to turn a type into a
ProcessHandle
. Whilst Linux provides the same type for
Pid
s and ProcessHandle
s, Windows and macOS do not. As such, you need to ensure that
try_into_process_handle
is called on all Pid
s to ensure cross-platform capabilities. Read more