ReactOS  0.4.14-dev-583-g2a1ba2c
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 >= 0x0600) && !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 >= 0x0501)
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
49 #define COMMON_LVB_TRAILING_BYTE 0x0200
50 #define COMMON_LVB_GRID_HORIZONTAL 0x0400
51 #define COMMON_LVB_GRID_LVERTICAL 0x0800
52 #define COMMON_LVB_GRID_RVERTICAL 0x1000
53 #define COMMON_LVB_REVERSE_VIDEO 0x4000
54 #define COMMON_LVB_UNDERSCORE 0x8000
55 
56 /*
57  * Screen buffer types
58  */
59 #define CONSOLE_TEXTMODE_BUFFER 1
60 #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/ */
61 
62 /*
63  * Control handler codes
64  */
65 #define CTRL_C_EVENT 0
66 #define CTRL_BREAK_EVENT 1
67 #define CTRL_CLOSE_EVENT 2
68 #define CTRL_LAST_CLOSE_EVENT 3 /* Undocumented */
69 #define CTRL_LOGOFF_EVENT 5
70 #define CTRL_SHUTDOWN_EVENT 6
71 
72 /*
73  * Input mode flags
74  */
75 #define ENABLE_PROCESSED_INPUT 0x0001
76 #define ENABLE_LINE_INPUT 0x0002
77 #define ENABLE_ECHO_INPUT 0x0004
78 #define ENABLE_WINDOW_INPUT 0x0008
79 #define ENABLE_MOUSE_INPUT 0x0010
80 #define ENABLE_INSERT_MODE 0x0020
81 #define ENABLE_QUICK_EDIT_MODE 0x0040
82 #define ENABLE_EXTENDED_FLAGS 0x0080
83 #if (_WIN32_WINNT >= 0x0600)
84 #define ENABLE_AUTO_POSITION 0x0100
85 #endif
86 
87 /*
88  * Output mode flags
89  */
90 #define ENABLE_PROCESSED_OUTPUT 0x0001
91 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
92 
93 /*
94  * Console selection flags
95  */
96 #define CONSOLE_NO_SELECTION 0x0000
97 #define CONSOLE_SELECTION_IN_PROGRESS 0x0001
98 #define CONSOLE_SELECTION_NOT_EMPTY 0x0002
99 #define CONSOLE_MOUSE_SELECTION 0x0004
100 #define CONSOLE_MOUSE_DOWN 0x0008
101 
102 /*
103  * History information and mode flags
104  */
105 #if (_WIN32_WINNT >= 0x0600)
106 // For Get/SetConsoleHistoryInfo
107 #define HISTORY_NO_DUP_FLAG 0x0001
108 // For SetConsoleCommandHistoryMode
109 #define CONSOLE_OVERSTRIKE 0x0001
110 #endif
111 
112 
113 /*
114  * Read input flags
115  */
116 #define CONSOLE_READ_KEEPEVENT 0x0001
117 #define CONSOLE_READ_CONTINUE 0x0002
118 
119 /*
120  * Event types
121  */
122 #define KEY_EVENT 0x0001
123 #define MOUSE_EVENT 0x0002
124 #define WINDOW_BUFFER_SIZE_EVENT 0x0004
125 #define MENU_EVENT 0x0008
126 #define FOCUS_EVENT 0x0010
127 
128 /*
129  * ControlKeyState flags
130  */
131 #define RIGHT_ALT_PRESSED 0x0001
132 #define LEFT_ALT_PRESSED 0x0002
133 #define RIGHT_CTRL_PRESSED 0x0004
134 #define LEFT_CTRL_PRESSED 0x0008
135 #define SHIFT_PRESSED 0x0010
136 #define NUMLOCK_ON 0x0020
137 #define SCROLLLOCK_ON 0x0040
138 #define CAPSLOCK_ON 0x0080
139 #define ENHANCED_KEY 0x0100
140 
141 /*
142  * ButtonState flags
143  */
144 #define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
145 #define RIGHTMOST_BUTTON_PRESSED 0x0002
146 #define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
147 #define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
148 #define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
149 
150 /*
151  * Mouse event flags
152  */
153 #define MOUSE_MOVED 0x0001
154 #define DOUBLE_CLICK 0x0002
155 #define MOUSE_WHEELED 0x0004
156 #if (_WIN32_WINNT >= 0x0600)
157 #define MOUSE_HWHEELED 0x0008
158 #endif
159 
166 
167 typedef struct _CHAR_INFO {
168  union {
171  } Char;
174 
175 typedef struct _SMALL_RECT {
181 
182 typedef struct _CONSOLE_CURSOR_INFO {
186 
187 typedef struct _COORD {
190 } COORD, *PCOORD;
191 
192 typedef struct _CONSOLE_SELECTION_INFO {
197 
198 typedef struct _CONSOLE_FONT_INFO {
202 
210 
211 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
212 #if defined(_WINGDI_) && !defined(NOGDI)
213 typedef struct _CONSOLE_GRAPHICS_BUFFER_INFO {
214  DWORD dwBitMapInfoLength;
215  LPBITMAPINFO lpBitMapInfo;
216  DWORD dwUsage; // DIB_PAL_COLORS or DIB_RGB_COLORS
217  HANDLE hMutex;
218  PVOID lpBitMap;
219 } CONSOLE_GRAPHICS_BUFFER_INFO, *PCONSOLE_GRAPHICS_BUFFER_INFO;
220 #endif
221 
223 
224 typedef struct _KEY_EVENT_RECORD {
229  union {
232  } uChar;
234 }
235 #ifdef __GNUC__
236 /* gcc's alignment is not what win32 expects */
237 PACKED
238 #endif
240 
241 typedef struct _MOUSE_EVENT_RECORD {
247 
251 
252 typedef struct _MENU_EVENT_RECORD {
255 
256 typedef struct _FOCUS_EVENT_RECORD {
259 
260 typedef struct _INPUT_RECORD {
262  union {
268  } Event;
270 
271 #if (_WIN32_WINNT >= 0x0600)
272 typedef struct _CONSOLE_HISTORY_INFO {
273  UINT cbSize;
274  UINT HistoryBufferSize;
275  UINT NumberOfHistoryBuffers;
276  DWORD dwFlags;
277 } CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO;
278 
279 typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX {
280  ULONG cbSize;
281  COORD dwSize;
282  COORD dwCursorPosition;
283  WORD wAttributes;
284  SMALL_RECT srWindow;
285  COORD dwMaximumWindowSize;
286  WORD wPopupAttributes;
287  BOOL bFullscreenSupported;
288  COLORREF ColorTable[16];
289 } CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX;
290 
291 #ifndef NOGDI
292 typedef struct _CONSOLE_FONT_INFOEX {
293  ULONG cbSize;
294  DWORD nFont;
295  COORD dwFontSize;
297  UINT FontWeight;
298  WCHAR FaceName[LF_FACESIZE];
299 } CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;
300 #endif
301 #endif
302 
304 
305 #if (_WIN32_WINNT >= 0x0501)
307 
310 
311 DWORD
312 WINAPI
314  _In_ LPSTR Source,
315  _Out_writes_(TargetBufferLength) LPSTR TargetBuffer,
316  _In_ DWORD TargetBufferLength,
317  _In_ LPSTR ExeName);
318 
319 DWORD
320 WINAPI
323  _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer,
324  _In_ DWORD TargetBufferLength,
325  _In_ LPWSTR ExeName);
326 
327 DWORD
328 WINAPI
330  _Out_writes_(AliasBufferLength) LPSTR AliasBuffer,
331  _In_ DWORD AliasBufferLength,
332  _In_ LPSTR ExeName);
333 
334 DWORD
335 WINAPI
337  _Out_writes_(AliasBufferLength) LPWSTR AliasBuffer,
338  _In_ DWORD AliasBufferLength,
339  _In_ LPWSTR ExeName);
340 
343 
344 DWORD
345 WINAPI
347  _Out_writes_(ExeNameBufferLength) LPSTR ExeNameBuffer,
348  _In_ DWORD ExeNameBufferLength);
349 
350 DWORD
351 WINAPI
353  _Out_writes_(ExeNameBufferLength) LPWSTR ExeNameBuffer,
354  _In_ DWORD ExeNameBufferLength);
355 
358 #endif
359 
360 HANDLE
361 WINAPI
363  _In_ DWORD,
364  _In_ DWORD,
366  _In_ DWORD,
368 
369 BOOL
370 WINAPI
372  _In_ HANDLE,
373  _In_ WORD,
374  _In_ DWORD,
375  _In_ COORD,
376  _Out_ PDWORD);
377 
378 BOOL
379 WINAPI
381  _In_ HANDLE,
382  _In_ CHAR,
383  _In_ DWORD,
384  _In_ COORD,
385  _Out_ PDWORD);
386 
387 BOOL
388 WINAPI
390  _In_ HANDLE,
391  _In_ WCHAR,
392  _In_ DWORD,
393  _In_ COORD,
394  _Out_ PDWORD);
395 
403 
404 BOOL
405 WINAPI
407  _In_ HANDLE,
409 
410 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
412 
413 DWORD
414 WINAPI
416  _Out_writes_(nSize) LPSTR lpConsoleTitle,
417  _In_ DWORD nSize);
418 
419 DWORD
420 WINAPI
422  _Out_writes_(nSize) LPWSTR lpConsoleTitle,
423  _In_ DWORD nSize);
424 
425 COORD
426 WINAPI
428  _In_ HANDLE hConsoleOutput,
429  _In_ DWORD nFont);
430 
431 BOOL
432 WINAPI
434  _In_ HANDLE hConsoleOutput,
435  _In_ BOOL bMaximumWindow,
436  _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont);
437 
438 #if (_WIN32_WINNT >= 0x0500)
439 
442 
443 BOOL
444 WINAPI
446  _In_ HANDLE hConsoleOutput,
448  _Out_opt_ PCOORD lpNewScreenBufferDimensions);
449 
450 #endif
451 
455 
456 _Success_(return != 0)
457 BOOL
459  _In_ HANDLE hConsoleInput,
463 
464 _Success_(return != 0)
465 BOOL
466 WINAPI
468  _In_ HANDLE hConsoleInput,
472 
473 _Success_(return != 0)
474 BOOL
475 WINAPI
477  _In_ HANDLE hConsoleInput,
480  _Out_ _Deref_out_range_(<= , nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead,
482 
483 _Success_(return != 0)
484 BOOL
485 WINAPI
487  _In_ HANDLE hConsoleInput,
490  _Out_ _Deref_out_range_(<= , nNumberOfCharsToRead) LPDWORD lpNumberOfCharsRead,
492 
493 _Success_(return != 0)
494 BOOL
495 WINAPI
497  _In_ HANDLE hConsoleInput,
501 
502 _Success_(return != 0)
503 BOOL
504 WINAPI
506  _In_ HANDLE hConsoleInput,
510 
511 _Success_(return != 0)
512 BOOL
513 WINAPI
515  _In_ HANDLE hConsoleInput,
520 
521 _Success_(return != 0)
522 BOOL
523 WINAPI
525  _In_ HANDLE hConsoleInput,
529  _In_ WORD wFlags);
530 
531 BOOL
532 WINAPI
534  _In_ HANDLE hConsoleOutput,
535  _Out_writes_(nLength) LPWORD lpAttribute,
537  _In_ COORD dwReadCoord,
538  _Out_ LPDWORD lpNumberOfAttrsRead);
539 
540 BOOL
541 WINAPI
543  _In_ HANDLE hConsoleOutput,
544  _Out_writes_(nLength) LPSTR lpCharacter,
546  _In_ COORD dwReadCoord,
547  _Out_ LPDWORD lpNumberOfCharsRead);
548 
549 BOOL
550 WINAPI
552  _In_ HANDLE hConsoleOutput,
553  _Out_writes_(nLength) LPWSTR lpCharacter,
555  _In_ COORD dwReadCoord,
556  _Out_ LPDWORD lpNumberOfCharsRead);
557 
558 BOOL
559 WINAPI
561  _In_ HANDLE hConsoleOutput,
562  _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
563  _In_ COORD dwBufferSize,
564  _In_ COORD dwBufferCoord,
565  _Inout_ PSMALL_RECT lpReadRegion);
566 
567 BOOL
568 WINAPI
570  _In_ HANDLE hConsoleOutput,
571  _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
572  _In_ COORD dwBufferSize,
573  _In_ COORD dwBufferCoord,
574  _Inout_ PSMALL_RECT lpReadRegion);
575 
576 BOOL
577 WINAPI
579  _In_ HANDLE,
582  _In_ COORD,
583  _In_ const CHAR_INFO*);
584 
585 BOOL
586 WINAPI
588  _In_ HANDLE,
591  _In_ COORD,
592  _In_ const CHAR_INFO*);
593 
605 
606 BOOL
607 WINAPI
609  _In_ HANDLE,
610  _In_ BOOL,
612 
613 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php */
615 /* Undocumented */
617 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/SetConsoleCursor.php */
619 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ShowConsoleCursor.php */
621 /* Undocumented */
623 /* Undocumented, see http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 */
625 /* Undocumented */
627 /* Undocumented */
629 /* Undocumented */
631 /* Undocumented */
632 BOOL
633 WINAPI
636  _Out_ PVOID*);
637 
638 BOOL
639 WINAPI
641  _In_ HANDLE hConsoleOutput,
642  _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer,
643  _In_ DWORD nNumberOfCharsToWrite,
644  _Out_opt_ LPDWORD lpNumberOfCharsWritten,
645  _Reserved_ LPVOID lpReserved);
646 
647 BOOL
648 WINAPI
650  _In_ HANDLE hConsoleOutput,
651  _In_reads_(nNumberOfCharsToWrite) CONST VOID *lpBuffer,
652  _In_ DWORD nNumberOfCharsToWrite,
653  _Out_opt_ LPDWORD lpNumberOfCharsWritten,
654  _Reserved_ LPVOID lpReserved);
655 
656 BOOL
657 WINAPI
659  _In_ HANDLE hConsoleInput,
662  _Out_ LPDWORD lpNumberOfEventsWritten);
663 
664 BOOL
665 WINAPI
667  _In_ HANDLE hConsoleInput,
670  _Out_ LPDWORD lpNumberOfEventsWritten);
671 
672 BOOL
673 WINAPI
675  _In_ HANDLE hConsoleInput,
678  _Out_ LPDWORD lpNumberOfEventsWritten);
679 
680 BOOL
681 WINAPI
683  _In_ HANDLE hConsoleInput,
686  _Out_ LPDWORD lpNumberOfEventsWritten);
687 
688 BOOL
689 WINAPI
691  _In_ HANDLE hConsoleOutput,
692  _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
693  _In_ COORD dwBufferSize,
694  _In_ COORD dwBufferCoord,
695  _Inout_ PSMALL_RECT lpWriteRegion);
696 
697 BOOL
698 WINAPI
700  _In_ HANDLE hConsoleOutput,
701  _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
702  _In_ COORD dwBufferSize,
703  _In_ COORD dwBufferCoord,
704  _Inout_ PSMALL_RECT lpWriteRegion);
705 
706 BOOL
707 WINAPI
709  _In_ HANDLE hConsoleOutput,
710  _In_reads_(nLength) CONST WORD *lpAttribute,
712  _In_ COORD dwWriteCoord,
713  _Out_ LPDWORD lpNumberOfAttrsWritten);
714 
715 BOOL
716 WINAPI
718  _In_ HANDLE hConsoleOutput,
719  _In_reads_(nLength) LPCSTR lpCharacter,
721  _In_ COORD dwWriteCoord,
722  _Out_ LPDWORD lpNumberOfCharsWritten);
723 
724 BOOL
725 WINAPI
727  _In_ HANDLE hConsoleOutput,
728  _In_reads_(nLength) LPCWSTR lpCharacter,
730  _In_ COORD dwWriteCoord,
731  _Out_ LPDWORD lpNumberOfCharsWritten);
732 
733 
734 #ifdef UNICODE
735 #define AddConsoleAlias AddConsoleAliasW
736 #define GetConsoleAlias GetConsoleAliasW
737 #define GetConsoleAliases GetConsoleAliasesW
738 #define GetConsoleAliasesLength GetConsoleAliasesLengthW
739 #define GetConsoleAliasExes GetConsoleAliasExesW
740 #define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
741 #define GetConsoleTitle GetConsoleTitleW
742 #define PeekConsoleInput PeekConsoleInputW
743 #define ReadConsole ReadConsoleW
744 #define ReadConsoleInput ReadConsoleInputW
745 #define ReadConsoleInputEx ReadConsoleInputExW
746 #define ReadConsoleOutput ReadConsoleOutputW
747 #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
748 #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
749 #define SetConsoleTitle SetConsoleTitleW
750 #define WriteConsole WriteConsoleW
751 #define WriteConsoleInput WriteConsoleInputW
752 #define WriteConsoleInputVDM WriteConsoleInputVDMW
753 #define WriteConsoleOutput WriteConsoleOutputW
754 #define FillConsoleOutputCharacter FillConsoleOutputCharacterW
755 #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
756 #else
757 #define AddConsoleAlias AddConsoleAliasA
758 #define GetConsoleAlias GetConsoleAliasA
759 #define GetConsoleAliases GetConsoleAliasesA
760 #define GetConsoleAliasesLength GetConsoleAliasesLengthA
761 #define GetConsoleAliasExes GetConsoleAliasExesA
762 #define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
763 #define GetConsoleTitle GetConsoleTitleA
764 #define PeekConsoleInput PeekConsoleInputA
765 #define ReadConsole ReadConsoleA
766 #define ReadConsoleInput ReadConsoleInputA
767 #define ReadConsoleInputEx ReadConsoleInputExA
768 #define ReadConsoleOutput ReadConsoleOutputA
769 #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
770 #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
771 #define SetConsoleTitle SetConsoleTitleA
772 #define WriteConsole WriteConsoleA
773 #define WriteConsoleInput WriteConsoleInputA
774 #define WriteConsoleInputVDM WriteConsoleInputVDMA
775 #define WriteConsoleOutput WriteConsoleOutputA
776 #define FillConsoleOutputCharacter FillConsoleOutputCharacterA
777 #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
778 #endif
779 
780 #ifdef _MSC_VER
781 #pragma warning(pop)
782 #endif
783 
784 #ifdef __cplusplus
785 }
786 #endif
787 
788 #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
struct _KEY_EVENT_RECORD KEY_EVENT_RECORD
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:1298
#define LF_FACESIZE
Definition: dimm.idl:39
WCHAR UnicodeChar
Definition: wincon.h:230
DWORD dwEventFlags
Definition: wincon.h:245
BOOL WINAPI DECLSPEC_HOTPATCH AddConsoleAliasA(LPCSTR lpSource, LPCSTR lpTarget, LPCSTR lpExeName)
Definition: alias.c:145
WORD wVirtualScanCode
Definition: wincon.h:228
CHAR AsciiChar
Definition: wincon.h:170
static WCHAR ExeNameBuffer[EXENAME_LENGTH]
Definition: console.c:43
BOOL WINAPI GetConsoleDisplayMode(LPDWORD lpModeFlags)
Definition: console.c:526
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
_In_ DWORD _Out_ LPDWORD lpNumberOfEventsRead
Definition: wincon.h:461
struct _CONSOLE_SCREEN_BUFFER_INFO * PCONSOLE_SCREEN_BUFFER_INFO
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)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesA(LPSTR AliasBuffer, DWORD AliasBufferLength, LPSTR ExeName)
Definition: alias.c:396
#define _In_reads_(size)
Definition: no_sal2.h:228
WCHAR UnicodeChar
Definition: wincon.h:169
char CHAR
Definition: xmlstorage.h:175
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2031
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:27
_In_ DWORD nLength
Definition: wincon.h:461
BOOL WINAPI AllocConsole(VOID)
Definition: console.c:48
SHORT X
Definition: wincon.h:188
DWORD dwControlKeyState
Definition: wincon.h:233
WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent
Definition: wincon.h:265
COORD WINAPI GetConsoleFontSize(_In_ HANDLE hConsoleOutput, _In_ DWORD nFont)
struct _COORD * PCOORD
union _KEY_EVENT_RECORD::@3176 uChar
struct _WINDOW_BUFFER_SIZE_RECORD * PWINDOW_BUFFER_SIZE_RECORD
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:195
BOOL WINAPI SetConsoleTitleW(_In_ LPCWSTR)
char * LPSTR
Definition: xmlstorage.h:182
union _INPUT_RECORD::@3177 Event
#define BOOL
Definition: nt_native.h:43
DWORD dwButtonState
Definition: wincon.h:243
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
COORD dwFontSize
Definition: wincon.h:200
#define _In_opt_
Definition: no_sal2.h:213
SHORT Right
Definition: wincon.h:178
WORD wVirtualKeyCode
Definition: wincon.h:227
struct _FOCUS_EVENT_RECORD * PFOCUS_EVENT_RECORD
BOOL WINAPI GetNumberOfConsoleInputEvents(_In_ HANDLE, _Out_ PDWORD)
SHORT Left
Definition: wincon.h:176
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesA(LPSTR lpExeNameBuffer, DWORD ExeNameBufferLength)
Definition: alias.c:549
BOOL WINAPI SetConsoleTitleA(_In_ LPCSTR)
struct _CONSOLE_READCONSOLE_CONTROL * PCONSOLE_READCONSOLE_CONTROL
WORD wRepeatCount
Definition: wincon.h:226
struct _KEY_EVENT_RECORD * PKEY_EVENT_RECORD
unsigned int BOOL
Definition: ntddk_ex.h:94
SHORT Y
Definition: wincon.h:189
short SHORT
Definition: pedump.c:59
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesLengthW(VOID)
Definition: alias.c:586
struct _INPUT_RECORD * PINPUT_RECORD
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
DWORD WINAPI GetConsoleTitleA(_Out_writes_(nSize) LPSTR lpConsoleTitle, _In_ DWORD nSize)
COORD dwMousePosition
Definition: wincon.h:242
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 _Out_
Definition: no_sal2.h:323
_In_ DWORD nNumberOfCharsToRead
Definition: wincon.h:479
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesW(LPWSTR AliasBuffer, DWORD AliasBufferLength, LPWSTR ExeName)
Definition: alias.c:376
const char * LPCSTR
Definition: xmlstorage.h:183
HANDLE hMutex
Definition: mutex.c:11
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputA(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1278
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputExA(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead, IN WORD wFlags)
Definition: readwrite.c:1319
BOOL WINAPI CloseConsoleHandle(_In_ HANDLE)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesW(LPWSTR lpExeNameBuffer, DWORD ExeNameBufferLength)
Definition: alias.c:535
struct _MENU_EVENT_RECORD MENU_EVENT_RECORD
UINT WINAPI GetConsoleOutputCP(VOID)
Definition: console.c:2453
BOOL WINAPI SetConsoleTextAttribute(_In_ HANDLE, _In_ WORD)
struct _CONSOLE_SELECTION_INFO CONSOLE_SELECTION_INFO
#define _Out_opt_
Definition: no_sal2.h:339
HANDLE WINAPI GetConsoleInputWaitHandle(VOID)
Definition: console.c:683
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:1176
BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1218
_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:172
#define WINAPI
Definition: msvc.h:6
KEY_EVENT_RECORD KeyEvent
Definition: wincon.h:263
unsigned short WORD
Definition: ntddk_ex.h:93
BOOL WINAPI DECLSPEC_HOTPATCH AddConsoleAliasW(LPCWSTR lpSource, LPCWSTR lpTarget, LPCWSTR lpExeName)
Definition: alias.c:120
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:1197
#define _Inout_
Definition: no_sal2.h:244
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesLengthA(LPSTR lpExeName)
Definition: alias.c:478
BOOL WINAPI FillConsoleOutputCharacterW(_In_ HANDLE, _In_ WCHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD)
BOOL WINAPI SetConsoleWindowInfo(_In_ HANDLE, _In_ BOOL, _In_ const SMALL_RECT *)
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:267
BOOL WINAPI SetConsoleCursor(_In_ HANDLE, _In_ HCURSOR)
struct _COORD COORD
struct _CONSOLE_FONT_INFO CONSOLE_FONT_INFO
SHORT Bottom
Definition: wincon.h:179
#define _Reserved_
Definition: no_sal2.h:573
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
BOOL WINAPI SetConsoleDisplayMode(HANDLE hConsoleOutput, DWORD dwFlags, PCOORD lpNewScreenBufferDimensions)
Definition: console.c:877
_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)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasesLengthW(LPWSTR lpExeName)
Definition: alias.c:466
Definition: bl.h:1338
struct _CONSOLE_READCONSOLE_CONTROL CONSOLE_READCONSOLE_CONTROL
BOOL WINAPI VerifyConsoleIoHandle(_In_ HANDLE)
BOOL WINAPI SetConsoleCtrlHandler(_In_opt_ PHANDLER_ROUTINE, _In_ BOOL)
BOOL WINAPI GenerateConsoleCtrlEvent(_In_ DWORD, _In_ DWORD)
SHORT Top
Definition: wincon.h:177
DWORD WINAPI GetConsoleTitleW(_Out_writes_(nSize) LPWSTR lpConsoleTitle, _In_ DWORD nSize)
uint16_t * LPWORD
Definition: typedefs.h:54
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasW(LPWSTR lpSource, LPWSTR lpTargetBuffer, DWORD TargetBufferLength, LPWSTR lpExeName)
Definition: alias.c:260
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define _In_
Definition: no_sal2.h:204
_In_ DWORD _Out_ _In_opt_ PCONSOLE_READCONSOLE_CONTROL pInputControl
Definition: wincon.h:481
BOOL WINAPI DECLSPEC_HOTPATCH PeekConsoleInputA(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1238
BOOL WINAPI WriteConsoleOutputAttribute(_In_ HANDLE hConsoleOutput, _In_reads_(nLength) CONST WORD *lpAttribute, _In_ DWORD nLength, _In_ COORD dwWriteCoord, _Out_ LPDWORD lpNumberOfAttrsWritten)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasExesLengthA(VOID)
Definition: alias.c:599
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:244
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)
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)
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:261
MOUSE_EVENT_RECORD MouseEvent
Definition: wincon.h:264
BOOL WINAPI SetConsolePalette(_In_ HANDLE, _In_ HPALETTE, _In_ UINT)
BOOL WINAPI AttachConsole(IN DWORD dwProcessId)
Definition: console.c:96
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:57
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleAliasA(LPSTR lpSource, LPSTR lpTargetBuffer, DWORD TargetBufferLength, LPSTR lpExeName)
Definition: alias.c:283
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:266
_Out_writes_(nLength) PINPUT_RECORD lpBuffer
WCHAR * LPWSTR
Definition: xmlstorage.h:184
union _CHAR_INFO::@3175 Char
BOOL(CALLBACK * PHANDLER_ROUTINE)(_In_ DWORD)
Definition: wincon.h:222
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)
#define CONST
Definition: pedump.c:81
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
BOOL WINAPI ReadConsoleOutputAttribute(_In_ HANDLE hConsoleOutput, _Out_writes_(nLength) LPWORD lpAttribute, _In_ DWORD nLength, _In_ COORD dwReadCoord, _Out_ LPDWORD lpNumberOfAttrsRead)
BOOL WINAPI FreeConsole(VOID)
Definition: console.c:105
BOOL WINAPI DECLSPEC_HOTPATCH ReadConsoleInputW(IN HANDLE hConsoleInput, OUT PINPUT_RECORD lpBuffer, IN DWORD nLength, OUT LPDWORD lpNumberOfEventsRead)
Definition: readwrite.c:1258
HWND WINAPI DECLSPEC_HOTPATCH GetConsoleWindow(VOID)
Definition: console.c:2730
struct _INPUT_RECORD INPUT_RECORD