Platform SDK: Debugging and Error Handling

SymGetModuleInfoEx

The SymGetModuleInfoEx function retrieves advanced module information for the specified module. This function is intended for use by Windows 2000 debuggers.

This function is implemented as a wrapper that calls SymGetModuleInfoEx64. For more information, see New 64-bit Functions.

BOOL SymGetModuleInfoEx(
  HANDLE hProcess, 
  DWORD dwAddr, 
  IMAGEHLP_TYPES TypeIn, 
  PBYTE DataIn, 
  IMAGEHLP_TYPES TypeOut, 
  PULONG SizeOut, 
  PBYTE DataOut
);

For SymGetModuleInfoEx64, the parameter list is as follows.

BOOL SymGetModuleInfoEx64(
  HANDLE hProcess, 
  DWORD64 dwAddr, 
  IMAGEHLP_TYPES TypeIn, 
  PBYTE DataIn, 
  IMAGEHLP_TYPES TypeOut, 
  PULONG SizeOut, 
  PBYTE DataOut
);

Parameters

hProcess
[in] Handle to the process that was originally passed to the SymInitialize function.
dwAddr
[in] Specifies the valid, virtual address that is contained in one of the modules loaded by the SymLoadModule function.
TypeIn
[in] Specifies the input type. This parameter can be one of the following values.
Value Meaning
IMAGEHLP_TYPEID_IMAGEHLP_SYMBOL The DataIn parameter is a pointer to an IMAGEHLP_SYMBOL structure.
IMAGEHLP_TYPEID_IMAGEHLP_SYMBOL64 The DataIn parameter is a pointer to an IMAGEHLP_SYMBOL64 structure.
IMAGEHLP_TYPEID_INDEX The DataIn parameter is a pointer to a type index.
IMAGEHLP_TYPEID_NAME The DataIn parameter is a pointer to a string that specifies the symbol name.

DataIn
[in] Pointer to a buffer that specifies the input data.
TypeOut
[in] Specifies the output type. This parameter can be one of the following values.
Value Meaning
IMAGEHLP_TYPEID_INDEX The function takes the symbol name in DataIn and returns its type index in DataOut.
IMAGEHLP_TYPEID_MODULE_TYPE_INFO The function takes the type index from DataIn and returns a MODULE_TYPE_INFO structure.
IMAGEHLP_TYPEID_TYPE_ENUM_INFO The function takes the partial symbol name in DataIn and enumerates all symbols that begin with the same characters. The DataOut parameter is a pointer to a TYPE_ENUM_INFO structure. Each time the function finds a match, it calls the SymTypeNameCallback function specified in the structure.

SizeOut
[in] Specifies the size, in bytes, of the DataOut buffer.
DataOut
[in,out] Pointer to a buffer that receives the data.

Return Values

If the function succeeds, the return value is TRUE.

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

Requirements

  Windows NT/2000: Requires Windows 2000. Available as a redistributable for Windows NT 4.0.
  Windows 95/98: Requires Available as a redistributable for Windows 98.
  Header: Declared in Dbghelp.h.
  Library: Use Dbghelp.lib.

See Also

Debug Help Library Overview, DbgHelp Functions, MODULE_TYPE_INFO, SymInitialize, SymLoadModule, TYPE_ENUM_INFO