#include "precomp.h"
#include <stdarg.h>
Go to the source code of this file.
◆ FORMAT_BUFFER_SIZE
#define FORMAT_BUFFER_SIZE 512 |
◆ LINE_BUFFER_SIZE
◆ InitializeSetupActionLog()
Definition at line 42 of file logfile.c.
43{
45
47
48 if (szFileName[
wcslen(szFileName)] !=
L'\\')
49 {
52 (
sizeof(szFileName) /
sizeof(szFileName[0])) -
wcslen(szFileName));
53 }
56 (
sizeof(szFileName) /
sizeof(szFileName[0])) -
wcslen(szFileName));
57
58 if (bDeleteOldLogFile)
59 {
62 }
63
72 {
75 }
76
78}
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
Referenced by InstallReactOS().
◆ pSetupDebugPrint()
Definition at line 94 of file logfile.c.
100{
104 ULONG ulLineSize, ulOutputSize;
108
110 return;
111
113
114 if (pszMessage)
115 {
119 if (pszFormatBuffer ==
NULL)
120 goto done;
121
125 pszMessage,
128 }
129
133 if (pszLineBuffer ==
NULL)
134 goto done;
135
138 L"%02d/%02d/%04d %02d:%02d:%02d.%03d, %s, %d, %s, %s\r\n",
147 nLineNumber,
148 pszTag ? pszTag :
L"",
149 pszFormatBuffer ? pszFormatBuffer :
L"");
150
151
152 ulLineSize =
wcslen(pszLineBuffer) *
sizeof(
WCHAR);
154 pszLineBuffer,
155 ulLineSize);
156
157
160 ulOutputSize);
161 if (pszOutputBuffer ==
NULL)
162 goto done;
163
164
166 ulOutputSize,
168 pszLineBuffer,
169 ulLineSize);
170
171
173 0,
176
178 pszOutputBuffer,
179 ulOutputSize,
180 &dwWritten,
182
183done:
184 if (pszOutputBuffer)
186
187 if (pszLineBuffer)
189
190 if (pszFormatBuffer)
192}
#define HeapFree(x, y, z)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
__CRT_INLINE int __cdecl vsnwprintf(wchar_t *s, size_t n, const wchar_t *format, va_list arg)
#define FORMAT_BUFFER_SIZE
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
WORD WORD PSZ PSZ pszFileName
◆ TerminateSetupActionLog()
◆ hLogFile