Platform SDK: Debugging and Error Handling

SymEnumSymbolsCallback

The SymEnumSymbolsCallback function is an application-defined callback function used with the SymEnumerateSymbols function. It is called once for each enumerated symbol, and receives the symbol information.

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

BOOL CALLBACK SymEnumSymbolsCallback(
  PTSTR  SymbolName,    
  ULONG SymbolAddress,  
  ULONG SymbolSize,     
  PVOID UserContext     
);

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

BOOL CALLBACK SymEnumSymbolsCallback64(
  PTSTR  SymbolName,     
  DWORD64 SymbolAddress, 
  ULONG SymbolSize,      
  PVOID UserContext      
);

Parameters

SymbolName
[in] Pointer to a null-terminated string that specifies the name of the symbol. The name can be undecorated if the SYMOPT_UNDNAME option is used with the SymSetOptions function.
SymbolAddress
[in] Specifies the virtual address for the beginning of the symbol.
SymbolSize
[in] Specifies the size of the symbol, in bytes. The size is calculated and is actually a best-guess value. In some cases, the value can be zero.
UserContext
[in] A user-defined value specified in SymEnumerateSymbols, 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 function returns TRUE, the enumeration will continue.

If the function returns FALSE, the enumeration will stop.

Remarks

The calling application is called once per symbol until all the symbols 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, SymEnumerateSymbols