IDebugControl2::OpenLogFile method (dbgeng.h)
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
[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] Append
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 code | Description |
---|---|
|
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
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dbgeng.h (include Dbgeng.h) |