Debugging Tools for Windows

GetSourcePathElement

The GetSourcePathElement and GetSourcePathElementWide methods return an element from the source path.

IDebugSymbols::GetSourcePathElement(
    IN ULONG  Index,
    OUT OPTIONAL PSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  ElementSize
    );

IDebugSymbols3::GetSourcePathElementWide(
    IN ULONG  Index,
    OUT OPTIONAL PWSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  ElementSize
    );

#ifdef UNICODE
#define GetSourcePathElementT GetSourcePathElementWide
#else
#define GetSourcePathElementT GetSourcePathElement
#endif

Parameters

Index
Specifies the index of the element in the source path that will be returned. The source path is a string that contains elements separated by semicolons (;). The index of the first element is zero.
Buffer
Receives the source path element. Each source path element can be a directory or a source server. If Buffer is NULL, this information is not returned.
BufferSize
Specifies the size, in characters, of the Buffer buffer.
ElementSize
Receives the size, in characters, of the source path element.

Return Value

S_OK
The method was successful.
E_NOINTERFACE
The source path contains fewer than Index elements.

These methods can also return error values. See Return Values for more details.

Interface Version

GetSourcePathElement is available in all versions of IDebugSymbols. GetSourcePathElementWide is available in IDebugSymbols3 and later versions.

Comments

The source path is used by the engine when searching for source files.

For more information about manipulating the source path, see Using Source Files. For an overview of the source path and its syntax, see Source Path.

Requirements

Headers: Defined in Dbgeng.h. Include Dbgeng.h.

See Also

AppendSourcePath, GetSourcePath

Build machine: CAPEBUILD