Export (0) Print
Expand All
Expand Minimize

SymGetSymFromAddr64 function

Locates the symbol for the specified address.

Note  This function is provided only for compatibility. Applications should use SymFromAddr.

Syntax


BOOL WINAPI SymGetSymFromAddr64(
  _In_       HANDLE hProcess,
  _In_       DWORD64 Address,
  _Out_opt_  PDWORD64 Displacement,
  _Inout_    PIMAGEHLP_SYMBOL64 Symbol
);

Parameters

hProcess [in]

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

Address [in]

The address for which a symbol is to be located. The address does not have to be on a symbol boundary. If the address comes after the beginning of a symbol and before the end of the symbol (the beginning of the symbol plus the symbol size), the symbol is found.

Displacement [out, optional]

The displacement from the beginning of the symbol, or zero.

Symbol [in, out]

A pointer to an IMAGEHLP_SYMBOL64 structure.

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 SymGetSymFromAddr64 function locates the symbol for a specified address. The modules are searched for the one the address belongs to. When the module is found, its symbol table is searched for a match. When the symbol is found, the symbol information is copied into the Symbol buffer provided by the caller. The caller must allocate the Symbol buffer properly and fill in the required parameters in the IMAGEHLP_SYMBOL64 structure before calling SymGetSymFromAddr64.

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.

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


#if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
#define SymGetSymFromAddr SymGetSymFromAddr64
#else
BOOL
IMAGEAPI
SymGetSymFromAddr(
    __in HANDLE hProcess,
    __in DWORD dwAddr,
    __out_opt PDWORD pdwDisplacement,
    __inout PIMAGEHLP_SYMBOL Symbol
    );
#endif

Requirements

Redistributable

DbgHelp.dll 5.1 or later

Header

Dbghelp.h

Library

Dbghelp.lib

DLL

Dbghelp.dll

See also

DbgHelp Functions
IMAGEHLP_SYMBOL64
SymFromAddr
SymInitialize

 

 

Community Additions

ADD
Show:
© 2014 Microsoft