48{
51 BOOL bUseTimer = (timerValue != -1);
61
62
65 {
68 }
69
70
71 if (bNoBreak && bUseTimer)
72 {
75 {
76
79 }
80 }
81 if (bUseTimer)
83
84
85 if (bNoBreak)
87
88
91 {
92
95 goto Quit;
96 }
97
99
100
101 if (!bUseTimer)
102 {
105 }
106
108 {
109
110 if (bUseTimer)
111 {
112
113
114
115
116
117
119 if (timeElapsed >= 1000)
120 {
121
122 timeElapsed /= 1000;
123 dwStartTime += (1000 * timeElapsed);
124
125 if (timeElapsed <= timerValue)
126 timerValue -= timeElapsed;
127 else
128 timerValue = 0;
129
131 }
132
133 if (DisplayMsg)
134 {
138
140 }
141
142
143 if (timerValue <= 0)
144 break;
145 }
146
147
148 if (bNoBreak)
149 {
150 if (bUseTimer)
151 {
153
154
156 if (timeElapsed < 1000)
157 {
161
162
164 {
165
168 break;
169 }
170 }
171 }
172 else
173 {
174
176 }
177
178 continue;
179 }
180
181
182
183
184
185
186
187
188
189
190
191
192 if (bUseTimer)
193 {
194
196 if (timeElapsed < 1000)
198 else
200
201
203 continue;
205 {
206
209 break;
210 }
211
212
214 {
215
218 break;
219 }
220
221 if (NumRecords == 0)
222 continue;
223 }
224
225
226
227
228
229
231 {
232
235 break;
236 }
237
238
239 for (
i = 0;
i < NumRecords; ++
i)
240 {
241
243 continue;
244
245
247
248
249 (InputRecords[
i].Event.KeyEvent.wVirtualKeyCode ==
VK_MENU))
250 {
251 continue;
252 }
253
254
256 }
257 }
258
261
262Quit:
263 if (bNoBreak)
265
266 if (bNoBreak && bUseTimer)
268
270}
void ConResPrintf(FILE *fp, UINT nID,...)
void ConResPuts(FILE *fp, UINT nID)
#define IDS_USER_INPUT_COUNT
#define IDS_NOBREAK_INPUT_COUNT
#define IDS_ERROR_READ_INPUT
#define IDS_ERROR_INVALID_HANDLE_VALUE
#define IDS_NOBREAK_INPUT
BOOL WINAPI FlushConsoleInputBuffer(IN HANDLE hConsoleInput)
#define INVALID_HANDLE_VALUE
BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE hConsoleInput, LPDWORD lpNumberOfEvents)
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
DWORD WINAPI GetTickCount(VOID)
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
_In_opt_ PVOID _Out_ BOOLEAN * Stop
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ EVENT_TYPE EventType
#define Int32x32To64(a, b)
HANDLE ConStreamGetOSHandle(IN PCON_STREAM Stream)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
BOOL WINAPI SetWaitableTimer(IN HANDLE hTimer, IN const LARGE_INTEGER *pDueTime, IN LONG lPeriod, IN PTIMERAPCROUTINE pfnCompletionRoutine OPTIONAL, IN OPTIONAL LPVOID lpArgToCompletionRoutine, IN BOOL fResume)
VOID PrintError(DWORD dwError)
BOOL WINAPI CtrlCIntercept(DWORD dwCtrlType)
_In_ WDFTIMER _In_ LONGLONG DueTime
DWORD WINAPI GetLastError(void)
#define CreateWaitableTimer