Debugging Tools for Windows

GetImagePath

The GetImagePath and GetImagePathWide methods return the executable image path.

IDebugSymbols::GetImagePath(
    OUT OPTIONAL PSTR  Buffer,
    IN ULONG  BufferSize,
    Out OPTIONAL PULONG  PathSize
    );

IdebugSymbols3::GetImagePathWide(
    OUT OPTIONAL PWSTR  Buffer,
    IN ULONG  BufferSize,
    Out OPTIONAL PULONG  PathSize
    );

#ifdef UNICODE
#define GetImagePathT GetImagePathWide
#else
#define GetImagePathT GetImagePath
#endif

Parameters

Buffer
Receives the executable image path. This is a string that contains directories separated by semicolons (;). If Buffer is NULL, this information is not returned.
BufferSize
Specifies the size, in characters, of the Buffer buffer.
PathSize
Receives the size, in characters, of the executable image path.

Return Value

S_OK
The method was successful.
S_FALSE
The method was successful. However, the buffer was not large enough to hold the executable image path and the path was truncated.

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

Interface Version

GetImagePath is available in all versions of IDebugSymbols. GetImagePathWide is available in IDebugSymbols3 and later versions.

Comments

The executable image path is used by the engine when searching for executable images.

The executable image path can consist of several directories separated by semicolons. These directories are searched in order.

For more information about the executable image path, see Executable Image Path.

Requirements

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

See Also

SetImagePath, AppendImagePath

Build machine: CAPEBUILD