Platform SDK: Debugging and Error Handling

SymRegisterFunctionEntryCallback

The SymRegisterFunctionEntryCallback function lets an application register a callback function for use by the stack walking procedure on Alpha computers.

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

BOOL SymRegisterFunctionEntryCallback(
  HANDLE hProcess,                               
  PSYMBOL_FUNCENTRY_CALLBACK CallbackFunction,   
  PVOID UserContext                              
);

For SymRegisterFunctionEntryCallback64, the parameter list is as follows.

BOOL SymRegisterFunctionEntryCallback64(
  HANDLE hProcess,                                
  PSYMBOL_FUNCENTRY_CALLBACK64 CallbackFunction,  
  ULONG64 UserContext                             
);

Parameters

hProcess
[in] Handle to the process that was originally passed to the StackWalk function.
CallbackFunction
[in] Pointer to a callback function. For more information, see SymbolRegisteredFunctionEntryCallback.
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 SymRegisterFunctionEntryCallback function lets an application register a callback function for use by the stack walking procedure. The stack walking procedure calls the registered callback function when it is unable to locate a function table entry for an address. In most cases, the stack walking procedure locates the function table entries in the function table of the image containing the address. However, in situations where the function table entries are not in the image, this callback allows the debugger to provide the function table entry from another source. For example, run-time generated code on Alpha computers can define dynamic function tables to support exception handling and stack tracing.

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, SymbolRegisteredFunctionEntryCallback, StackWalk