Expand Minimize

SymGetModuleBase64 function

Retrieves the base address of the module that contains the specified address.

Syntax


DWORD64 WINAPI SymGetModuleBase64(
  _In_  HANDLE hProcess,
  _In_  DWORD64 dwAddr
);

Parameters

hProcess [in]

A handle to the process that was originally passed to the SymInitialize function.

dwAddr [in]

The virtual address that is contained in one of the modules loaded by the SymLoadModule64 function.

Return value

If the function succeeds, the return value is a nonzero virtual address. The value is the base address of the module containing the address specified by the dwAddr parameter.

If the function fails, the return value is zero. To retrieve extended error information, call GetLastError.

Remarks

The module table is searched for a module that contains dwAddr. The module is located based on the load address and size of each module.

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

This function supersedes the SymGetModuleBase function. For more information, see Updated Platform Support. SymGetModuleBase is defined as follows in DbgHelp.h.


#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
#define SymGetModuleBase SymGetModuleBase64
#else
DWORD
IMAGEAPI
SymGetModuleBase(
    __in HANDLE hProcess,
    __in DWORD dwAddr
    );
#endif

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

Dbghelp.h

Library

Dbghelp.lib

DLL

Dbghelp.dll

See also

DbgHelp Functions
SymInitialize
SymLoadModule64

 

 

Community Additions

ADD
Show:
© 2014 Microsoft