ReactOS  0.4.15-dev-3017-g1d9542d
wincon.h
Go to the documentation of this file.
1 #ifndef _WINCON_H
2 #define _WINCON_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA) && !defined(NOGDI)
9 # include "wingdi.h"
10 #endif
11 
12 #ifdef _MSC_VER
13 #pragma warning(push)
14 #pragma warning(disable:4820)
15 #endif
16 
17 /*
18  * Special PID for parent process for AttachConsole API
19  */
20 #if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
21 #define ATTACH_PARENT_PROCESS ((DWORD)-1)
22 #endif
23 
24 /*
25  * Console display modes
26  */
27 // These codes are answered by GetConsoleDisplayMode
28 #define CONSOLE_WINDOWED 0
29 #define CONSOLE_FULLSCREEN 1
30 #define CONSOLE_FULLSCREEN_HARDWARE 2
31 
32 // These codes should be given to SetConsoleDisplayMode
33 #define CONSOLE_FULLSCREEN_MODE 1
34 #define CONSOLE_WINDOWED_MODE 2
35 
36 /*
37  * Color attributes for text and screen background
38  */
39 #define FOREGROUND_BLUE 0x0001
40 #define FOREGROUND_GREEN 0x0002
41 #define FOREGROUND_RED 0x0004
42 #define FOREGROUND_INTENSITY 0x0008
43 #define BACKGROUND_BLUE 0x0010
44 #define BACKGROUND_GREEN 0x0020
45 #define BACKGROUND_RED 0x0040
46 #define BACKGROUND_INTENSITY 0x0080
47 
48 #define COMMON_LVB_LEADING_BYTE 0x0100 /* DBCS Leading Byte */
49 #define COMMON_LVB_TRAILING_BYTE 0x0200 /* DBCS Trailing Byte */
50 #define COMMON_LVB_GRID_HORIZONTAL 0x0400 /* Grid attribute: Top Horizontal */
51 #define COMMON_LVB_GRID_LVERTICAL 0x0800 /* Grid attribute: Left Vertical */
52 #define COMMON_LVB_GRID_RVERTICAL 0x1000 /* Grid attribute: Right Vertical */
53 #define COMMON_LVB_REVERSE_VIDEO 0x4000 /* Reverse fore/back ground attribute */
54 #define COMMON_LVB_UNDERSCORE 0x8000 /* Underscore */
55 
56 #define COMMON_LVB_SBCSDBCS \
57  (COMMON_LVB_LEADING_BYTE | COMMON_LVB_TRAILING_BYTE) /* == 0x0300 */
58 
59 /*
60  * Screen buffer types
61  */
62 #define CONSOLE_TEXTMODE_BUFFER 1
63 #define CONSOLE_GRAPHICS_BUFFER 2 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
64 
65 /*
66  * Control handler codes
67  */
68 #define CTRL_C_EVENT 0
69 #define CTRL_BREAK_EVENT 1
70 #define CTRL_CLOSE_EVENT 2
71 #define CTRL_LAST_CLOSE_EVENT 3 /* Undocumented */
72 #define CTRL_LOGOFF_EVENT 5
73 #define CTRL_SHUTDOWN_EVENT 6
74 
75 /*
76  * Input mode flags
77  */
78 #define ENABLE_PROCESSED_INPUT 0x0001
79 #define ENABLE_LINE_INPUT 0x0002
80 #define ENABLE_ECHO_INPUT 0x0004
81 #define ENABLE_WINDOW_INPUT 0x0008
82 #define ENABLE_MOUSE_INPUT 0x0010
83 #define ENABLE_INSERT_MODE 0x0020
84 #define ENABLE_QUICK_EDIT_MODE 0x0040
85 #define ENABLE_EXTENDED_FLAGS 0x0080
86 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
87 #define ENABLE_AUTO_POSITION 0x0100
88 #endif
89 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN10)
90 #define ENABLE_VIRTUAL_TERMINAL_INPUT 0x0200
91 #endif
92 
93 /*
94  * Output mode flags
95  */
96 #define ENABLE_PROCESSED_OUTPUT 0x0001
97 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
98 
99 /*
100  * Console selection flags
101  */
102 #define CONSOLE_NO_SELECTION 0x0000
103 #define CONSOLE_SELECTION_IN_PROGRESS 0x0001
104 #define CONSOLE_SELECTION_NOT_EMPTY 0x0002
105 #define CONSOLE_MOUSE_SELECTION 0x0004
106 #define CONSOLE_MOUSE_DOWN 0x0008
107 
108 /*
109  * History information and mode flags
110  */
111 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
112 // For Get/SetConsoleHistoryInfo
113 #define HISTORY_NO_DUP_FLAG 0x0001
114 // For SetConsoleCommandHistoryMode
115 #define CONSOLE_OVERSTRIKE 0x0001
116 #endif
117 
118 
119 /*
120  * Read input flags
121  */
122 #define CONSOLE_READ_KEEPEVENT 0x0001
123 #define CONSOLE_READ_CONTINUE 0x0002
124 
125 /*
126  * Event types
127  */
128 #define KEY_EVENT 0x0001
129 #define MOUSE_EVENT 0x0002
130 #define WINDOW_BUFFER_SIZE_EVENT 0x0004
131 #define MENU_EVENT 0x0008
132 #define FOCUS_EVENT 0x0010
133 
134 /*
135  * ControlKeyState flags
136  */
137 #define RIGHT_ALT_PRESSED 0x0001
138 #define LEFT_ALT_PRESSED 0x0002
139 #define RIGHT_CTRL_PRESSED 0x0004
140 #define LEFT_CTRL_PRESSED 0x0008
141 #define SHIFT_PRESSED 0x0010
142 #define NUMLOCK_ON 0x0020
143 #define SCROLLLOCK_ON 0x0040
144 #define CAPSLOCK_ON 0x0080
145 #define ENHANCED_KEY 0x0100
146 
147 // NLS Japanese flags
148 #define NLS_DBCSCHAR 0x00010000 /* SBCS/DBCS mode */
149 #define NLS_ALPHANUMERIC 0x00000000 /* Alphanumeric mode */
150 #define NLS_KATAKANA 0x00020000 /* Katakana mode */
151 #define NLS_HIRAGANA 0x00040000 /* Hiragana mode */
152 #define NLS_ROMAN 0x00400000 /* Roman/Noroman mode */
153 #define NLS_IME_CONVERSION 0x00800000 /* IME conversion */
154 #define NLS_IME_DISABLE 0x20000000 /* IME enable/disable */
155 
156 /*
157  * ButtonState flags
158  */
159 #define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
160 #define RIGHTMOST_BUTTON_PRESSED 0x0002
161 #define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
162 #define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
163 #define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
164 
165 /*
166  * Mouse event flags
167  */
168 #define MOUSE_MOVED 0x0001
169 #define DOUBLE_CLICK 0x0002
170 #define MOUSE_WHEELED 0x0004
171 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
172 #define MOUSE_HWHEELED 0x0008
173 #endif
174 
181 
182 typedef struct _CHAR_INFO {
183  union {
186  } Char;
189 
190 typedef struct _SMALL_RECT {
196 
197 typedef struct _CONSOLE_CURSOR_INFO {
201 
202 typedef struct _COORD {
205 } COORD, *PCOORD;
206 
207 typedef struct _CONSOLE_SELECTION_INFO {
212 
213 typedef struct _CONSOLE_FONT_INFO {
217 
225 
226 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
227 #if defined(_WINGDI_) && !defined(NOGDI)
231  DWORD dwUsage; // DIB_PAL_COLORS or DIB_RGB_COLORS
235 #endif
236 
238 
239 typedef struct _KEY_EVENT_RECORD {
244  union {
247  } uChar;
250 
251 C_ASSERT(FIELD_OFFSET(KEY_EVENT_RECORD, uChar) == 0xA);
252 
253 typedef struct _MOUSE_EVENT_RECORD {
259 
263 
264 typedef struct _MENU_EVENT_RECORD {
267 
268 typedef struct _FOCUS_EVENT_RECORD {
271 
272 typedef struct _INPUT_RECORD {
274  union {
280  } Event;
282 
283 #if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
284 typedef struct _CONSOLE_HISTORY_INFO {
290 
302 
303 #ifndef NOGDI
304 typedef struct _CONSOLE_FONT_INFOEX {
312 #endif
313 #endif
314 
316 
317 #if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
319 
322 
323 DWORD
324 WINAPI
326  _In_ LPSTR Source,
327  _Out_writes_(TargetBufferLength) LPSTR TargetBuffer,
328  _In_ DWORD TargetBufferLength,
329  _In_ LPSTR ExeName);
330 
331 DWORD
332 WINAPI
335  _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer,
336  _In_ DWORD TargetBufferLength,
337  _In_ LPWSTR ExeName);
338 
339 DWORD
340 WINAPI
342  _Out_writes_(AliasBufferLength) LPSTR AliasBuffer,
343  _In_ DWORD AliasBufferLength,
344  _In_ LPSTR ExeName);
345 
346 DWORD
347 WINAPI
349  _Out_writes_(AliasBufferLength) LPWSTR AliasBuffer,
350  _In_ DWORD AliasBufferLength,
351  _In_ LPWSTR ExeName);
352 
355 
356 DWORD
357 WINAPI
359  _Out_writes_(ExeNameBufferLength) LPSTR ExeNameBuffer,
360  _In_ DWORD ExeNameBufferLength);
361 
362 DWORD
363 WINAPI
365  _Out_writes_(ExeNameBufferLength) LPWSTR ExeNameBuffer,
366  _In_ DWORD ExeNameBufferLength);
367 
370 #endif
371 
372 HANDLE
373 WINAPI
375  _In_ DWORD,
376  _In_ DWORD,
378  _In_ DWORD,
380 
381 BOOL
382 WINAPI
384  _In_ HANDLE,
385  _In_ WORD,
386  _In_ DWORD,
387  _In_ COORD,
388  _Out_ PDWORD);
389 
390 BOOL
391 WINAPI
393  _In_ HANDLE,
394  _In_ CHAR,
395  _In_ DWORD,
396  _In_ COORD,
397  _Out_ PDWORD);
398 
399 BOOL
400 WINAPI
402  _In_ HANDLE,
403  _In_ WCHAR,
404  _In_ DWORD,
405  _In_ COORD,
406  _Out_ PDWORD);
407 
415 
416 BOOL
417 WINAPI
419  _In_ HANDLE,
421 
422 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
424 
425 DWORD
426 WINAPI
428  _Out_writes_(nSize) LPSTR lpConsoleTitle,
429  _In_ DWORD nSize);
430 
431 DWORD
432 WINAPI
434  _Out_writes_(nSize) LPWSTR lpConsoleTitle,
435  _In_ DWORD nSize);
436 
437 COORD
438 WINAPI
440  _In_ HANDLE hConsoleOutput,
441  _In_ DWORD nFont);
442 
443 BOOL
444 WINAPI
446  _In_ HANDLE hConsoleOutput,
447  _In_ BOOL bMaximumWindow,
448  _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont);
449 
450 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
451 
454 
455 BOOL
456 WINAPI
458  _In_ HANDLE hConsoleOutput,
460  _Out_opt_ PCOORD lpNewScreenBufferDimensions);
461 
462 #endif
463 
467 
468 _Success_(return != 0)
469 BOOL
471  _In_ HANDLE hConsoleInput,
475 
476 _Success_(return != 0)
477 BOOL
478 WINAPI
480  _In_ HANDLE hConsoleInput,
484 
485 _Success_(return != 0)
486 BOOL
487 WINAPI
489  _In_ HANDLE hConsoleInput,
492  _Out_ _Deref_out_range_(<= , nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead,
494 
495 _Success_(return != 0)
496 BOOL
497 WINAPI
499  _In_ HANDLE hConsoleInput,
502  _Out_ _Deref_out_range_(<= , nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead,
504 
505 _Success_(return != 0)
506 BOOL
507 WINAPI
509  _In_ HANDLE hConsoleInput,
513 
514 _Success_(return != 0)
515 BOOL
516 WINAPI
518  _In_ HANDLE hConsoleInput,
522 
523 _Success_(return != 0)
524 BOOL
525 WINAPI
527  _In_ HANDLE hConsoleInput,
532 
533 _Success_(return != 0)
534 BOOL
535 WINAPI
537  _In_ HANDLE hConsoleInput,
541  _In_ WORD wFlags);
542 
543 BOOL
544 WINAPI
546  _In_ HANDLE hConsoleOutput,
547  _Out_writes_(nLength) LPWORD lpAttribute,
549  _In_ COORD dwReadCoord,
550  _Out_ LPDWORD lpNumberOfAttrsRead);
551 
552 BOOL
553 WINAPI
555  _In_ HANDLE hConsoleOutput,
556  _Out_writes_(nLength) LPSTR lpCharacter,
558  _In_ COORD dwReadCoord,
559  _Out_ LPDWORD lpNumberOfCharsRead);
560 
561 BOOL
562 WINAPI
564  _In_ HANDLE hConsoleOutput,
565  _Out_writes_(nLength) LPWSTR lpCharacter,
567  _In_ COORD dwReadCoord,
568  _Out_ LPDWORD lpNumberOfCharsRead);
569 
570 BOOL
571 WINAPI
573  _In_ HANDLE hConsoleOutput,
574  _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
575  _In_ COORD dwBufferSize,
576  _In_ COORD dwBufferCoord,
577  _Inout_ PSMALL_RECT lpReadRegion);
578 
579 BOOL
580 WINAPI
582  _In_ HANDLE hConsoleOutput,
583  _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
584  _In_ COORD dwBufferSize,
585  _In_ COORD dwBufferCoord,
586  _Inout_ PSMALL_RECT lpReadRegion);
587 
588 BOOL
589 WINAPI
591  _In_ HANDLE,
594  _In_ COORD,
595  _In_ const CHAR_INFO*);
596 
597 BOOL
598 WINAPI
600  _In_ HANDLE,
603  _In_ COORD,
604  _In_ const CHAR_INFO*);
605 
617 
618 BOOL
619 WINAPI
621  _In_ HANDLE,
622  _In_ BOOL,
624 
625 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php */
627 /* Undocumented */
629 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/SetConsoleCursor.php */
631 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ShowConsoleCursor.php */
633 /* Undocumented */
635 /* Undocumented, see http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 */
637 /* Undocumented */
639 /* Undocumented */
641 /* Undocumented */
643 /* Undocumented */
644 BOOL
645 WINAPI
648  _Out_ PVOID*);
649 
650 BOOL
651 WINAPI
653  _In_ HANDLE hConsoleOutput,
654  _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer,
655  _In_ DWORD nNumberOfCharsToWrite,
656  _Out_opt_ LPDWORD lpNumberOfCharsWritten,
657  _Reserved_ LPVOID lpReserved);
658 
659 BOOL
660 WINAPI
662  _In_ HANDLE hConsoleOutput,
663  _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer,
664  _In_ DWORD nNumberOfCharsToWrite,
665  _Out_opt_ LPDWORD lpNumberOfCharsWritten,
666  _Reserved_ LPVOID lpReserved);
667 
668 BOOL
669 WINAPI
671  _In_ HANDLE hConsoleInput,
674  _Out_ LPDWORD lpNumberOfEventsWritten);
675 
676 BOOL
677 WINAPI
679  _In_ HANDLE hConsoleInput,
682  _Out_ LPDWORD lpNumberOfEventsWritten);
683 
684 BOOL
685 WINAPI
687  _In_ HANDLE hConsoleInput,
690  _Out_ LPDWORD lpNumberOfEventsWritten);
691 
692 BOOL
693 WINAPI
695  _In_ HANDLE hConsoleInput,
698  _Out_ LPDWORD lpNumberOfEventsWritten);
699 
700 BOOL
701 WINAPI
703  _In_ HANDLE hConsoleOutput,
704  _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
705  _In_ COORD dwBufferSize,
706  _In_ COORD dwBufferCoord,
707  _Inout_ PSMALL_RECT lpWriteRegion);
708 
709 BOOL
710 WINAPI
712  _In_ HANDLE hConsoleOutput,
713  _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
714  _In_ COORD dwBufferSize,
715  _In_ COORD dwBufferCoord,
716  _Inout_ PSMALL_RECT lpWriteRegion);
717 
718 BOOL
719 WINAPI
721  _In_ HANDLE hConsoleOutput,
722  _In_reads_(nLength) CONST WORD *lpAttribute,
724  _In_ COORD dwWriteCoord,
725  _Out_ LPDWORD lpNumberOfAttrsWritten);
726 
727 BOOL
728 WINAPI
730  _In_ HANDLE hConsoleOutput,
731  _In_reads_(nLength) LPCSTR lpCharacter,
733  _In_ COORD dwWriteCoord,
734  _Out_ LPDWORD lpNumberOfCharsWritten);
735 
736 BOOL
737 WINAPI
739  _In_ HANDLE hConsoleOutput,
740  _In_reads_(nLength) LPCWSTR lpCharacter,
742  _In_ COORD dwWriteCoord,
743  _Out_ LPDWORD lpNumberOfCharsWritten);
744 
745 
746 #ifdef UNICODE
747 #define AddConsoleAlias AddConsoleAliasW
748 #define GetConsoleAlias GetConsoleAliasW
749 #define GetConsoleAliases GetConsoleAliasesW
750 #define GetConsoleAliasesLength GetConsoleAliasesLengthW
751 #define GetConsoleAliasExes GetConsoleAliasExesW
752 #define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
753 #define GetConsoleTitle GetConsoleTitleW
754 #define PeekConsoleInput PeekConsoleInputW
755 #define ReadConsole ReadConsoleW
756 #define ReadConsoleInput ReadConsoleInputW
757 #define ReadConsoleInputEx ReadConsoleInputExW
758 #define ReadConsoleOutput ReadConsoleOutputW
759 #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
760 #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
761 #define SetConsoleTitle SetConsoleTitleW
762 #define WriteConsole WriteConsoleW
763 #define WriteConsoleInput WriteConsoleInputW
764 #define WriteConsoleInputVDM WriteConsoleInputVDMW
765 #define WriteConsoleOutput WriteConsoleOutputW
766 #define FillConsoleOutputCharacter FillConsoleOutputCharacterW
767 #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
768 #else
769 #define AddConsoleAlias AddConsoleAliasA
770 #define GetConsoleAlias GetConsoleAliasA
771 #define GetConsoleAliases GetConsoleAliasesA
772 #define GetConsoleAliasesLength GetConsoleAliasesLengthA
773 #define GetConsoleAliasExes GetConsoleAliasExesA
774 #define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
775 #define GetConsoleTitle GetConsoleTitleA
776 #define PeekConsoleInput PeekConsoleInputA
777 #define ReadConsole ReadConsoleA
778 #define ReadConsoleInput ReadConsoleInputA
779 #define ReadConsoleInputEx ReadConsoleInputExA
780 #define ReadConsoleOutput ReadConsoleOutputA
781 #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
782 #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
783 #define SetConsoleTitle SetConsoleTitleA
784 #define WriteConsole WriteConsoleA
785 #define WriteConsoleInput WriteConsoleInputA
786 #define WriteConsoleInputVDM WriteConsoleInputVDMA
787 #define WriteConsoleOutput WriteConsoleOutputA
788 #define FillConsoleOutputCharacter FillConsoleOutputCharacterA
789 #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
790 #endif
791 
792 #ifdef _MSC_VER
793 #pragma warning(pop)
794 #endif
795 
796 #ifdef __cplusplus
797 }
798 #endif
799 
800 #endif /* _WINCON_H */
BOOL WINAPI GetNumberOfConsoleMouseButtons(_Out_ PDWORD)
BOOL WINAPI SetConsoleScreenBufferSize(_In_ HANDLE, _In_ COORD)
struct _WINDOW_BUFFER_SIZE_RECORD WINDOW_BUFFER_SIZE_RECORD
BOOL WINAPI WriteConsoleOutputA(_In_ HANDLE hConsoleOutput, _In_reads_(dwBufferSize.X *dwBufferSize.Y) CONST CHAR_INFO *lpBuffer, _In_ COORD dwBufferSize, _In_ COORD dwBufferCoord, _Inout_ PSMALL_RECT lpWriteRegion)
struct _CONSOLE_CURSOR_INFO * PCONSOLE_CURSOR_INFO
return
Definition: dirsup.c:529
BOOL WINAPI ReadConsoleOutputW(_In_ HANDLE hConsoleOutput, _Out_writes_(dwBufferSize.X *dwBufferSize.Y) PCHAR_INFO lpBuffer, _In_ COORD dwBufferSize, _In_ COORD dwBufferCoord, _Inout_ PSMALL_RECT lpReadRegion)
BOOL WINAPI ScrollConsoleScreenBufferA(_In_ HANDLE, _In_ const SMALL_RECT *, _In_opt_ const SMALL_RECT *, _In_ COORD, _In_ const CHAR_INFO *)
static HICON
Definition: imagelist.c:84
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputExW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead, IN WORD wFlags)
Definition: readwrite.c:1296
#define LF_FACESIZE
Definition: dimm.idl:39
WCHAR UnicodeChar
Definition: wincon.h:245
DWORD dwEventFlags
Definition: wincon.h:257
WORD wVirtualScanCode
Definition: wincon.h:243
#define _In_opt_
Definition: ms_sal.h:309
CHAR AsciiChar
Definition: wincon.h:185
static WCHAR ExeNameBuffer[EXENAME_LENGTH]
Definition: console.c:43
#define _Inout_
Definition: ms_sal.h:378
BOOL WINAPI SetConsoleCP(_In_ UINT)
#define Y(I)
struct _SMALL_RECT * PSMALL_RECT
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
union _INPUT_RECORD::@3218 Event
_In_ DWORD _Out_ LPDWORD lpNumberOfEventsRead
Definition: wincon.h:473
struct _CONSOLE_SCREEN_BUFFER_INFO * PCONSOLE_SCREEN_BUFFER_INFO
#define _Out_
Definition: ms_sal.h:345
BOOL WINAPI WriteConsoleOutputW(_In_ HANDLE hConsoleOutput, _In_reads_(dwBufferSize.X *dwBufferSize.Y) CONST CHAR_INFO *lpBuffer, _In_ COORD dwBufferSize, _In_ COORD dwBufferCoord, _Inout_ PSMALL_RECT lpWriteRegion)
struct _CHAR_INFO * PCHAR_INFO
BOOL WINAPI WriteConsoleInputVDMW(_In_ HANDLE hConsoleInput, _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer, _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsWritten)
BOOL WINAPI SetConsoleMode(_In_ HANDLE, _In_ DWORD)
WCHAR UnicodeChar
Definition: wincon.h:184
char CHAR
Definition: xmlstorage.h:175
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2053
HMENU WINAPI ConsoleMenuControl(_In_ HANDLE, _In_ DWORD, _In_ DWORD)
_Success_(return !=0) BOOL WINAPI PeekConsoleInputA(_In_ HANDLE hConsoleInput
Definition: fsctrl.c:3139
#define CALLBACK
Definition: compat.h:35
_In_ DWORD nLength
Definition: wincon.h:473
BOOL WINAPI AllocConsole(VOID)
Definition: console.c:74
SHORT X
Definition: wincon.h:203
DWORD dwControlKeyState
Definition: wincon.h:248
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent
Definition: wincon.h:277
COORD WINAPI GetConsoleFontSize(_In_ HANDLE hConsoleOutput, _In_ DWORD nFont)
struct _CONSOLE_GRAPHICS_BUFFER_INFO * PCONSOLE_GRAPHICS_BUFFER_INFO
struct _COORD * PCOORD
UINT NumberOfHistoryBuffers
Definition: wincon.h:287
struct _WINDOW_BUFFER_SIZE_RECORD * PWINDOW_BUFFER_SIZE_RECORD
struct _CONSOLE_HISTORY_INFO * PCONSOLE_HISTORY_INFO
struct _FOCUS_EVENT_RECORD FOCUS_EVENT_RECORD
BOOL WINAPI WriteConsoleInputW(_In_ HANDLE hConsoleInput, _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer, _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsWritten)
HICON HCURSOR
Definition: windef.h:299
SMALL_RECT srSelection
Definition: wincon.h:210
BOOL WINAPI SetConsoleTitleW(_In_ LPCWSTR)
WCHAR FaceName[LF_FACESIZE]
Definition: wincon.h:310
char * LPSTR
Definition: xmlstorage.h:182
#define BOOL
Definition: nt_native.h:43
DWORD dwButtonState
Definition: wincon.h:255
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:58
COORD dwFontSize
Definition: wincon.h:215
SHORT Right
Definition: wincon.h:193
WORD wVirtualKeyCode
Definition: wincon.h:242
struct _FOCUS_EVENT_RECORD * PFOCUS_EVENT_RECORD
BOOL WINAPI GetNumberOfConsoleInputEvents(_In_ HANDLE, _Out_ PDWORD)
SHORT Left
Definition: wincon.h:191
#define _Reserved_
Definition: ms_sal.h:295
BOOL WINAPI AddConsoleAliasW(_In_ LPCWSTR, _In_ LPCWSTR, _In_ LPCWSTR)
BOOL WINAPI SetConsoleTitleA(_In_ LPCSTR)
DWORD WINAPI GetConsoleAliasExesA(_Out_writes_(ExeNameBufferLength) LPSTR ExeNameBuffer, _In_ DWORD ExeNameBufferLength)
struct _CONSOLE_READCONSOLE_CONTROL * PCONSOLE_READCONSOLE_CONTROL
WORD wRepeatCount
Definition: wincon.h:241
struct _KEY_EVENT_RECORD * PKEY_EVENT_RECORD
DWORD WINAPI GetConsoleAliasExesLengthA(VOID)
Definition: alias.c:599
unsigned int BOOL
Definition: ntddk_ex.h:94
SHORT Y
Definition: wincon.h:204
short SHORT
Definition: pedump.c:59
struct _INPUT_RECORD * PINPUT_RECORD
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
DWORD WINAPI GetConsoleTitleA(_Out_writes_(nSize) LPSTR lpConsoleTitle, _In_ DWORD nSize)
COORD dwMousePosition
Definition: wincon.h:254
BOOL WINAPI SetConsoleIcon(_In_ HICON)
struct _CHAR_INFO CHAR_INFO
HANDLE WINAPI CreateConsoleScreenBuffer(_In_ DWORD, _In_ DWORD, _In_opt_ CONST SECURITY_ATTRIBUTES *, _In_ DWORD, _Reserved_ LPVOID)
#define _In_
Definition: ms_sal.h:308
_In_ DWORD nNumberOfCharsToRead
Definition: wincon.h:491
const char * LPCSTR
Definition: xmlstorage.h:183
union _KEY_EVENT_RECORD::@3217 uChar
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputA(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1276
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputExA(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead, IN WORD wFlags)
Definition: readwrite.c:1317
BOOL WINAPI AddConsoleAliasA(_In_ LPCSTR, _In_ LPCSTR, _In_ LPCSTR)
BOOL WINAPI CloseConsoleHandle(_In_ HANDLE)
struct _MENU_EVENT_RECORD MENU_EVENT_RECORD
UINT WINAPI GetConsoleOutputCP(VOID)
Definition: console.c:2453
BOOL WINAPI SetConsoleTextAttribute(_In_ HANDLE, _In_ WORD)
DWORD WINAPI GetConsoleAliasExesLengthW(VOID)
Definition: alias.c:586
struct _CONSOLE_SELECTION_INFO CONSOLE_SELECTION_INFO
HANDLE WINAPI GetConsoleInputWaitHandle(VOID)
Definition: console.c:683
HWND WINAPI GetConsoleWindow(VOID)
Definition: console.c:2730
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleW(IN HANDLE hConsoleInput, OUT LPVOID lpBuffer, IN DWORD nNumberOfCharsToRead, OUT LPDWORD lpNumberOfCharsRead, IN PCONSOLE_READCONSOLE_CONTROL pInputControl OPTIONAL)
Definition: readwrite.c:1174
BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1216
_In_ DWORD _Out_ _Deref_out_range_(<=, nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead
BOOL WINAPI FillConsoleOutputCharacterA(_In_ HANDLE, _In_ CHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD)
BOOL WINAPI WriteConsoleW(_In_ HANDLE hConsoleOutput, _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer, _In_ DWORD nNumberOfCharsToWrite, _Out_opt_ LPDWORD lpNumberOfCharsWritten, _Reserved_ LPVOID lpReserved)
__wchar_t WCHAR
Definition: xmlstorage.h:180
DWORD COLORREF
Definition: windef.h:300
struct _SMALL_RECT SMALL_RECT
BOOL WINAPI SetConsoleCursorPosition(_In_ HANDLE, _In_ COORD)
struct _MOUSE_EVENT_RECORD * PMOUSE_EVENT_RECORD
_Out_writes_bytes_to_(nNumberOfCharsToRead *sizeof(CHAR), *lpNumberOfCharsRead *sizeof(CHAR)) LPVOID lpBuffer
WORD Attributes
Definition: wincon.h:187
#define WINAPI
Definition: msvc.h:6
KEY_EVENT_RECORD KeyEvent
Definition: wincon.h:275
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleA(IN HANDLE hConsoleInput, OUT LPVOID lpBuffer, IN DWORD nNumberOfCharsToRead, OUT LPDWORD lpNumberOfCharsRead, IN PCONSOLE_READCONSOLE_CONTROL pInputControl OPTIONAL)
Definition: readwrite.c:1195
BOOL WINAPI FillConsoleOutputCharacterW(_In_ HANDLE, _In_ WCHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD)
BOOL WINAPI SetConsoleWindowInfo(_In_ HANDLE, _In_ BOOL, _In_ const SMALL_RECT *)
struct _CONSOLE_FONT_INFOEX CONSOLE_FONT_INFOEX
BOOL WINAPI WriteConsoleInputVDMA(_In_ HANDLE hConsoleInput, _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer, _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsWritten)
BOOL WINAPI RegisterConsoleVDM(_In_ DWORD, _In_ HANDLE, _In_ HANDLE, _In_ HANDLE, _In_ DWORD, _Out_ LPDWORD, _Out_ PVOID *, _In_ PVOID, _In_ DWORD, _In_ COORD, _Out_ PVOID *)
FOCUS_EVENT_RECORD FocusEvent
Definition: wincon.h:279
BOOL WINAPI SetConsoleCursor(_In_ HANDLE, _In_ HCURSOR)
BOOL WINAPI SetConsoleDisplayMode(_In_ HANDLE hConsoleOutput, _In_ DWORD dwFlags, _Out_opt_ PCOORD lpNewScreenBufferDimensions)
struct _COORD COORD
struct _KEY_EVENT_RECORD KEY_EVENT_RECORD
LPBITMAPINFO lpBitMapInfo
Definition: wincon.h:230
struct _CONSOLE_FONT_INFO CONSOLE_FONT_INFO
BOOL WINAPI AttachConsole(_In_ DWORD)
SHORT Bottom
Definition: wincon.h:194
struct _CONSOLE_FONT_INFOEX * PCONSOLE_FONT_INFOEX
BOOL WINAPI GetConsoleMode(_In_ HANDLE, _Out_ PDWORD)
BOOL WINAPI SetConsoleOutputCP(_In_ UINT)
COORD WINAPI GetLargestConsoleWindowSize(_In_ HANDLE)
UINT WINAPI GetConsoleCP(VOID)
Definition: console.c:2393
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
BOOL WINAPI WriteConsoleOutputCharacterA(_In_ HANDLE hConsoleOutput, _In_reads_(nLength) LPCSTR lpCharacter, _In_ DWORD nLength, _In_ COORD dwWriteCoord, _Out_ LPDWORD lpNumberOfCharsWritten)
struct _CONSOLE_HISTORY_INFO CONSOLE_HISTORY_INFO
C_ASSERT(FIELD_OFFSET(KEY_EVENT_RECORD, uChar)==0xA)
DWORD WINAPI GetConsoleAliasesW(_Out_writes_(AliasBufferLength) LPWSTR AliasBuffer, _In_ DWORD AliasBufferLength, _In_ LPWSTR ExeName)
#define _In_reads_(size)
Definition: ms_sal.h:319
DWORD WINAPI GetConsoleAliasesLengthA(_In_ LPSTR ExeName)
Definition: bl.h:1338
struct _CONSOLE_READCONSOLE_CONTROL CONSOLE_READCONSOLE_CONTROL
BOOL WINAPI VerifyConsoleIoHandle(_In_ HANDLE)
DWORD WINAPI GetConsoleAliasesLengthW(_In_ LPWSTR ExeName)
BOOL WINAPI SetConsoleCtrlHandler(_In_opt_ PHANDLER_ROUTINE, _In_ BOOL)
BOOL WINAPI GenerateConsoleCtrlEvent(_In_ DWORD, _In_ DWORD)
SHORT Top
Definition: wincon.h:192
DWORD WINAPI GetConsoleTitleW(_Out_writes_(nSize) LPWSTR lpConsoleTitle, _In_ DWORD nSize)
uint16_t * LPWORD
Definition: typedefs.h:56
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ DWORD _Out_ _In_opt_ PCONSOLE_READCONSOLE_CONTROL pInputControl
Definition: wincon.h:493
BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputA(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1236
BOOL WINAPI WriteConsoleOutputAttribute(_In_ HANDLE hConsoleOutput, _In_reads_(nLength) CONST WORD *lpAttribute, _In_ DWORD nLength, _In_ COORD dwWriteCoord, _Out_ LPDWORD lpNumberOfAttrsWritten)
BOOL WINAPI SetConsoleActiveScreenBuffer(_In_ HANDLE)
struct _CONSOLE_CURSOR_INFO CONSOLE_CURSOR_INFO
BOOL WINAPI ReadConsoleOutputCharacterA(_In_ HANDLE hConsoleOutput, _Out_writes_(nLength) LPSTR lpCharacter, _In_ DWORD nLength, _In_ COORD dwReadCoord, _Out_ LPDWORD lpNumberOfCharsRead)
_Out_writes_to_(nLength, *lpNumberOfEventsRead) PINPUT_RECORD lpBuffer
DWORD dwControlKeyState
Definition: wincon.h:256
BOOL WINAPI WriteConsoleOutputCharacterW(_In_ HANDLE hConsoleOutput, _In_reads_(nLength) LPCWSTR lpCharacter, _In_ DWORD nLength, _In_ COORD dwWriteCoord, _Out_ LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI InvalidateConsoleDIBits(_In_ HANDLE, _In_ PSMALL_RECT)
DWORD WINAPI GetConsoleAliasW(_In_ LPWSTR Source, _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer, _In_ DWORD TargetBufferLength, _In_ LPWSTR ExeName)
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
BOOL WINAPI ReadConsoleOutputA(_In_ HANDLE hConsoleOutput, _Out_writes_(dwBufferSize.X *dwBufferSize.Y) PCHAR_INFO lpBuffer, _In_ COORD dwBufferSize, _In_ COORD dwBufferCoord, _Inout_ PSMALL_RECT lpReadRegion)
BOOL WINAPI WriteConsoleInputA(_In_ HANDLE hConsoleInput, _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer, _In_ DWORD nLength, _Out_ LPDWORD lpNumberOfEventsWritten)
#define _Out_opt_
Definition: ms_sal.h:346
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI FlushConsoleInputBuffer(_In_ HANDLE)
INT WINAPI ShowConsoleCursor(_In_ HANDLE, _In_ BOOL)
BOOL WINAPI SetConsoleMenuClose(_In_ BOOL)
struct _CONSOLE_SCREEN_BUFFER_INFO CONSOLE_SCREEN_BUFFER_INFO
DWORD * PDWORD
Definition: pedump.c:68
struct _MOUSE_EVENT_RECORD MOUSE_EVENT_RECORD
WORD EventType
Definition: wincon.h:273
MOUSE_EVENT_RECORD MouseEvent
Definition: wincon.h:276
BOOL WINAPI SetConsolePalette(_In_ HANDLE, _In_ HPALETTE, _In_ UINT)
BOOL WINAPI FillConsoleOutputAttribute(_In_ HANDLE, _In_ WORD, _In_ DWORD, _In_ COORD, _Out_ PDWORD)
BOOL WINAPI ReadConsoleOutputCharacterW(_In_ HANDLE hConsoleOutput, _Out_writes_(nLength) LPWSTR lpCharacter, _In_ DWORD nLength, _In_ COORD dwReadCoord, _Out_ LPDWORD lpNumberOfCharsRead)
struct _CONSOLE_SELECTION_INFO * PCONSOLE_SELECTION_INFO
uint32_t * LPDWORD
Definition: typedefs.h:59
unsigned int ULONG
Definition: retypes.h:1
BOOL WINAPI ScrollConsoleScreenBufferW(_In_ HANDLE, _In_ const SMALL_RECT *, _In_opt_ const SMALL_RECT *, _In_ COORD, _In_ const CHAR_INFO *)
BOOL WINAPI GetConsoleCursorInfo(_In_ HANDLE, _Out_ PCONSOLE_CURSOR_INFO)
#define const
Definition: zconf.h:230
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
BOOL WINAPI GetCurrentConsoleFont(_In_ HANDLE hConsoleOutput, _In_ BOOL bMaximumWindow, _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont)
MENU_EVENT_RECORD MenuEvent
Definition: wincon.h:278
struct _CONSOLE_SCREEN_BUFFER_INFOEX CONSOLE_SCREEN_BUFFER_INFOEX
_Out_writes_(nLength) PINPUT_RECORD lpBuffer
DWORD WINAPI GetConsoleAliasA(_In_ LPSTR Source, _Out_writes_(TargetBufferLength) LPSTR TargetBuffer, _In_ DWORD TargetBufferLength, _In_ LPSTR ExeName)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL(CALLBACK * PHANDLER_ROUTINE)(_In_ DWORD)
Definition: wincon.h:237
DWORD WINAPI GetConsoleAliasExesW(_Out_writes_(ExeNameBufferLength) LPWSTR ExeNameBuffer, _In_ DWORD ExeNameBufferLength)
struct _CONSOLE_FONT_INFO * PCONSOLE_FONT_INFO
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
BOOL WINAPI SetConsoleCursorInfo(_In_ HANDLE, _In_ const CONSOLE_CURSOR_INFO *)
BOOL WINAPI GetConsoleScreenBufferInfo(_In_ HANDLE, _Out_ PCONSOLE_SCREEN_BUFFER_INFO)
struct _MENU_EVENT_RECORD * PMENU_EVENT_RECORD
BOOL WINAPI WriteConsoleA(_In_ HANDLE hConsoleOutput, _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer, _In_ DWORD nNumberOfCharsToWrite, _Out_opt_ LPDWORD lpNumberOfCharsWritten, _Reserved_ LPVOID lpReserved)
BOOL WINAPI GetConsoleDisplayMode(_Out_ LPDWORD lpModeFlags)
#define CONST
Definition: pedump.c:81
BOOL WINAPI ReadConsoleOutputAttribute(_In_ HANDLE hConsoleOutput, _Out_writes_(nLength) LPWORD lpAttribute, _In_ DWORD nLength, _In_ COORD dwReadCoord, _Out_ LPDWORD lpNumberOfAttrsRead)
DWORD WINAPI GetConsoleAliasesA(_Out_writes_(AliasBufferLength) LPSTR AliasBuffer, _In_ DWORD AliasBufferLength, _In_ LPSTR ExeName)
struct _CONSOLE_SCREEN_BUFFER_INFOEX * PCONSOLE_SCREEN_BUFFER_INFOEX
BOOL WINAPI FreeConsole(VOID)
Definition: console.c:153
union _CHAR_INFO::@3216 Char
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1256
struct _INPUT_RECORD INPUT_RECORD
struct _CONSOLE_GRAPHICS_BUFFER_INFO CONSOLE_GRAPHICS_BUFFER_INFO