PSYMBOL_REGISTERED_CALLBACK callback function (dbghelp.h)
An application-defined callback function used with the SymRegisterCallback64 function. It is called by the symbol handler.
The PSYMBOL_REGISTERED_CALLBACK64 type defines a pointer to this callback function. SymRegisterCallbackProc64 is a placeholder for the application-defined function name.
Syntax
PSYMBOL_REGISTERED_CALLBACK PsymbolRegisteredCallback;
BOOL PsymbolRegisteredCallback(
[in] HANDLE hProcess,
[in] ULONG ActionCode,
[in, optional] PVOID CallbackData,
[in, optional] PVOID UserContext
)
{...}
Parameters
[in] hProcess
A handle to the process that was originally passed to the SymInitialize function.
[in] ActionCode
The callback code. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
Display verbose information.
The CallbackData parameter is a pointer to a string. |
|
Deferred symbol loading has started. To cancel the symbol load, return TRUE.
The CallbackData parameter is a pointer to a IMAGEHLP_DEFERRED_SYMBOL_LOAD64 structure. |
|
Deferred symbol load has completed.
The CallbackData parameter is a pointer to a IMAGEHLP_DEFERRED_SYMBOL_LOAD64 structure. |
|
Deferred symbol load has failed.
The CallbackData parameter is a pointer to a IMAGEHLP_DEFERRED_SYMBOL_LOAD64 structure. The symbol handler will attempt to load the symbols again if the callback function sets the FileName member of this structure. |
|
Deferred symbol load has partially completed. The symbol loader is unable to read the image header from either the image file or the specified module.
The CallbackData parameter is a pointer to a IMAGEHLP_DEFERRED_SYMBOL_LOAD64 structure. The symbol handler will attempt to load the symbols again if the callback function sets the FileName member of this structure. DbgHelp 5.1: This value is not supported. |
|
Deferred symbol load has started.
The CallbackData parameter is a pointer to a IMAGEHLP_DEFERRED_SYMBOL_LOAD64 structure. |
|
Duplicate symbols were found. This reason is used only in COFF or CodeView format.
The CallbackData parameter is a pointer to a IMAGEHLP_DUPLICATE_SYMBOL64 structure. To specify which symbol to use, set the SelectedSymbol member of this structure. |
|
Display verbose information. If you do not handle this event, the information is resent through the CBA_DEBUG_INFO event.
The CallbackData parameter is a pointer to a IMAGEHLP_CBA_EVENT structure. |
|
The loaded image has been read.
The CallbackData parameter is a pointer to a IMAGEHLP_CBA_READ_MEMORY structure. The callback function should read the number of bytes specified by the bytes member into the buffer specified by the buf member, and update the bytesread member accordingly. |
|
Symbol options have been updated. To retrieve the current options, call the
SymGetOptions function.
The CallbackData parameter should be ignored. |
|
Display verbose information for source server. If you do not handle this event, the information is resent through the CBA_DEBUG_INFO event.
The CallbackData parameter is a pointer to a IMAGEHLP_CBA_EVENT structure. DbgHelp 6.6 and earlier: This value is not supported. |
|
Display verbose information for source server.
The CallbackData parameter is a pointer to a string. DbgHelp 6.6 and earlier: This value is not supported. |
|
Symbols have been unloaded.
The CallbackData parameter should be ignored. |
[in, optional] CallbackData
Data for the operation. The format of this data depends on the value of the ActionCode parameter.
If the callback function was registered with SymRegisterCallbackW64, the data is a Unicode string or data structure. Otherwise, the data uses ANSI format.
[in, optional] UserContext
User-defined value specified in SymRegisterCallback64, 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 value
To indicate success handling the code, return TRUE.
To indicate failure handling the code, return FALSE. If your code does not handle a particular code, you should also return FALSE. (Returning TRUE in this case may have unintended consequences.)
Remarks
The calling application gets called through the registered callback function as a result of another call to one of the symbol handler functions. 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 care may be necessary to synchronize some types of data access while in the context of the callback function.
This callback function supersedes the PSYMBOL_REGISTERED_CALLBACK callback function. PSYMBOL_REGISTERED_CALLBACK is defined as follows in Dbghelp.h.
#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
#define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
#else
typedef BOOL
(CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
__in HANDLE hProcess,
__in ULONG ActionCode,
__in_opt PVOID CallbackData,
__in_opt PVOID UserContext
);
#endif
For a more extensive example, read Getting Notifications.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | dbghelp.h |
Redistributable | DbgHelp.dll 5.1 or later |