36#define FORMAT_BUFFER_SIZE 512
37#define LINE_BUFFER_SIZE 1024
48 if (szFileName[
wcslen(szFileName)] !=
L'\\')
52 (
sizeof(szFileName) /
sizeof(szFileName[0])) -
wcslen(szFileName));
56 (
sizeof(szFileName) /
sizeof(szFileName[0])) -
wcslen(szFileName));
58 if (bDeleteOldLogFile)
104 ULONG ulLineSize, ulOutputSize;
119 if (pszFormatBuffer ==
NULL)
133 if (pszLineBuffer ==
NULL)
138 L"%02d/%02d/%04d %02d:%02d:%02d.%03d, %s, %d, %s, %s\r\n",
148 pszTag ? pszTag :
L"",
149 pszFormatBuffer ? pszFormatBuffer :
L"");
152 ulLineSize =
wcslen(pszLineBuffer) *
sizeof(
WCHAR);
161 if (pszOutputBuffer ==
NULL)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
__CRT_INLINE int __cdecl vsnwprintf(wchar_t *s, size_t n, const wchar_t *format, va_list arg)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL WINAPI InitializeSetupActionLog(BOOL bDeleteOldLogFile)
VOID CDECL pSetupDebugPrint(IN PCWSTR pszFileName, IN INT nLineNumber, IN PCWSTR pszTag, IN PCWSTR pszMessage,...)
#define FORMAT_BUFFER_SIZE
VOID WINAPI TerminateSetupActionLog(VOID)
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)
_CRTIMP wchar_t *__cdecl wcsncat(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
WORD WORD PSZ PSZ pszFileName