#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <tchar.h>
#include <stdarg.h>
Go to the source code of this file.
◆ main()
Definition at line 199 of file logevent.c.
200{
203
204 return 0;
205}
static BOOL ParseCmdline(int argc, TCHAR **argv)
◆ ParseCmdline()
Definition at line 89 of file logevent.c.
90{
95
98 } else {
100 }
101
102 FoundEventText =
FALSE;
104
107 switch (
argv[
i][1]) {
108 case 's':
109 case 'S':
110 switch (
argv[
i + 1][0])
111 {
112 case 's':
113 case 'S':
116 break;
117 case 'i':
118 case 'I':
121 break;
122 case 'w':
123 case 'W':
126 break;
127 case 'e':
128 case 'E':
131 break;
132 case 'f':
133 case 'F':
136 break;
137 default:
141 }
142 break;
143 case 'm':
144 case 'M':
147 break;
148 case 'r':
149 case 'R':
152 break;
153 case 'c':
154 case 'C':
157 break;
158 case 'e':
159 case 'E':
162 break;
163 case '?':
165 break;
166 default:
170 }
174 }
175 } else {
176 if (FoundEventText) {
179 } else {
181 FoundEventText =
TRUE;
182 }
183 }
184 }
185
187 printf(
"The event text must be specified.\n");
189 }
190
194 }
195
197}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static void ShowUsage(int ExitCode)
#define EVENTLOG_ERROR_TYPE
#define EVENTLOG_INFORMATION_TYPE
#define EVENTLOG_WARNING_TYPE
Referenced by main().
◆ Usage()
Definition at line 42 of file logevent.c.
43{
44 fputs(
"Usage: logevent.exe [-m \\MachineName] [options] \"Event Text\"",
stderr);
57}
_Check_return_opt_ _CRTIMP int __cdecl fputs(_In_z_ const char *_Str, _Inout_ FILE *_File)
◆ WriteEvent()
Definition at line 60 of file logevent.c.
61{
65
66
70
71
73 hAppLog,
78 1,
79 0,
80 arrLogEntry,
82
84
85 return;
86}
BOOL WINAPI DeregisterEventSource(IN HANDLE hEventLog)
#define RegisterEventSource
Referenced by main().
◆ m_Category
◆ m_EventID
◆ m_MachineName
◆ m_Severity
◆ m_Source
TCHAR* m_Source = "User Event" |
◆ m_Text