[This is preliminary documentation and subject to change.]
The ReadProcessMemoryVlm function reads memory in a specified process.
BOOL ReadProcessMemoryVlm(
HANDLE hProcess, // handle to the process whose memory is read
PVOID64 lpBaseAddress,
// address to start reading
PVOID64 lpBuffer, // address of buffer to place read data
DWORD nSize, // number of bytes to read
LPDWORD lpNumberOfBytesRead
// address of number of bytes read
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
ReadProcessMemoryVlm fails if the requested operation attempts to read an area of the process that is inaccessible. In that event, no data is transferred.
ReadProcessMemoryVlm copies the data in the specified address range from the address space of the specified process into the specified buffer of the current process. Any process that has a handle with PROCESS_VM_READ access can call ReadProcessMemoryVlm. The process whose address space is read is typically, but not necessarily, being debugged.
The entire area to be read in a call to ReadProcessMemoryVlm must be accessible, or the function fails.
Note To guard against an access violation, use structured exception handling to protect any code that writes to or reads from a memory-mapped view. For more information on structured exception handling, see Reading and Writing.
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use kernel32.lib.
Memory Management Overview, Memory Management Functions, Very Large Memory (VLM), OpenProcess, VirtualAllocVlm, WriteProcessMemoryVlm