Debugging Tools for Windows

GetLogFile

The GetLogFile and GetLogFileWide methods return the name of the currently open log file.

HRESULT
  IDebugControl::GetLogFile(
    OUT OPTIONAL PSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  FileSize,
    OUT PBOOL  Append
    );

HRESULT
  IDebugControl4::GetLogFileWide(
    OUT OPTIONAL PWSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  FileSize,
    OUT PBOOL  Append
    );

#ifdef UNICODE
#define GetLogFileT GetLogFileWide
#else
#define GetLogFileT GetLogFile
#endif

Parameters

Buffer
Receives the name of the currently open log file. If Buffer is NULL, this information is not returned.
BufferSize
Specifies the size, in characters, of the Buffer buffer.
FileSize
Receives the size, in characters, of the name of the log file. If FileSize is NULL, this information is not returned.
Append
Receives TRUE if log messages are appended to the log file, or FALSE if the contents of the log file were discarded when the file was opened.

Return Value

S_OK
The method was successful.
S_FALSE
The method was successful. However, the name of the log file was too long to fit in the Buffer buffer so the name was truncated.
E_NOINTERFACE
There is no currently open log file.

This method can also return error values. See Return Values for more details.

Interface Version

GetLogFile is available in all versions of IDebugControl. GetLogFileWide is available in IDebugControl4 and later versions.

Comments

GetLogFile and GetLogFileWide behave the same way as GetLogFile2 and GetLogFile2Wide with Append receiving only the information about the DEBUG_LOG_APPEND flag.

For more information about log files, see Using Input and Output.

Requirements

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

See Also

OpenLogFile, GetLogFile2, CloseLogFile, GetLogMask, .logfile

Build machine: CAPEBUILD