11744dd3d9c367d90fa50da12eb32845e8355c21
[reactos.git] / reactos / include / psdk / wincon.h
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 #if (_WIN32_WINNT >= 0x0600)
31 #define CONSOLE_OVERSTRIKE 1
32 #endif
33 #define CONSOLE_FULLSCREEN_HARDWARE 2
34
35 // These codes should be given to SetConsoleDisplayMode
36 #define CONSOLE_FULLSCREEN_MODE 1
37 #define CONSOLE_WINDOWED_MODE 2
38
39 /*
40 * Color attributes for text and screen background
41 */
42 #define FOREGROUND_BLUE 0x0001
43 #define FOREGROUND_GREEN 0x0002
44 #define FOREGROUND_RED 0x0004
45 #define FOREGROUND_INTENSITY 0x0008
46 #define BACKGROUND_BLUE 0x0010
47 #define BACKGROUND_GREEN 0x0020
48 #define BACKGROUND_RED 0x0040
49 #define BACKGROUND_INTENSITY 0x0080
50
51 #define COMMON_LVB_LEADING_BYTE 0x0100
52 #define COMMON_LVB_TRAILING_BYTE 0x0200
53 #define COMMON_LVB_GRID_HORIZONTAL 0x0400
54 #define COMMON_LVB_GRID_LVERTICAL 0x0800
55 #define COMMON_LVB_GRID_RVERTICAL 0x1000
56 #define COMMON_LVB_REVERSE_VIDEO 0x4000
57 #define COMMON_LVB_UNDERSCORE 0x8000
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_LOGOFF_EVENT 5
72 #define CTRL_SHUTDOWN_EVENT 6
73
74 /*
75 * Input mode flags
76 */
77 #define ENABLE_PROCESSED_INPUT 0x0001
78 #define ENABLE_LINE_INPUT 0x0002
79 #define ENABLE_ECHO_INPUT 0x0004
80 #define ENABLE_WINDOW_INPUT 0x0008
81 #define ENABLE_MOUSE_INPUT 0x0010
82 #define ENABLE_INSERT_MODE 0x0020
83 #define ENABLE_QUICK_EDIT_MODE 0x0040
84 #define ENABLE_EXTENDED_FLAGS 0x0080
85 #if (_WIN32_WINNT >= 0x0600)
86 #define ENABLE_AUTO_POSITION 0x0100
87 #endif
88
89 /*
90 * Output mode flags
91 */
92 #define ENABLE_PROCESSED_OUTPUT 0x0001
93 #define ENABLE_WRAP_AT_EOL_OUTPUT 0x0002
94
95 /*
96 * Console selection flags
97 */
98 #define CONSOLE_NO_SELECTION 0x0000
99 #define CONSOLE_SELECTION_IN_PROGRESS 0x0001
100 #define CONSOLE_SELECTION_NOT_EMPTY 0x0002
101 #define CONSOLE_MOUSE_SELECTION 0x0004
102 #define CONSOLE_MOUSE_DOWN 0x0008
103
104 /*
105 * History duplicate flags
106 */
107 #if (_WIN32_WINNT >= 0x0600)
108 #define HISTORY_NO_DUP_FLAG 0x0001
109 #endif
110
111 /*
112 * Event types
113 */
114 #define KEY_EVENT 0x0001
115 #define MOUSE_EVENT 0x0002
116 #define WINDOW_BUFFER_SIZE_EVENT 0x0004
117 #define MENU_EVENT 0x0008
118 #define FOCUS_EVENT 0x0010
119
120 /*
121 * ControlKeyState flags
122 */
123 #define RIGHT_ALT_PRESSED 0x0001
124 #define LEFT_ALT_PRESSED 0x0002
125 #define RIGHT_CTRL_PRESSED 0x0004
126 #define LEFT_CTRL_PRESSED 0x0008
127 #define SHIFT_PRESSED 0x0010
128 #define NUMLOCK_ON 0x0020
129 #define SCROLLLOCK_ON 0x0040
130 #define CAPSLOCK_ON 0x0080
131 #define ENHANCED_KEY 0x0100
132
133 /*
134 * ButtonState flags
135 */
136 #define FROM_LEFT_1ST_BUTTON_PRESSED 0x0001
137 #define RIGHTMOST_BUTTON_PRESSED 0x0002
138 #define FROM_LEFT_2ND_BUTTON_PRESSED 0x0004
139 #define FROM_LEFT_3RD_BUTTON_PRESSED 0x0008
140 #define FROM_LEFT_4TH_BUTTON_PRESSED 0x0010
141
142 /*
143 * Mouse event flags
144 */
145 #define MOUSE_MOVED 0x0001
146 #define DOUBLE_CLICK 0x0002
147 #define MOUSE_WHEELED 0x0004
148 #if (_WIN32_WINNT >= 0x0600)
149 #define MOUSE_HWHEELED 0x0008
150 #endif
151
152 typedef struct _CONSOLE_READCONSOLE_CONTROL {
153 ULONG nLength;
154 ULONG nInitialChars;
155 ULONG dwCtrlWakeupMask;
156 ULONG dwControlKeyState;
157 } CONSOLE_READCONSOLE_CONTROL, *PCONSOLE_READCONSOLE_CONTROL;
158
159 typedef struct _CHAR_INFO {
160 union {
161 WCHAR UnicodeChar;
162 CHAR AsciiChar;
163 } Char;
164 WORD Attributes;
165 } CHAR_INFO,*PCHAR_INFO;
166
167 typedef struct _SMALL_RECT {
168 SHORT Left;
169 SHORT Top;
170 SHORT Right;
171 SHORT Bottom;
172 } SMALL_RECT,*PSMALL_RECT;
173
174 typedef struct _CONSOLE_CURSOR_INFO {
175 DWORD dwSize;
176 BOOL bVisible;
177 } CONSOLE_CURSOR_INFO,*PCONSOLE_CURSOR_INFO;
178
179 typedef struct _COORD {
180 SHORT X;
181 SHORT Y;
182 } COORD, *PCOORD;
183
184 typedef struct _CONSOLE_SELECTION_INFO {
185 DWORD dwFlags;
186 COORD dwSelectionAnchor;
187 SMALL_RECT srSelection;
188 } CONSOLE_SELECTION_INFO, *PCONSOLE_SELECTION_INFO;
189
190 typedef struct _CONSOLE_FONT_INFO {
191 DWORD nFont;
192 COORD dwFontSize;
193 } CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
194
195 typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
196 COORD dwSize;
197 COORD dwCursorPosition;
198 WORD wAttributes;
199 SMALL_RECT srWindow;
200 COORD dwMaximumWindowSize;
201 } CONSOLE_SCREEN_BUFFER_INFO,*PCONSOLE_SCREEN_BUFFER_INFO;
202
203 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
204 #if defined(_WINGDI_) && !defined(NOGDI)
205 typedef struct _CONSOLE_GRAPHICS_BUFFER_INFO {
206 DWORD dwBitMapInfoLength;
207 LPBITMAPINFO lpBitMapInfo;
208 DWORD dwUsage; // DIB_PAL_COLORS or DIB_RGB_COLORS
209 HANDLE hMutex;
210 PVOID lpBitMap;
211 } CONSOLE_GRAPHICS_BUFFER_INFO, *PCONSOLE_GRAPHICS_BUFFER_INFO;
212 #endif
213
214 typedef BOOL(CALLBACK *PHANDLER_ROUTINE)(_In_ DWORD);
215
216 typedef struct _KEY_EVENT_RECORD {
217 BOOL bKeyDown;
218 WORD wRepeatCount;
219 WORD wVirtualKeyCode;
220 WORD wVirtualScanCode;
221 union {
222 WCHAR UnicodeChar;
223 CHAR AsciiChar;
224 } uChar;
225 DWORD dwControlKeyState;
226 }
227 #ifdef __GNUC__
228 /* gcc's alignment is not what win32 expects */
229 PACKED
230 #endif
231 KEY_EVENT_RECORD;
232
233 typedef struct _MOUSE_EVENT_RECORD {
234 COORD dwMousePosition;
235 DWORD dwButtonState;
236 DWORD dwControlKeyState;
237 DWORD dwEventFlags;
238 } MOUSE_EVENT_RECORD;
239
240 typedef struct _WINDOW_BUFFER_SIZE_RECORD { COORD dwSize; } WINDOW_BUFFER_SIZE_RECORD;
241 typedef struct _MENU_EVENT_RECORD { UINT dwCommandId; } MENU_EVENT_RECORD,*PMENU_EVENT_RECORD;
242 typedef struct _FOCUS_EVENT_RECORD { BOOL bSetFocus; } FOCUS_EVENT_RECORD;
243
244 typedef struct _INPUT_RECORD {
245 WORD EventType;
246 union {
247 KEY_EVENT_RECORD KeyEvent;
248 MOUSE_EVENT_RECORD MouseEvent;
249 WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
250 MENU_EVENT_RECORD MenuEvent;
251 FOCUS_EVENT_RECORD FocusEvent;
252 } Event;
253 } INPUT_RECORD,*PINPUT_RECORD;
254
255 #if (_WIN32_WINNT >= 0x0600)
256 typedef struct _CONSOLE_HISTORY_INFO {
257 UINT cbSize;
258 UINT HistoryBufferSize;
259 UINT NumberOfHistoryBuffers;
260 DWORD dwFlags;
261 } CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO;
262
263 typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX {
264 ULONG cbSize;
265 COORD dwSize;
266 COORD dwCursorPosition;
267 WORD wAttributes;
268 SMALL_RECT srWindow;
269 COORD dwMaximumWindowSize;
270 WORD wPopupAttributes;
271 COLORREF ColorTable[16];
272 } CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX;
273
274 #ifndef NOGDI
275 typedef struct _CONSOLE_FONT_INFOEX {
276 ULONG cbSize;
277 DWORD nFont;
278 COORD dwFontSize;
279 UINT FontFamily;
280 UINT FontWeight;
281 WCHAR FaceName[LF_FACESIZE];
282 } CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX;
283 #endif
284 #endif
285
286 BOOL WINAPI AllocConsole(VOID);
287
288 #if (_WIN32_WINNT >= 0x0501)
289 BOOL WINAPI AttachConsole(_In_ DWORD);
290
291 BOOL WINAPI AddConsoleAliasA(_In_ LPCSTR, _In_ LPCSTR, _In_ LPCSTR);
292 BOOL WINAPI AddConsoleAliasW(_In_ LPCWSTR, _In_ LPCWSTR, _In_ LPCWSTR);
293
294 DWORD
295 WINAPI
296 GetConsoleAliasA(
297 _In_ LPSTR Source,
298 _Out_writes_(TargetBufferLength) LPSTR TargetBuffer,
299 _In_ DWORD TargetBufferLength,
300 _In_ LPSTR ExeName);
301
302 DWORD
303 WINAPI
304 GetConsoleAliasW(
305 _In_ LPWSTR Source,
306 _Out_writes_(TargetBufferLength) LPWSTR TargetBuffer,
307 _In_ DWORD TargetBufferLength,
308 _In_ LPWSTR ExeName);
309
310 DWORD
311 WINAPI
312 GetConsoleAliasesA(
313 _Out_writes_(AliasBufferLength) LPSTR AliasBuffer,
314 _In_ DWORD AliasBufferLength,
315 _In_ LPSTR ExeName);
316
317 DWORD
318 WINAPI
319 GetConsoleAliasesW(
320 _Out_writes_(AliasBufferLength) LPWSTR AliasBuffer,
321 _In_ DWORD AliasBufferLength,
322 _In_ LPWSTR ExeName);
323
324 DWORD WINAPI GetConsoleAliasesLengthA(_In_ LPSTR ExeName);
325 DWORD WINAPI GetConsoleAliasesLengthW(_In_ LPWSTR ExeName);
326
327 DWORD
328 WINAPI
329 GetConsoleAliasExesA(
330 _Out_writes_(ExeNameBufferLength) LPSTR ExeNameBuffer,
331 _In_ DWORD ExeNameBufferLength);
332
333 DWORD
334 WINAPI
335 GetConsoleAliasExesW(
336 _Out_writes_(ExeNameBufferLength) LPWSTR ExeNameBuffer,
337 _In_ DWORD ExeNameBufferLength);
338
339 DWORD WINAPI GetConsoleAliasExesLengthA(VOID);
340 DWORD WINAPI GetConsoleAliasExesLengthW(VOID);
341 #endif
342
343 HANDLE WINAPI CreateConsoleScreenBuffer(_In_ DWORD, _In_ DWORD, _In_opt_ CONST SECURITY_ATTRIBUTES*, _In_ DWORD, _Reserved_ LPVOID);
344 BOOL WINAPI FillConsoleOutputAttribute(_In_ HANDLE, _In_ WORD, _In_ DWORD, _In_ COORD, _Out_ PDWORD);
345 BOOL WINAPI FillConsoleOutputCharacterA(_In_ HANDLE, _In_ CHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD);
346 BOOL WINAPI FillConsoleOutputCharacterW(_In_ HANDLE, _In_ WCHAR, _In_ DWORD, _In_ COORD, _Out_ PDWORD);
347 BOOL WINAPI FlushConsoleInputBuffer(_In_ HANDLE);
348 BOOL WINAPI FreeConsole(VOID);
349 BOOL WINAPI GenerateConsoleCtrlEvent(_In_ DWORD, _In_ DWORD);
350 UINT WINAPI GetConsoleCP(VOID);
351 BOOL WINAPI GetConsoleCursorInfo(_In_ HANDLE, _Out_ PCONSOLE_CURSOR_INFO);
352 BOOL WINAPI GetConsoleMode(HANDLE,PDWORD);
353 UINT WINAPI GetConsoleOutputCP(VOID);
354 BOOL WINAPI GetConsoleScreenBufferInfo(_In_ HANDLE, _Out_ PCONSOLE_SCREEN_BUFFER_INFO);
355
356 /* Undocumented, see http://blog.airesoft.co.uk/2012/10/things-ms-can-do-that-they-dont-tell-you-about-console-graphics/ */
357 BOOL WINAPI InvalidateConsoleDIBits(_In_ HANDLE, _In_ PSMALL_RECT);
358
359 DWORD
360 WINAPI
361 GetConsoleTitleA(
362 _Out_writes_(nSize) LPSTR lpConsoleTitle,
363 _In_ DWORD nSize);
364
365 DWORD
366 WINAPI
367 GetConsoleTitleW(
368 _Out_writes_(nSize) LPWSTR lpConsoleTitle,
369 _In_ DWORD nSize);
370
371 COORD
372 WINAPI
373 GetConsoleFontSize(
374 _In_ HANDLE hConsoleOutput,
375 _In_ DWORD nFont);
376
377 BOOL
378 WINAPI
379 GetCurrentConsoleFont(
380 _In_ HANDLE hConsoleOutput,
381 _In_ BOOL bMaximumWindow,
382 _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont);
383
384 #if (_WIN32_WINNT >= 0x0500)
385 HWND WINAPI GetConsoleWindow(VOID);
386 BOOL APIENTRY GetConsoleDisplayMode(_Out_ LPDWORD lpModeFlags);
387 BOOL APIENTRY SetConsoleDisplayMode(_In_ HANDLE hConsoleOutput, _In_ DWORD dwFlags, _Out_opt_ PCOORD lpNewScreenBufferDimensions);
388 #endif
389 COORD WINAPI GetLargestConsoleWindowSize(_In_ HANDLE);
390 BOOL WINAPI GetNumberOfConsoleInputEvents(HANDLE,PDWORD);
391 BOOL WINAPI GetNumberOfConsoleMouseButtons(_Out_ PDWORD);
392
393 BOOL WINAPI PeekConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
394
395 BOOL
396 WINAPI
397 PeekConsoleInputW(
398 _In_ HANDLE hConsoleInput,
399 _Out_writes_(nLength) PINPUT_RECORD lpBuffer,
400 _In_ DWORD nLength,
401 _Out_ LPDWORD lpNumberOfEventsRead);
402
403 BOOL WINAPI ReadConsoleA(HANDLE,PVOID,DWORD,PDWORD,PCONSOLE_READCONSOLE_CONTROL);
404 BOOL WINAPI ReadConsoleW(HANDLE,PVOID,DWORD,PDWORD,PCONSOLE_READCONSOLE_CONTROL);
405 BOOL WINAPI ReadConsoleInputA(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
406 BOOL WINAPI ReadConsoleInputW(HANDLE,PINPUT_RECORD,DWORD,PDWORD);
407
408 BOOL
409 WINAPI
410 ReadConsoleOutputAttribute(
411 _In_ HANDLE hConsoleOutput,
412 _Out_writes_(nLength) LPWORD lpAttribute,
413 _In_ DWORD nLength,
414 _In_ COORD dwReadCoord,
415 _Out_ LPDWORD lpNumberOfAttrsRead);
416
417 BOOL
418 WINAPI
419 ReadConsoleOutputCharacterA(
420 _In_ HANDLE hConsoleOutput,
421 _Out_writes_(nLength) LPSTR lpCharacter,
422 _In_ DWORD nLength,
423 _In_ COORD dwReadCoord,
424 _Out_ LPDWORD lpNumberOfCharsRead);
425
426 BOOL
427 WINAPI
428 ReadConsoleOutputCharacterW(
429 _In_ HANDLE hConsoleOutput,
430 _Out_writes_(nLength) LPWSTR lpCharacter,
431 _In_ DWORD nLength,
432 _In_ COORD dwReadCoord,
433 _Out_ LPDWORD lpNumberOfCharsRead);
434
435 BOOL
436 WINAPI
437 ReadConsoleOutputA(
438 _In_ HANDLE hConsoleOutput,
439 _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
440 _In_ COORD dwBufferSize,
441 _In_ COORD dwBufferCoord,
442 _Inout_ PSMALL_RECT lpReadRegion);
443
444 BOOL
445 WINAPI
446 ReadConsoleOutputW(
447 _In_ HANDLE hConsoleOutput,
448 _Out_writes_(dwBufferSize.X * dwBufferSize.Y) PCHAR_INFO lpBuffer,
449 _In_ COORD dwBufferSize,
450 _In_ COORD dwBufferCoord,
451 _Inout_ PSMALL_RECT lpReadRegion);
452
453 BOOL WINAPI ScrollConsoleScreenBufferA(_In_ HANDLE, _In_ const SMALL_RECT*, _In_opt_ const SMALL_RECT*, _In_ COORD, _In_ const CHAR_INFO*);
454 BOOL WINAPI ScrollConsoleScreenBufferW(_In_ HANDLE, _In_ const SMALL_RECT*, _In_opt_ const SMALL_RECT*, _In_ COORD, _In_ const CHAR_INFO*);
455 BOOL WINAPI SetConsoleActiveScreenBuffer(_In_ HANDLE);
456 BOOL WINAPI SetConsoleCP(_In_ UINT);
457 BOOL WINAPI SetConsoleCtrlHandler(PHANDLER_ROUTINE,BOOL);
458 BOOL WINAPI SetConsoleCursorInfo(_In_ HANDLE, _In_ const CONSOLE_CURSOR_INFO*);
459 BOOL WINAPI SetConsoleCursorPosition(_In_ HANDLE, _In_ COORD);
460 BOOL WINAPI SetConsoleMode(HANDLE,DWORD);
461 BOOL WINAPI SetConsoleOutputCP(_In_ UINT);
462 BOOL WINAPI SetConsoleScreenBufferSize(_In_ HANDLE, _In_ COORD);
463 BOOL WINAPI SetConsoleTextAttribute(_In_ HANDLE, _In_ WORD);
464 BOOL WINAPI SetConsoleTitleA(_In_ LPCSTR);
465 BOOL WINAPI SetConsoleTitleW(_In_ LPCWSTR);
466 BOOL WINAPI SetConsoleWindowInfo(_In_ HANDLE, _In_ BOOL, _In_ const SMALL_RECT*);
467
468 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ConsoleMenuControl.php */
469 HMENU WINAPI ConsoleMenuControl(_In_ HANDLE, _In_ DWORD, _In_ DWORD);
470 /* Undocumented */
471 BOOL WINAPI SetConsoleMenuClose(_In_ BOOL);
472 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/SetConsoleCursor.php */
473 BOOL WINAPI SetConsoleCursor(_In_ HANDLE, _In_ HCURSOR);
474 /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ShowConsoleCursor.php */
475 INT WINAPI ShowConsoleCursor(_In_ HANDLE, _In_ BOOL);
476
477 BOOL WINAPI WriteConsoleA(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID);
478 BOOL WINAPI WriteConsoleW(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID);
479
480 BOOL
481 WINAPI
482 WriteConsoleInputA(
483 _In_ HANDLE hConsoleInput,
484 _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer,
485 _In_ DWORD nLength,
486 _Out_ LPDWORD lpNumberOfEventsWritten);
487
488 BOOL
489 WINAPI
490 WriteConsoleInputW(
491 _In_ HANDLE hConsoleInput,
492 _In_reads_(nLength) CONST INPUT_RECORD *lpBuffer,
493 _In_ DWORD nLength,
494 _Out_ LPDWORD lpNumberOfEventsWritten);
495
496 BOOL
497 WINAPI
498 WriteConsoleOutputA(
499 _In_ HANDLE hConsoleOutput,
500 _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
501 _In_ COORD dwBufferSize,
502 _In_ COORD dwBufferCoord,
503 _Inout_ PSMALL_RECT lpWriteRegion);
504
505 BOOL
506 WINAPI
507 WriteConsoleOutputW(
508 _In_ HANDLE hConsoleOutput,
509 _In_reads_(dwBufferSize.X * dwBufferSize.Y) CONST CHAR_INFO *lpBuffer,
510 _In_ COORD dwBufferSize,
511 _In_ COORD dwBufferCoord,
512 _Inout_ PSMALL_RECT lpWriteRegion);
513
514 BOOL
515 WINAPI
516 WriteConsoleOutputAttribute(
517 _In_ HANDLE hConsoleOutput,
518 _In_reads_(nLength) CONST WORD *lpAttribute,
519 _In_ DWORD nLength,
520 _In_ COORD dwWriteCoord,
521 _Out_ LPDWORD lpNumberOfAttrsWritten);
522
523 BOOL
524 WINAPI
525 WriteConsoleOutputCharacterA(
526 _In_ HANDLE hConsoleOutput,
527 _In_reads_(nLength) LPCSTR lpCharacter,
528 _In_ DWORD nLength,
529 _In_ COORD dwWriteCoord,
530 _Out_ LPDWORD lpNumberOfCharsWritten);
531
532 BOOL
533 WINAPI
534 WriteConsoleOutputCharacterW(
535 _In_ HANDLE hConsoleOutput,
536 _In_reads_(nLength) LPCWSTR lpCharacter,
537 _In_ DWORD nLength,
538 _In_ COORD dwWriteCoord,
539 _Out_ LPDWORD lpNumberOfCharsWritten);
540
541
542 #ifdef UNICODE
543 #define AddConsoleAlias AddConsoleAliasW
544 #define GetConsoleAlias GetConsoleAliasW
545 #define GetConsoleAliases GetConsoleAliasesW
546 #define GetConsoleAliasesLength GetConsoleAliasesLengthW
547 #define GetConsoleAliasExes GetConsoleAliasExesW
548 #define GetConsoleAliasExesLength GetConsoleAliasExesLengthW
549 #define GetConsoleTitle GetConsoleTitleW
550 #define PeekConsoleInput PeekConsoleInputW
551 #define ReadConsole ReadConsoleW
552 #define ReadConsoleInput ReadConsoleInputW
553 #define ReadConsoleOutput ReadConsoleOutputW
554 #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterW
555 #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferW
556 #define SetConsoleTitle SetConsoleTitleW
557 #define WriteConsole WriteConsoleW
558 #define WriteConsoleInput WriteConsoleInputW
559 #define WriteConsoleOutput WriteConsoleOutputW
560 #define FillConsoleOutputCharacter FillConsoleOutputCharacterW
561 #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterW
562 #else
563 #define AddConsoleAlias AddConsoleAliasA
564 #define GetConsoleAlias GetConsoleAliasA
565 #define GetConsoleAliases GetConsoleAliasesA
566 #define GetConsoleAliasesLength GetConsoleAliasesLengthA
567 #define GetConsoleAliasExes GetConsoleAliasExesA
568 #define GetConsoleAliasExesLength GetConsoleAliasExesLengthA
569 #define GetConsoleTitle GetConsoleTitleA
570 #define PeekConsoleInput PeekConsoleInputA
571 #define ReadConsole ReadConsoleA
572 #define ReadConsoleInput ReadConsoleInputA
573 #define ReadConsoleOutput ReadConsoleOutputA
574 #define ReadConsoleOutputCharacter ReadConsoleOutputCharacterA
575 #define ScrollConsoleScreenBuffer ScrollConsoleScreenBufferA
576 #define SetConsoleTitle SetConsoleTitleA
577 #define WriteConsole WriteConsoleA
578 #define WriteConsoleInput WriteConsoleInputA
579 #define WriteConsoleOutput WriteConsoleOutputA
580 #define FillConsoleOutputCharacter FillConsoleOutputCharacterA
581 #define WriteConsoleOutputCharacter WriteConsoleOutputCharacterA
582 #endif
583
584 #ifdef _MSC_VER
585 #pragma warning(pop)
586 #endif
587
588 #ifdef __cplusplus
589 }
590 #endif
591 #endif