Toolhelp32ReadProcessMemory

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function copies memory allocated to another process into an application-supplied buffer.

Syntax

BOOL WINAPI Toolhelp32ReadProcessMemory(
  DWORD th32ProcessID,
  LPCVOID lpBaseAddress,
  LPVOID lpBuffer,
  DWORD cbRead,
  LPDWORD lpNumberOfBytesRead
);

Parameters

  • th32ProcessID
    [in] Identifier of the process whose memory is being copied. This parameter can be zero to copy the memory of the current process.
  • lpBaseAddress
    [in] Base address in the specified process to read. Before transferring 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] Pointer to a buffer that receives the contents of the address space of the specified process.
  • cbRead
    [in] Number of bytes to read from the specified process.
  • lpNumberOfBytesRead
    [in] Pointer to the number of bytes copied to the specified buffer. If this parameter is NULL, it is ignored.

Return Value

TRUE indicates success. FALSE indicates failure.

Windows Mobile Remarks

Toolhelp32ReadProcessMemory is a privileged API. Only privileged applications should use this function. For more information, see Privileged APIs.**

Requirements

Header tlhelp32.h
Library toolhelp.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

ToolHelp Functions

Other Resources