Retrieves the base address of the module that contains the specified address.
DWORD IMAGEAPI SymGetModuleBase( HANDLE hProcess, DWORD dwAddr );
A handle to the process that was originally passed to the SymInitialize function.
The virtual address that is contained in one of the modules loaded by the SymLoadModule64 function.
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.
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
|Redistributable||DbgHelp.dll 5.1 or later|