75 msgLen =
wcslen(lpMsg) + 1;
90 msgLen = msgLen + eMsgLen + 40;
94 msgLen *
sizeof(
TCHAR));
99 L"%s : %s\tErrNum = %lu ExitCode = %lu\r\n",
115 msgLen *
sizeof(
TCHAR));
126 msgLen =
wcslen(lpFullMsg);
231 WCHAR wcBom = 0xFEFF;
static VOID LogToFile(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
static OVERLAPPED olWrite
static WCHAR szLogFileName[MAX_PATH]
static LPWSTR lpEventSource
static BOOL OpenLogFile()
VOID LogEvent(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
static VOID LogToEventLog(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
BOOL WINAPI CloseEventLog(IN HANDLE hEventLog)
BOOL WINAPI ReportEventW(IN HANDLE hEventLog, IN WORD wType, IN WORD wCategory, IN DWORD dwEventID, IN PSID lpUserSid, IN WORD wNumStrings, IN DWORD dwDataSize, IN LPCWSTR *lpStrings, IN LPVOID lpRawData)
HANDLE WINAPI RegisterEventSourceW(IN LPCWSTR lpUNCServerName, IN LPCWSTR lpSourceName)
#define GetEnvironmentVariableW(x, y, z)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FILE_ATTRIBUTE_NORMAL
VOID WINAPI RaiseException(_In_ DWORD dwExceptionCode, _In_ DWORD dwExceptionFlags, _In_ DWORD nNumberOfArguments, _In_opt_ const ULONG_PTR *lpArguments)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
VOID WINAPI ExitProcess(IN UINT uExitCode)
GLenum GLsizei GLuint GLint * bytesWritten
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
#define FILE_FLAG_OVERLAPPED
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
#define EXCEPTION_INT_OVERFLOW
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define EVENTLOG_ERROR_TYPE