Go to the source code of this file.
◆ InitLogging()
Definition at line 167 of file log.c.
168{
169 WCHAR wcBom = 0xFEFF;
170
172
173#ifdef _UNICODE
175 {
177
179 &wcBom,
184 {
187 0,
189 }
190
192 }
193#endif
194}
static BOOL OpenLogFile()
static VOID LogToEventLog(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
GLenum GLsizei GLuint GLint * bytesWritten
static LPTSTR lpLogFileName
DWORD WINAPI GetLastError(void)
◆ LogEvent()
Definition at line 152 of file log.c.
156{
157#ifdef DEBUG
160#endif
163}
static VOID LogToFile(LPCWSTR lpMsg, DWORD errNum, DWORD exitCode, UINT flags)
◆ LogToEventLog()
Definition at line 18 of file log.c.
22{
24
26 if (hEventLog)
27 {
30 0,
31 0,
33 1,
34 0,
35 &lpMsg,
37
39 }
40}
static LPWSTR lpEventSource
BOOL WINAPI CloseEventLog(IN HANDLE hEventLog)
#define RegisterEventSource
#define EVENTLOG_ERROR_TYPE
◆ LogToFile()
Definition at line 59 of file log.c.
63{
66
69
71
73 {
76
79 errNum,
82 0,
84
85 msgLen = msgLen + eMsgLen + 40;
86
88 0,
89 msgLen *
sizeof(
TCHAR));
90 if (lpFullMsg)
91 {
93 msgLen,
94 _T(
"%s : %s\tErrNum = %lu ExitCode = %lu\r\n"),
95 lpMsg,
96 lpSysMsg,
97 errNum,
98 exitCode);
99 }
100
102
103 }
104 else
105 {
106 msgLen += 2;
107
109 0,
110 msgLen *
sizeof(
TCHAR));
111 if (lpFullMsg)
112 {
114 msgLen,
116 lpMsg);
117 }
118 }
119
120 if (lpFullMsg)
121 {
123
125
127 lpFullMsg,
132 {
135 0,
137 }
138
140 0,
141 lpFullMsg);
142 }
143
145
146 if (exitCode > 0)
148}
#define HeapFree(x, y, z)
VOID WINAPI ExitProcess(IN UINT uExitCode)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
◆ OpenLogFile()
static BOOL OpenLogFile |
( |
| ) |
|
|
static |
Definition at line 43 of file log.c.
44{
47 0,
54
56}
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
◆ hLogFile
Definition at line 14 of file log.c.
◆ lpEventSource
LPTSTR lpEventSource = _T("Skeleton service") |
|
static |
Definition at line 12 of file log.c.
◆ lpLogFileName
LPTSTR lpLogFileName = _T("C:\\skel_service.log") |
|
static |