Debugging Tools for Windows |
The OpenLogFile2 and OpenLogFile2Wide methods open a log file that will receive output from the client objects.
HRESULT
IDebugControl4::OpenLogFile2(
IN PCSTR File,
IN ULONG Flags
);
HRESULT
IDebugControl4::OpenLogFile2Wide(
IN PCWSTR File,
IN ULONG Flags
);
#ifdef UNICODE
#define OpenLogFile2T OpenLogFile2Wide
#else
#define OpenLogFile2T OpenLogFile2
#endif
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.
This method can also return error values. See Return Values for more details.
OpenLogFile2 and OpenLogFile2Wide are available in IDebugControl4 and later versions.
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.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.
OpenLogFile, GetLogFile2, CloseLogFile, GetLogMask, SetLogMask, .logopen (Open Log File), .logappend (Append Log File)