SymGetHomeDirectory Function

Debug Help Library

SymGetHomeDirectory Function

Retrieves the home directory used by Dbghelp.

PTCHAR WINAPI SymGetHomeDirectory(
  __in          DWORD type,
  __out         PTSTR dir,
  __in          size_t size
);

Parameters

type

The directory to be retrieved. This parameter can be one of the following values.

Value Meaning

hdBase
0

The home directory.

hdSrc
2

The source directory.

hdSym
1

The symbol directory.

dir

A pointer to a string that receives the directory.

size

The size of the output buffer, in characters.

Return Value

If the function succeeds, the return value is a pointer to the dir parameter.

If the function fails, the return value is NULL. To retrieve extended error information, call GetLastError.

Remarks

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 6.1 or later.

Header

Declared in Dbghelp.h.

Library

Use Dbghelp.lib.

DLL

Requires Dbghelp.dll.

Unicode

Implemented as SymGetHomeDirectoryW (Unicode) and SymGetHomeDirectory (ANSI).

See Also

DbgHelp Functions
SymSetHomeDirectory


Send comments about this topic to Microsoft

Build date: 9/25/2007

© 2007 Microsoft Corporation. All rights reserved.