Platform SDK: Debugging and Error Handling

GetModuleBaseProc

The GetModuleBaseProc function is an application-defined callback function used with the StackWalk function. It is called when StackWalk needs a module base address for a given virtual address.

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

DWORD GetModuleBaseProc(
  HANDLE hProcess,
  DWORD Address
);

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

DWORD GetModuleBaseProc64(
  HANDLE hProcess,
  DWORD64 Address
);

Parameters

hProcess
[in] Handle to the process for which the stack trace is generated.
Address
[in] Address whose module image should be located.

Return Value

The function returns the base address of the module.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Dbghelp.h.

See Also

Debug Help Library Overview, DbgHelp Functions, StackWalk