Platform SDK: Debugging and Error Handling

SymEnumModulesCallback

The SymEnumModulesCallback function is an application-defined callback function used with the SymEnumerateModules function. It is called once for each enumerated module, and receives the module information.

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

BOOL CALLBACK SymEnumModulesCallback(
  PSTR ModuleName, 
  ULONG BaseOfDll,  
  PVOID UserContext 
);

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

BOOL CALLBACK SymEnumModulesCallback64(
  PSTR ModuleName, 
  DWORD64 BaseOfDll,  
  PVOID UserContext 
);

Parameters

ModuleName
[in] Pointer to a null-terminated string that specifies the name of the module.
BaseOfDll
[in] Specifies the base address where the module is loaded into memory.
UserContext
[in] A user-defined value specified in SymEnumerateModules, or NULL. Typically, this parameter is used by an application to pass a pointer to a data structure that lets the callback function establish some type of context.

Return Values

If the return value is TRUE, the enumeration will continue.

If the return value is FALSE, the enumeration will stop.

Remarks

The calling application is called once per module until all modules are enumerated, or until the enumeration callback function returns FALSE.

Requirements

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

See Also

Debug Help Library Overview, DbgHelp Functions, SymEnumerateModules