ReadProcessMemoryProc64 Callback Function

Debug Help Library

ReadProcessMemoryProc64 Callback Function

An application-defined callback function used with the StackWalk64 function. It is called when StackWalk64 needs to read memory from the address space of the process.

The PREAD_PROCESS_MEMORY_ROUTINE64 type defines a pointer to this callback function. ReadProcessMemoryProc64 is a placeholder for the application-defined function name.

BOOL CALLBACK ReadProcessMemoryProc64(
  [in]                 HANDLE hProcess,
  [in]                 DWORD64 lpBaseAddress,
  [in]                 PVOID lpBuffer,
  [in]                 DWORD nSize,
  [in]                 LPDWORD lpNumberOfBytesRead



A handle to the process for which the stack trace is generated.


The base address of the memory to be read.


A pointer to a buffer that receives the memory to be read.


The size of the memory to be read, in bytes.


A pointer to a variable that receives the number of bytes actually read.

Return Value

If the function succeeds, the return value should be TRUE. If the function fails, the return value should be FALSE.


This function should read as much of the requested memory as possible. The StackWalk64 function handles the case where only part of the requested memory is read.



Requires DbgHelp.dll 5.1 or later.


Declared in DbgHelp.h.

See Also

DbgHelp FunctionsStackWalk64

Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.