pub type ProcessHandle = (mach_port_name_t, Architecture);
Expand description

On OS X a ProcessHandle is a mach port.

Trait Implementations

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.

Get the the pointer width of the underlying process. This is required for get_offset to work. Read more
Copy an address into user-defined buffer. Read more
Get the actual memory location from a set of offsets. Read more
Returns true if the ProcessHandle is not null, and false otherwise.
Return the null equivalent of a ProcessHandle.
Set this handle to use some architecture

Here we use mach_vm_write to write a buffer to some arbitrary address on a process.

Put the data from a user-defined buffer at an address. Read more
Attempt to turn a type into a ProcessHandle. Whilst Linux provides the same type for Pids and ProcessHandles, Windows and macOS do not. As such, you need to ensure that try_into_process_handle is called on all Pids to ensure cross-platform capabilities. Read more