Expand Minimize

IDebugControl::OpenLogFile method

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

Syntax


HRESULT OpenLogFile(
  [in]  PCSTR File,
  [in]  BOOL Append
);

Parameters

File [in]

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.

Append [in]

Specifies whether or not to append log messages to an existing log file. If TRUE, log messages will be appended to the file; if FALSE, the contents of any existing file matching File are discarded.

Return value

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

Return codeDescription
S_OK

The method was successful.

 

Remarks

OpenLogFile and OpenLogFileWide behave the same way as OpenLogFile2 and OpenLogFile2Wide with Flags set to DEBUG_LOG_APPEND if Append is TRUE and DEBUG_LOG_DEFAULT otherwise.

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

Header

Dbgeng.h (include Dbgeng.h)

See also

IDebugControl
IDebugControl2
IDebugControl3
OpenLogFile2
GetLogFile
CloseLogFile
GetLogMask
SetLogMask
.logopen (Open Log File)
.logappend (Append Log File)

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft