SymGetSearchPath Function

Debug Help Library

SymGetSearchPath Function

Retrieves the symbol search path for the specified process.

BOOL WINAPI SymGetSearchPath(
  __in          HANDLE hProcess,
  __out         PTSTR SearchPath,
  __in          DWORD SearchPathLength
);

Parameters

hProcess

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

SearchPath

A pointer to the buffer that receives the symbol search path.

SearchPathLength

The size of the SearchPath buffer, in characters.

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 SymGetSearchPath function copies the symbol search path for the specified process into the SearchPath buffer. If the function fails, the contents of the buffer are undefined.

To specify a symbol search path for the process, use the SymSetSearchPath function.

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.

Requirements

Redistributable

Requires DbgHelp.dll 5.1 or later.

Header

Declared in Dbghelp.h.

Library

Use Dbghelp.lib.

DLL

Requires Dbghelp.dll.

Unicode

Implemented as SymGetSearchPathW (Unicode) and SymGetSearchPath (ANSI).

See Also

DbgHelp FunctionsSymInitialize
SymSetSearchPath


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.