pub struct Process { /* private fields */ }
Expand description
Represents a system process, posses a PID, name and an open HANDLE
Implementations§
Source§impl Process
impl Process
Sourcepub fn find(name: &str) -> WinResult<Self>
pub fn find(name: &str) -> WinResult<Self>
Find a Process
from it’s executable’s name
[Reference(s)]:
https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-process32firstw
https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-process32nextw
https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/ns-tlhelp32-processentry32w
Sourcepub fn find_module(&self, name: &str) -> WinResult<Module>
pub fn find_module(&self, name: &str) -> WinResult<Module>
Find a process’s module (dll) by it’s name [Reference(s)]: https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-module32firstw https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-module32nextw https://docs.microsoft.com/en-us/windows/win32/api/tlhelp32/ns-tlhelp32-moduleentry32w
Sourcepub fn write_mem<T>(&self, buffer: &T, address: DWORD) -> WinResult<()>
pub fn write_mem<T>(&self, buffer: &T, address: DWORD) -> WinResult<()>
Write to a process’s memory, not relative to module offset [Reference]: https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-writeprocessmemory
Sourcepub fn write_mem_relative<T>(
&self,
buffer: &T,
module_name: &str,
address: DWORD,
) -> WinResult<()>
pub fn write_mem_relative<T>( &self, buffer: &T, module_name: &str, address: DWORD, ) -> WinResult<()>
Write to a process’s memory relative to the offset of a module
Sourcepub fn read_mem<T>(&self, address: DWORD) -> WinResult<T>
pub fn read_mem<T>(&self, address: DWORD) -> WinResult<T>
Read a process’s memory, not relative to module offset [Reference]: https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory
Sourcepub fn read_mem_relative<T>(
&self,
module_name: &str,
address: DWORD,
) -> WinResult<T>
pub fn read_mem_relative<T>( &self, module_name: &str, address: DWORD, ) -> WinResult<T>
Read a process’s memory address relative to the offset of a module