From aldeid
Jump to navigation Jump to search


Copies memory allocated to another process into an application-supplied buffer.


BOOL WINAPI Toolhelp32ReadProcessMemory(
  _In_   DWORD th32ProcessID,
  _In_   LPCVOID lpBaseAddress,
  _Out_  LPVOID lpBuffer,
  _In_   SIZE_T cbRead,
  _Out_  SIZE_T lpNumberOfBytesRead


th32ProcessID [in]
The identifier of the process whose memory is being copied. This parameter can be zero to copy the memory of the current process.
lpBaseAddress [in]
The base address in the specified process to read. Before transferring any data, the system verifies that all data in the base address and memory of the specified size is accessible for read access. If this is the case, the function proceeds. Otherwise, the function fails.
lpBuffer [out]
A pointer to a buffer that receives the contents of the address space of the specified process.
cbRead [in]
The number of bytes to read from the specified process.
lpNumberOfBytesRead [out]
The number of bytes copied to the specified buffer. If this parameter is NULL, it is ignored.

Return value

Returns TRUE if successful.