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
);

Parameters

hProcess

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

lpBaseAddress

The base address of the memory to be read.

lpBuffer

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

nSize

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

lpNumberOfBytesRead

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.

Remarks

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.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

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.