SymGetSymFromName64 Function

Debug Help Library

SymGetSymFromName64 Function

Locates a symbol for the specified name.

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

BOOL WINAPI SymGetSymFromName64(
  __in          HANDLE hProcess,
  __in          PCSTR Name,
  __out         PIMAGEHLP_SYMBOL64 Symbol
);

Parameters

hProcess

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

Name

The symbol name for which a symbol is to be located.

Symbol

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

This function supersedes the SymGetSymFromName function. For more information, see Updated Platform Support.

The SymGetSymFromName64 function is used to locate a symbol for a specified name. The name can contain a module prefix that isolates the symbol search to a single module's symbol table.

The module prefix is in the form of "module!". The "!" character is the delimiter between the module name and the symbol name. If there is no module prefix, then the search is performed on each module's symbol table in a linear manner, beginning with the first module that is loaded.

Using the module prefix is preferable for two reasons. First, the symbol search occurs much faster. Second, when deferred symbol loading is turned on, the search causes symbols to be loaded for each module that is searched. 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 SymGetSymFromName64.

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.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

Declared in Dbghelp.h.

Library

Use Dbghelp.lib.

DLL

Requires Dbghelp.dll.

See Also

DbgHelp FunctionsIMAGEHLP_SYMBOL64
SymFromName
SymInitialize


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.