IDebugControl4::OpenLogFile2Wide method (dbgeng.h)

The OpenLogFile2Wide method opens a log file that will receive output from the client objects.

Syntax

HRESULT OpenLogFile2Wide(
  [in] PCWSTR File,
  [in] ULONG  Flags
);

Parameters

[in] File

Specifies the name of the log file. File can include a relative or absolute path; relative paths are relative to the directory in which the debugger was started. If the file does not exist, it will be created.

[in] Flags

Specifies the bit-flags that control the nature of the log file. Flags can contain flags from the following table.

Flag Effect when set
DEBUG_LOG_APPEND Output will be appended to the log file instead of discarding the contents of the log file.
DEBUG_LOG_UNICODE The format of the log file will be Unicode instead of ASCII.
 

Alternatively, Flags can be set to DEBUG_LOG_DEFAULT for the default set of options that contains none of the flags.

Return value

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

Return code Description
S_OK
The method was successful.

Remarks

Only one log file can be open at a time. If there is already a log file open, it will be closed.

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

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

.logappend (Append Log File)

.logopen (Open Log File)

CloseLogFile

GetLogFile2

GetLogMask

IDebugControl4

OpenLogFile

SetLogMask