Debugging Tools for Windows

GetLogFile2

The GetLogFile2 and GetLogFile2Wide methods return the name of the currently open log file.

HRESULT
  IDebugControl4::GetLogFile2(
    OUT OPTIONAL PSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  FileSize,
    OUT PULONG  Flags
    );

HRESULT
  IDebugControl4::GetLogFile2Wide(
    OUT OPTIONAL PWSTR  Buffer,
    IN ULONG  BufferSize,
    OUT OPTIONAL PULONG  FileSize,
    OUT PULONG  Flags
    );

#ifdef UNICODE
#define GetLogFile2T GetLogFile2Wide
#else
#define GetLogFile2T GetLogFile2
#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.
Flags
Receives the bit-flags that were used when opening the log file. See the Flags parameter of OpenLogFile2 for a description of these flags.

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

GetLogFile2 and GetLogFile2Wide are available in IDebugControl4 and later versions.

Comments

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

Requirements

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

See Also

OpenLogFile2, GetLogFile, CloseLogFile, GetLogMask, .logfile

Build machine: CAPEBUILD