Platform SDK: Debugging and Error Handling

SymEnumerateSymbols

The SymEnumerateSymbols function enumerates all the symbols for a specified module.

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

BOOL SymEnumerateSymbols(
  HANDLE hProcess,                                
  DWORD BaseOfDll,                                
  PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback,  
  PVOID UserContext                               
);

For SymEnumerateSymbols64, the parameter list is as follows.

BOOL SymEnumerateSymbols64(
  HANDLE hProcess,                                
  DWORD64 BaseOfDll,                              
  PSYM_ENUMSYMBOLS_CALLBACK64 EnumSymbolsCallback,
  PVOID UserContext                               
);

Parameters

hProcess
[in] Handle to the process that was originally passed to the SymInitialize function.
BaseOfDll
[in] Specifies the base address of the module for which symbol enumeration is to take place.
EnumSymbolsCallback
[in] Pointer to the callback function that receives the symbol information. For more information, see SymEnumSymbolsCallback.
UserContext
[in] A user-defined value or NULL. This value is simply passed to the callback function. Normally, 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 succeeds, the return value is TRUE.

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

Remarks

The SymEnumerateSymbols function enumerates all the symbols for a desired module. The module information is located by the BaseOfDll parameter. The EnumSymbolsCallback function is called once per symbol and is passed the information for each symbol.

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.
  Library: Use Dbghelp.lib.

See Also

Debug Help Library Overview, DbgHelp Functions, SymEnumSymbolsCallback, SymInitialize