SymRegisterCallback64 function

Registers a callback function for use by the symbol handler.

Syntax


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

Parameters

hProcess [in]

A handle to the process that was originally passed to the SymInitialize function.

CallbackFunction [in]

A SymRegisterCallbackProc64 callback function.

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 value

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 SymRegisterCallback64 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.

All DbgHelp functions, such as this one, are single threaded. Therefore, calls from more than one thread to this function will likely result in unexpected behavior or memory corruption. To avoid this, you must synchronize all concurrent calls from more than one thread to this function.

To call the Unicode version of this function, define DBGHELP_TRANSLATE_TCHAR. SymRegisterCallbackW64 is defined as follows in Dbghelp.h.


BOOL
IMAGEAPI
SymRegisterCallbackW64(
    __in HANDLE hProcess,
    __in PSYMBOL_REGISTERED_CALLBACK64 CallbackFunction,
    __in ULONG64 UserContext
    );

#ifdef DBGHELP_TRANSLATE_TCHAR
#define SymRegisterCallback64   SymRegisterCallbackW64
#endif

This function supersedes the SymRegisterCallback function. For more information, see Updated Platform Support. SymRegisterCallback is defined as follows in Dbghelp.h.


#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
#define SymRegisterCallback SymRegisterCallback64
#else
BOOL
IMAGEAPI
SymRegisterCallback(
    __in HANDLE hProcess,
    __in PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
    __in_opt PVOID UserContext
    );
#endif

For a more extensive example, read Getting Notifications.

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

Dbghelp.h

Library

Dbghelp.lib

DLL

Dbghelp.dll

Unicode and ANSI names

SymRegisterCallbackW64 (Unicode) and SymRegisterCallback64 (ANSI)

See also

DbgHelp Functions
Getting Notifications
SymRegisterCallbackProc64
SymInitialize

 

 

Show: