Platform SDK: Debugging and Error Handling

SymbolRegisteredFunctionEntryCallback

The SymbolRegisteredFunctionEntryCallback function is an application-defined callback function used with the SymRegisterFunctionEntryCallback function. It is called by the stack walking procedure.

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

PVOID CALLBACK SymbolRegisteredFunctionEntryCallback(
  HANDLE hProcess,     
  DWORD AddrBase,  
  PVOID UserContext    
);

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

PVOID CALLBACK SymbolRegisteredFunctionEntryCallback64(
  HANDLE hProcess,     
  ULONG64 AddrBase,  
  ULONG64 UserContext    
);

Parameters

hProcess
[in] Handle to the process that was originally passed to the StackWalk function.
AddrBase
[in] Address of an instruction for which the callback function should return a function table entry.
UserContext
[in] A user-defined value specified in SymRegisterFunctionEntryCallback, 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 context.

Return Values

Returning the value NULL indicates that no function table entry is available.

On success, return a pointer to an IMAGE_RUNTIME_FUNCTION_ENTRY structure.

Remarks

The structure must be returned in exactly the form it exists in the process being debugged. Some members may be pointers to other locations in the process address space. The ReadProcessMemoryProc callback function may be called to retrieve the information at these locations.

The calling application gets called through the registered callback function as a result of a call to the StackWalk function. The calling application must be prepared for the possible side effects that this can cause. If the application has only one callback function that is being used by multiple threads, then it may be necessary to synchronize some types of data access while in the context of the callback function.

This function is similar to the FunctionTableAccessProc callback function on Windows NT 4.0. The difference is that FunctionTableAccessProc returns an IMAGE_FUNCTION_ENTRY structure, while this function returns an IMAGE_RUNTIME_FUNCTION_ENTRY structure. Windows 2000 for Alpha computers supports enhancements to the Alpha calling standard which require the full IMAGE_RUNTIME_FUNCTION_ENTRY structure rather than the abbreviated IMAGE_FUNCTION_ENTRY structure.

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.

See Also

Debug Help Library Overview, DbgHelp Functions, SymRegisterFunctionEntryCallback