Platform SDK: Debugging and Error Handling

SymRegisterCallback

The SymRegisterCallback function lets an application register a callback function for use by the symbol handler.

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

BOOL SymRegisterCallback(
  HANDLE hProcess,                               
  PSYMBOL_REGISTERED_CALLBACK CallbackFunction,  
  PVOID UserContext                              
);

For SymRegisterCallback64, the parameter list is as follows.

BOOL SymRegisterCallback64(
  HANDLE hProcess,                               
  PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,  
  ULONG64 UserContext                              
);

Parameters

hProcess
[in] Handle to the process that was originally passed to the SymInitialize function.
CallbackFunction
[in] Pointer to a callback function. For more information, see SymbolRegisteredCallback.
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 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 SymRegisterCallback function lets an application register a callback function for use by the symbol handler. The symbol handler calls the registered callback function when there is status or progress information for the application.

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, SymbolRegisteredCallback, SymInitialize