Platform SDK: Debugging and Error Handling |
The SymGetSymFromAddr function locates the symbol for the specified address.
This function is implemented as a wrapper that calls SymGetSymFromAddr64. For more information, see New 64-bit Functions.
BOOL SymGetSymFromAddr( HANDLE hProcess, DWORD Address, PDWORD Displacement, PIMAGEHLP_SYMBOL Symbol );
For SymGetSymFromAddr64, the parameter list is as follows.
BOOL SymGetSymFromAddr64( HANDLE hProcess, DWORD64 Address, PDWORD64 Displacement, PIMAGEHLP_SYMBOL64 Symbol );
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.
The SymGetSymFromAddr 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_SYMBOL structure before calling SymGetSymFromAddr.
Windows NT/2000: Requires Windows NT 4.0 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in Dbghelp.h.
Library: Use Dbghelp.lib.
Debug Help Library Overview, DbgHelp Functions, IMAGEHLP_SYMBOL, SymInitialize