pub fn read_process_memory(
    process_id: u32,
    base_address: LPCVOID,
    buffer: &mut [u8],
) -> Result<usize> {
    let mut num_bytes_read = 0;
    if unsafe {
        Toolhelp32ReadProcessMemory(
            process_id,
            base_address,
            buffer.as_mut_ptr() as *mut _,
            buffer.len(),
            &mut num_bytes_read,
        )
    } == 0
    {
        Err(Error::last_os_error())
    } else {
        Ok(num_bytes_read)
    }
}
/// Copies memory allocated to another process at the specified address into a supplied slice.
/// The number of bytes to copy is the length of the supplied slice.
Copies memory allocated to another process at the specified address into a supplied slice.
The number of bytes to copy is the length of the supplied slice.
Copies memory allocated to another process at the specified address into a supplied slice . The number of bytes to copy is the length of the supplied slice .
pub fn read_process_memory(
    process_id: u32,
    base_address: LPCVOID,
    buffer: &mut [u8],
) -> Result<usize> {
    let mut num_bytes_read = 0;
    if unsafe {
        Toolhelp32ReadProcessMemory(
            process_id,
            base_address,
            buffer.as_mut_ptr() as *mut _,
            buffer.len(),
            &mut num_bytes_read,
        )
    } == 0
    {
        Err(Error::last_os_error())
    } else {
        Ok(num_bytes_read)
    }
}
pub fn read_process_memory ( process_id : u32 , base_address : LPCVOID , buffer : & mut [ u8 ] , ) -> Result < usize > { let mut num_bytes_read = 0 ; if unsafe { Toolhelp32ReadProcessMemory ( process_id , base_address , buffer . as_mut_ptr ( ) as * mut _ , buffer . len ( ) , & mut num_bytes_read , ) } == 0 { Err ( Error :: last_os_error ( ) ) } else { Ok ( num_bytes_read ) } }
Copies memory allocated to another process at the specified address into a supplied slice.
Copies memory allocated to another process at the specified address into a supplied slice .
process_id
u32
base_address
LPCVOID
buffer
&mut [u8]