a118a7df86cf82a7dc81867d4530acf3c8b3a199
[reactos.git] / reactos / include / reactos / subsys / win / conmsg.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: include/reactos/subsys/win/conmsg.h
5 * PURPOSE: Public definitions for communication
6 * between Console API Clients and Servers
7 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
8 */
9
10 #ifndef _CONMSG_H
11 #define _CONMSG_H
12
13 #pragma once
14
15 #define CONSRV_SERVERDLL_INDEX 2
16 #define CONSRV_FIRST_API_NUMBER 512
17
18 // Windows Server 2003 table from http://j00ru.vexillium.org/csrss_list/api_list.html#Windows_2k3
19 typedef enum _CONSRV_API_NUMBER
20 {
21 ConsolepOpenConsole = CONSRV_FIRST_API_NUMBER,
22 ConsolepGetConsoleInput,
23 ConsolepWriteConsoleInput,
24 ConsolepReadConsoleOutput,
25 ConsolepWriteConsoleOutput,
26 ConsolepReadConsoleOutputString,
27 ConsolepWriteConsoleOutputString,
28 ConsolepFillConsoleOutput,
29 ConsolepGetMode,
30 ConsolepGetNumberOfFonts,
31 ConsolepGetNumberOfInputEvents,
32 ConsolepGetScreenBufferInfo,
33 ConsolepGetCursorInfo,
34 ConsolepGetMouseInfo,
35 ConsolepGetFontInfo,
36 ConsolepGetFontSize,
37 ConsolepGetCurrentFont,
38 ConsolepSetMode,
39 ConsolepSetActiveScreenBuffer,
40 ConsolepFlushInputBuffer,
41 ConsolepGetLargestWindowSize,
42 ConsolepSetScreenBufferSize,
43 ConsolepSetCursorPosition,
44 ConsolepSetCursorInfo,
45 ConsolepSetWindowInfo,
46 ConsolepScrollScreenBuffer,
47 ConsolepSetTextAttribute,
48 ConsolepSetFont,
49 ConsolepSetIcon,
50 ConsolepReadConsole,
51 ConsolepWriteConsole,
52 ConsolepDuplicateHandle,
53 ConsolepGetHandleInformation,
54 ConsolepSetHandleInformation,
55 ConsolepCloseHandle,
56 ConsolepVerifyIoHandle,
57 ConsolepAlloc, // Not present in Win7
58 ConsolepFree, // Not present in Win7
59 ConsolepGetTitle,
60 ConsolepSetTitle,
61 ConsolepCreateScreenBuffer,
62 ConsolepInvalidateBitMapRect,
63 ConsolepVDMOperation,
64 ConsolepSetCursor,
65 ConsolepShowCursor,
66 ConsolepMenuControl,
67 ConsolepSetPalette,
68 ConsolepSetDisplayMode,
69 ConsolepRegisterVDM,
70 ConsolepGetHardwareState,
71 ConsolepSetHardwareState,
72 ConsolepGetDisplayMode,
73 ConsolepAddAlias,
74 ConsolepGetAlias,
75 ConsolepGetAliasesLength,
76 ConsolepGetAliasExesLength,
77 ConsolepGetAliases,
78 ConsolepGetAliasExes,
79 ConsolepExpungeCommandHistory,
80 ConsolepSetNumberOfCommands,
81 ConsolepGetCommandHistoryLength,
82 ConsolepGetCommandHistory,
83 ConsolepSetCommandHistoryMode, // Not present in Vista+
84 ConsolepGetCP,
85 ConsolepSetCP,
86 ConsolepSetKeyShortcuts,
87 ConsolepSetMenuClose,
88 ConsolepNotifyLastClose,
89 ConsolepGenerateCtrlEvent,
90 ConsolepGetKeyboardLayoutName,
91 ConsolepGetConsoleWindow,
92 ConsolepCharType,
93 ConsolepSetLocalEUDC,
94 ConsolepSetCursorMode,
95 ConsolepGetCursorMode,
96 ConsolepRegisterOS2,
97 ConsolepSetOS2OemFormat,
98 ConsolepGetNlsMode,
99 ConsolepSetNlsMode,
100 ConsolepRegisterConsoleIME, // Not present in Win7
101 ConsolepUnregisterConsoleIME, // Not present in Win7
102 // ConsolepQueryConsoleIME, // Added only in Vista and Win2k8, not present in Win7
103 ConsolepGetLangId,
104 ConsolepAttach, // Not present in Win7
105 ConsolepGetSelectionInfo,
106 ConsolepGetProcessList,
107
108 ConsolepGetHistory, // Added in Vista+
109 ConsolepSetHistory, // Added in Vista+
110 // ConsolepSetCurrentFont, // Added in Vista+
111 // ConsolepSetScreenBufferInfo, // Added in Vista+
112 // ConsolepClientConnect, // Added in Win7
113
114 ConsolepMaxApiNumber
115 } CONSRV_API_NUMBER, *PCONSRV_API_NUMBER;
116
117 //
118 // See http://msdn.microsoft.com/en-us/library/windows/desktop/bb773359(v=vs.85).aspx
119 //
120 typedef struct _CONSOLE_PROPERTIES
121 {
122 WORD wFillAttribute;
123 WORD wPopupFillAttribute;
124
125 //
126 // Not on MSDN, but show up in binary
127 //
128 WORD wShowWindow;
129 WORD wUnknown;
130
131 COORD dwScreenBufferSize;
132 COORD dwWindowSize;
133 COORD dwWindowOrigin;
134 DWORD nFont;
135 DWORD nInputBufferSize;
136 COORD dwFontSize;
137 UINT uFontFamily;
138 UINT uFontWeight;
139 WCHAR FaceName[LF_FACESIZE];
140 UINT uCursorSize;
141 BOOL bFullScreen;
142 BOOL bQuickEdit;
143 BOOL bInsertMode;
144 BOOL bAutoPosition;
145 UINT uHistoryBufferSize;
146 UINT uNumberOfHistoryBuffers;
147 BOOL bHistoryNoDup;
148 COLORREF ColorTable[16];
149
150 //NT_FE_CONSOLE_PROPS
151 UINT uCodePage;
152 } CONSOLE_PROPERTIES;
153
154 //
155 // To minimize code changes, some fields were put here even though they really only belong in
156 // CONSRV_API_CONNECTINFO. Do not change the ordering however, as it's required for Windows
157 // compatibility.
158 //
159 typedef struct _CONSOLE_START_INFO
160 {
161 INT IconIndex;
162 HICON IconHandle1;
163 HICON IconHandle2;
164 DWORD dwHotKey;
165 DWORD dwStartupFlags;
166 CONSOLE_PROPERTIES;
167 BOOLEAN ConsoleNeeded; // Used for GUI apps only.
168 LPTHREAD_START_ROUTINE CtrlDispatcher;
169 LPTHREAD_START_ROUTINE ImeDispatcher;
170 LPTHREAD_START_ROUTINE PropDispatcher;
171 ULONG TitleLength;
172 WCHAR ConsoleTitle[MAX_PATH + 1]; // Console title or full path to the startup shortcut
173 ULONG DesktopLength;
174 PWCHAR DesktopPath;
175 ULONG AppNameLength;
176 WCHAR AppPath[128]; // Full path of the launched app
177 ULONG IconPathLength;
178 WCHAR IconPath[MAX_PATH + 1]; // Path to the file containing the icon
179 } CONSOLE_START_INFO, *PCONSOLE_START_INFO;
180
181 typedef struct _CONSRV_API_CONNECTINFO
182 {
183 HANDLE ConsoleHandle;
184 HANDLE InputWaitHandle;
185 HANDLE InputHandle;
186 HANDLE OutputHandle;
187 HANDLE ErrorHandle;
188 HANDLE Event1;
189 HANDLE Event2;
190 /* Adapted from CONSOLE_ALLOCCONSOLE */
191 CONSOLE_START_INFO ConsoleStartInfo;
192 } CONSRV_API_CONNECTINFO, *PCONSRV_API_CONNECTINFO;
193
194 C_ASSERT(sizeof(CONSRV_API_CONNECTINFO) == 0x638);
195
196 typedef struct
197 {
198 ULONG nMaxIds;
199 ULONG nProcessIdsTotal;
200 PDWORD pProcessIds;
201 } CONSOLE_GETPROCESSLIST, *PCONSOLE_GETPROCESSLIST;
202
203 typedef struct
204 {
205 HANDLE OutputHandle;
206
207 BOOL Unicode;
208 ULONG NrCharactersToWrite;
209 ULONG NrCharactersWritten;
210
211 ULONG BufferSize;
212 PVOID Buffer;
213 } CONSOLE_WRITECONSOLE, *PCONSOLE_WRITECONSOLE;
214
215 typedef struct
216 {
217 HANDLE InputHandle;
218
219 BOOL Unicode;
220 ULONG NrCharactersToRead;
221 ULONG NrCharactersRead;
222
223 UNICODE_STRING ExeName;
224 DWORD CtrlWakeupMask;
225 DWORD ControlKeyState;
226
227 ULONG BufferSize;
228 PVOID Buffer;
229 } CONSOLE_READCONSOLE, *PCONSOLE_READCONSOLE;
230
231 typedef struct
232 {
233 PCONSOLE_START_INFO ConsoleStartInfo;
234
235 HANDLE ConsoleHandle;
236 HANDLE InputHandle;
237 HANDLE OutputHandle;
238 HANDLE ErrorHandle;
239 HANDLE InputWaitHandle;
240 LPTHREAD_START_ROUTINE CtrlDispatcher;
241 LPTHREAD_START_ROUTINE PropDispatcher;
242 } CONSOLE_ALLOCCONSOLE, *PCONSOLE_ALLOCCONSOLE;
243
244 typedef struct
245 {
246 DWORD ProcessId; // If ProcessId == ATTACH_PARENT_PROCESS == -1, then attach the current process to its parent process console.
247 HANDLE ConsoleHandle;
248 HANDLE InputHandle;
249 HANDLE OutputHandle;
250 HANDLE ErrorHandle;
251 HANDLE InputWaitHandle;
252 LPTHREAD_START_ROUTINE CtrlDispatcher;
253 LPTHREAD_START_ROUTINE PropDispatcher;
254 } CONSOLE_ATTACHCONSOLE, *PCONSOLE_ATTACHCONSOLE;
255
256 typedef struct
257 {
258 ULONG Dummy;
259 } CONSOLE_FREECONSOLE, *PCONSOLE_FREECONSOLE;
260
261 typedef struct
262 {
263 HANDLE OutputHandle;
264 CONSOLE_SCREEN_BUFFER_INFO Info;
265 } CONSOLE_GETSCREENBUFFERINFO, *PCONSOLE_GETSCREENBUFFERINFO;
266
267 typedef struct
268 {
269 HANDLE OutputHandle;
270 COORD Position;
271 } CONSOLE_SETCURSORPOSITION, *PCONSOLE_SETCURSORPOSITION;
272
273 typedef struct
274 {
275 HANDLE OutputHandle;
276 BOOL Show;
277 INT RefCount;
278 } CONSOLE_SHOWCURSOR, *PCONSOLE_SHOWCURSOR;
279
280 typedef struct
281 {
282 HANDLE OutputHandle;
283 HCURSOR hCursor;
284 } CONSOLE_SETCURSOR, *PCONSOLE_SETCURSOR;
285
286 typedef struct
287 {
288 HANDLE OutputHandle;
289 CONSOLE_CURSOR_INFO Info;
290 } CONSOLE_GETSETCURSORINFO, *PCONSOLE_GETSETCURSORINFO;
291
292 typedef struct
293 {
294 HANDLE OutputHandle;
295 WORD Attrib;
296 } CONSOLE_SETTEXTATTRIB, *PCONSOLE_SETTEXTATTRIB;
297
298 typedef struct
299 {
300 HANDLE ConsoleHandle; /* A valid input or output console handle */
301 DWORD ConsoleMode;
302 } CONSOLE_GETSETCONSOLEMODE, *PCONSOLE_GETSETCONSOLEMODE;
303
304 typedef struct
305 {
306 // HANDLE OutputHandle;
307 DWORD DisplayMode;
308 } CONSOLE_GETDISPLAYMODE, *PCONSOLE_GETDISPLAYMODE;
309
310 typedef struct
311 {
312 HANDLE OutputHandle;
313 DWORD DisplayMode;
314 COORD NewSBDim;
315 } CONSOLE_SETDISPLAYMODE, *PCONSOLE_SETDISPLAYMODE;
316
317 /*
318 * Console hardware states.
319 */
320 #define CONSOLE_HARDWARE_STATE_GDI_MANAGED 0
321 #define CONSOLE_HARDWARE_STATE_DIRECT 1
322
323 typedef struct
324 {
325 HANDLE OutputHandle;
326 DWORD State;
327 } CONSOLE_GETSETHWSTATE, *PCONSOLE_GETSETHWSTATE;
328
329
330 typedef struct
331 {
332 HANDLE OutputHandle; /* Handle to newly created screen buffer */
333 DWORD ScreenBufferType; /* Type of the screen buffer: CONSOLE_TEXTMODE_BUFFER or CONSOLE_GRAPHICS_BUFFER */
334 /*
335 * If we are creating a graphics screen buffer,
336 * this structure holds the initialization information.
337 */
338 CONSOLE_GRAPHICS_BUFFER_INFO GraphicsBufferInfo;
339
340 DWORD Access;
341 DWORD ShareMode;
342 BOOL Inheritable;
343 } CONSOLE_CREATESCREENBUFFER, *PCONSOLE_CREATESCREENBUFFER;
344
345 typedef struct
346 {
347 HANDLE OutputHandle; /* Handle to screen buffer to switch to */
348 } CONSOLE_SETACTIVESCREENBUFFER, *PCONSOLE_SETACTIVESCREENBUFFER;
349
350 typedef struct
351 {
352 HANDLE OutputHandle;
353 SMALL_RECT Region;
354 } CONSOLE_INVALIDATEDIBITS, *PCONSOLE_INVALIDATEDIBITS;
355
356 typedef struct
357 {
358 HANDLE OutputHandle;
359 HPALETTE PaletteHandle;
360 UINT Usage;
361 } CONSOLE_SETPALETTE, *PCONSOLE_SETPALETTE;
362
363 typedef struct
364 {
365 DWORD Length;
366 PWCHAR Title;
367 } CONSOLE_GETSETCONSOLETITLE, *PCONSOLE_GETSETCONSOLETITLE;
368
369 typedef struct
370 {
371 HANDLE OutputHandle;
372
373 BOOL Unicode;
374 COORD BufferSize;
375 COORD BufferCoord;
376 SMALL_RECT WriteRegion;
377 PCHAR_INFO CharInfo;
378 } CONSOLE_WRITEOUTPUT, *PCONSOLE_WRITEOUTPUT;
379
380 typedef struct
381 {
382 HANDLE InputHandle;
383 } CONSOLE_FLUSHINPUTBUFFER, *PCONSOLE_FLUSHINPUTBUFFER;
384
385 typedef struct
386 {
387 HANDLE OutputHandle;
388
389 BOOL Unicode;
390 SMALL_RECT ScrollRectangle;
391 BOOL UseClipRectangle;
392 SMALL_RECT ClipRectangle;
393 COORD DestinationOrigin;
394 CHAR_INFO Fill;
395 } CONSOLE_SCROLLSCREENBUFFER, *PCONSOLE_SCROLLSCREENBUFFER;
396
397
398 /*
399 * An attribute or a character are instances of the same entity, namely
400 * a "code" (what would be called an (ANSI) escape sequence). Therefore
401 * encode them inside the same structure.
402 */
403 typedef enum _CODE_TYPE
404 {
405 CODE_ASCII = 0x01,
406 CODE_UNICODE = 0x02,
407 CODE_ATTRIBUTE = 0x03
408 } CODE_TYPE;
409
410 typedef struct
411 {
412 HANDLE OutputHandle;
413
414 DWORD NumCodesToRead;
415 COORD ReadCoord;
416 COORD EndCoord;
417
418 DWORD CodesRead;
419
420 CODE_TYPE CodeType;
421 union
422 {
423 PVOID pCode;
424 PCHAR AsciiChar;
425 PWCHAR UnicodeChar;
426 PWORD Attribute;
427 } pCode; // Either a pointer to a character or to an attribute.
428 } CONSOLE_READOUTPUTCODE, *PCONSOLE_READOUTPUTCODE;
429
430 typedef struct
431 {
432 HANDLE OutputHandle;
433
434 ULONG BufferSize; // Seems unusued
435 WORD Length;
436 COORD Coord;
437 COORD EndCoord;
438
439 ULONG NrCharactersWritten; // Seems unusued
440
441 CODE_TYPE CodeType;
442 union
443 {
444 PVOID pCode;
445 PCHAR AsciiChar;
446 PWCHAR UnicodeChar;
447 PWORD Attribute;
448 } pCode; // Either a pointer to a character or to an attribute.
449 } CONSOLE_WRITEOUTPUTCODE, *PCONSOLE_WRITEOUTPUTCODE;
450
451 typedef struct
452 {
453 HANDLE OutputHandle;
454
455 CODE_TYPE CodeType;
456 union
457 {
458 CHAR AsciiChar;
459 WCHAR UnicodeChar;
460 WORD Attribute;
461 } Code; // Either a character or an attribute.
462
463 COORD Coord;
464 ULONG Length;
465
466 ULONG NrCharactersWritten; // FIXME: Only for chars, is it removable ?
467 } CONSOLE_FILLOUTPUTCODE, *PCONSOLE_FILLOUTPUTCODE;
468
469 typedef struct
470 {
471 HANDLE InputHandle;
472 BOOL Unicode;
473 BOOL bRead; // TRUE --> Read ; FALSE --> Peek
474
475 ULONG InputsRead;
476
477 ULONG Length;
478 PINPUT_RECORD InputRecord;
479 } CONSOLE_GETINPUT, *PCONSOLE_GETINPUT;
480
481 typedef struct
482 {
483 HANDLE OutputHandle;
484
485 BOOL Unicode;
486 COORD BufferSize;
487 COORD BufferCoord;
488 SMALL_RECT ReadRegion;
489 PCHAR_INFO CharInfo;
490 } CONSOLE_READOUTPUT, *PCONSOLE_READOUTPUT;
491
492 typedef struct
493 {
494 HANDLE InputHandle;
495 BOOL Unicode;
496 DWORD Length;
497 INPUT_RECORD* InputRecord;
498 } CONSOLE_WRITEINPUT, *PCONSOLE_WRITEINPUT;
499
500 typedef struct
501 {
502 HANDLE ConsoleHandle;
503 } CONSOLE_CLOSEHANDLE, *PCONSOLE_CLOSEHANDLE;
504
505 typedef struct
506 {
507 HANDLE ConsoleHandle;
508 } CONSOLE_VERIFYHANDLE, *PCONSOLE_VERIFYHANDLE;
509
510 typedef struct
511 {
512 HANDLE ConsoleHandle;
513 DWORD Access;
514 BOOL Inheritable;
515 DWORD Options;
516 } CONSOLE_DUPLICATEHANDLE, *PCONSOLE_DUPLICATEHANDLE;
517
518 /*
519 * Type of handles.
520 */
521 typedef enum _CONSOLE_HANDLE_TYPE
522 {
523 HANDLE_INPUT = 0x01,
524 HANDLE_OUTPUT = 0x02
525 } CONSOLE_HANDLE_TYPE;
526
527 typedef struct
528 {
529 HANDLE ConsoleHandle;
530 CONSOLE_HANDLE_TYPE HandleType;
531 DWORD Access;
532 BOOL Inheritable;
533 DWORD ShareMode;
534 } CONSOLE_OPENCONSOLE, *PCONSOLE_OPENCONSOLE;
535
536
537 typedef struct
538 {
539 HANDLE OutputHandle;
540 COORD Size;
541 } CONSOLE_GETLARGESTWINDOWSIZE, *PCONSOLE_GETLARGESTWINDOWSIZE;
542
543 typedef struct
544 {
545 HANDLE OutputHandle;
546 DWORD dwCmdIdLow;
547 DWORD dwCmdIdHigh;
548 HMENU hMenu;
549 } CONSOLE_MENUCONTROL, *PCONSOLE_MENUCONTROL;
550
551 typedef struct
552 {
553 BOOL Enable;
554 } CONSOLE_SETMENUCLOSE, *PCONSOLE_SETMENUCLOSE;
555
556 typedef struct
557 {
558 HANDLE OutputHandle;
559 BOOL Absolute;
560 SMALL_RECT WindowRect; // New console window position in the screen-buffer frame (Absolute == TRUE)
561 // or in the old window position frame (Absolute == FALSE).
562 } CONSOLE_SETWINDOWINFO, *PCONSOLE_SETWINDOWINFO;
563
564 typedef struct
565 {
566 HWND WindowHandle;
567 } CONSOLE_GETWINDOW, *PCONSOLE_GETWINDOW;
568
569 typedef struct
570 {
571 HICON WindowIcon;
572 } CONSOLE_SETICON, *PCONSOLE_SETICON;
573
574
575
576 typedef struct
577 {
578 ULONG SourceLength;
579 ULONG TargetLength; // Also used for storing the number of bytes written.
580 ULONG ExeLength;
581 LPWSTR Source;
582 LPWSTR Target;
583 LPWSTR Exe;
584 } CONSOLE_ADDGETALIAS, *PCONSOLE_ADDGETALIAS;
585
586 typedef struct
587 {
588 DWORD ExeLength;
589 DWORD AliasesBufferLength;
590 LPWSTR ExeName;
591 LPWSTR AliasesBuffer;
592 } CONSOLE_GETALLALIASES, *PCONSOLE_GETALLALIASES;
593
594 typedef struct
595 {
596 DWORD Length;
597 DWORD ExeLength;
598 LPWSTR ExeName;
599 } CONSOLE_GETALLALIASESLENGTH, *PCONSOLE_GETALLALIASESLENGTH;
600
601 typedef struct
602 {
603 DWORD Length;
604 LPWSTR ExeNames;
605 } CONSOLE_GETALIASESEXES, *PCONSOLE_GETALIASESEXES;
606
607 typedef struct
608 {
609 DWORD Length;
610 } CONSOLE_GETALIASESEXESLENGTH, *PCONSOLE_GETALIASESEXESLENGTH;
611
612
613
614 typedef struct
615 {
616 UNICODE_STRING ExeName;
617 PWCHAR History;
618 DWORD Length;
619 } CONSOLE_GETCOMMANDHISTORY, *PCONSOLE_GETCOMMANDHISTORY;
620
621 typedef struct
622 {
623 UNICODE_STRING ExeName;
624 DWORD Length;
625 } CONSOLE_GETCOMMANDHISTORYLENGTH, *PCONSOLE_GETCOMMANDHISTORYLENGTH;
626
627 typedef struct
628 {
629 UNICODE_STRING ExeName;
630 } CONSOLE_EXPUNGECOMMANDHISTORY, *PCONSOLE_EXPUNGECOMMANDHISTORY;
631
632 typedef struct
633 {
634 UNICODE_STRING ExeName;
635 DWORD NumCommands;
636 } CONSOLE_SETHISTORYNUMBERCOMMANDS, *PCONSOLE_SETHISTORYNUMBERCOMMANDS;
637
638 typedef struct
639 {
640 UINT HistoryBufferSize;
641 UINT NumberOfHistoryBuffers;
642 DWORD dwFlags;
643 } CONSOLE_GETSETHISTORYINFO, *PCONSOLE_GETSETHISTORYINFO;
644
645
646
647 typedef struct
648 {
649 DWORD Event;
650 DWORD ProcessGroup;
651 } CONSOLE_GENERATECTRLEVENT, *PCONSOLE_GENERATECTRLEVENT;
652
653 typedef struct
654 {
655 HANDLE InputHandle;
656 DWORD NumInputEvents;
657 } CONSOLE_GETNUMINPUTEVENTS, *PCONSOLE_GETNUMINPUTEVENTS;
658
659 typedef struct
660 {
661 HANDLE OutputHandle;
662 COORD Size;
663 } CONSOLE_SETSCREENBUFFERSIZE, *PCONSOLE_SETSCREENBUFFERSIZE;
664
665 typedef struct
666 {
667 CONSOLE_SELECTION_INFO Info;
668 } CONSOLE_GETSELECTIONINFO, *PCONSOLE_GETSELECTIONINFO;
669
670 typedef struct
671 {
672 BOOL InputCP; // TRUE : Input Code Page ; FALSE : Output Code Page
673 UINT CodePage;
674 } CONSOLE_GETSETINPUTOUTPUTCP, *PCONSOLE_GETSETINPUTOUTPUTCP;
675
676 typedef struct _CONSOLE_API_MESSAGE
677 {
678 PORT_MESSAGE Header;
679
680 PCSR_CAPTURE_BUFFER CsrCaptureData;
681 CSR_API_NUMBER ApiNumber;
682 NTSTATUS Status;
683 ULONG Reserved;
684 union
685 {
686 /* Console initialization and uninitialization */
687 CONSOLE_ALLOCCONSOLE AllocConsoleRequest;
688 CONSOLE_ATTACHCONSOLE AttachConsoleRequest;
689 CONSOLE_FREECONSOLE FreeConsoleRequest;
690
691 /* Process list */
692 CONSOLE_GETPROCESSLIST GetProcessListRequest;
693
694 /* Handles */
695 CONSOLE_OPENCONSOLE OpenConsoleRequest;
696 CONSOLE_CLOSEHANDLE CloseHandleRequest;
697 CONSOLE_VERIFYHANDLE VerifyHandleRequest;
698 CONSOLE_DUPLICATEHANDLE DuplicateHandleRequest;
699
700 /* Cursor */
701 CONSOLE_SHOWCURSOR ShowCursorRequest;
702 CONSOLE_SETCURSOR SetCursorRequest;
703 CONSOLE_GETSETCURSORINFO CursorInfoRequest;
704 CONSOLE_SETCURSORPOSITION SetCursorPositionRequest;
705
706 /* Screen-buffer */
707 CONSOLE_CREATESCREENBUFFER CreateScreenBufferRequest;
708 CONSOLE_SETACTIVESCREENBUFFER SetScreenBufferRequest;
709 CONSOLE_GETSCREENBUFFERINFO ScreenBufferInfoRequest;
710 CONSOLE_SETSCREENBUFFERSIZE SetScreenBufferSizeRequest;
711 CONSOLE_SCROLLSCREENBUFFER ScrollScreenBufferRequest;
712
713 CONSOLE_GETSELECTIONINFO GetSelectionInfoRequest;
714 CONSOLE_FLUSHINPUTBUFFER FlushInputBufferRequest;
715
716 /* Console mode */
717 CONSOLE_GETSETCONSOLEMODE ConsoleModeRequest;
718 CONSOLE_GETDISPLAYMODE GetDisplayModeRequest;
719 CONSOLE_SETDISPLAYMODE SetDisplayModeRequest;
720 CONSOLE_GETSETHWSTATE HardwareStateRequest;
721
722 /* Console window */
723 CONSOLE_INVALIDATEDIBITS InvalidateDIBitsRequest;
724 CONSOLE_SETPALETTE SetPaletteRequest;
725 CONSOLE_GETSETCONSOLETITLE TitleRequest;
726 CONSOLE_GETLARGESTWINDOWSIZE GetLargestWindowSizeRequest;
727 CONSOLE_MENUCONTROL MenuControlRequest;
728 CONSOLE_SETMENUCLOSE SetMenuCloseRequest;
729 CONSOLE_SETWINDOWINFO SetWindowInfoRequest;
730 CONSOLE_GETWINDOW GetWindowRequest;
731 CONSOLE_SETICON SetIconRequest;
732
733 /* Read */
734 CONSOLE_READCONSOLE ReadConsoleRequest; // SrvReadConsole / ReadConsole
735 CONSOLE_GETINPUT GetInputRequest; // SrvGetConsoleInput / PeekConsoleInput & ReadConsoleInput
736 CONSOLE_READOUTPUT ReadOutputRequest; // SrvReadConsoleOutput / ReadConsoleOutput
737 CONSOLE_READOUTPUTCODE ReadOutputCodeRequest; // SrvReadConsoleOutputString / ReadConsoleOutputAttribute & ReadConsoleOutputCharacter
738
739 /* Write */
740 CONSOLE_WRITECONSOLE WriteConsoleRequest; // SrvWriteConsole / WriteConsole
741 CONSOLE_WRITEINPUT WriteInputRequest;
742 CONSOLE_WRITEOUTPUT WriteOutputRequest;
743 CONSOLE_WRITEOUTPUTCODE WriteOutputCodeRequest;
744
745 CONSOLE_FILLOUTPUTCODE FillOutputRequest;
746 CONSOLE_SETTEXTATTRIB SetTextAttribRequest;
747
748 /* Aliases */
749 CONSOLE_ADDGETALIAS ConsoleAliasRequest;
750 CONSOLE_GETALLALIASES GetAllAliasesRequest;
751 CONSOLE_GETALLALIASESLENGTH GetAllAliasesLengthRequest;
752 CONSOLE_GETALIASESEXES GetAliasesExesRequest;
753 CONSOLE_GETALIASESEXESLENGTH GetAliasesExesLengthRequest;
754
755 /* History */
756 CONSOLE_GETCOMMANDHISTORY GetCommandHistoryRequest;
757 CONSOLE_GETCOMMANDHISTORYLENGTH GetCommandHistoryLengthRequest;
758 CONSOLE_EXPUNGECOMMANDHISTORY ExpungeCommandHistoryRequest;
759 CONSOLE_SETHISTORYNUMBERCOMMANDS SetHistoryNumberCommandsRequest;
760 CONSOLE_GETSETHISTORYINFO HistoryInfoRequest;
761
762 CONSOLE_GENERATECTRLEVENT GenerateCtrlEventRequest;
763 CONSOLE_GETNUMINPUTEVENTS GetNumInputEventsRequest;
764
765 /* Input and Output Code Pages */
766 CONSOLE_GETSETINPUTOUTPUTCP ConsoleCPRequest;
767 } Data;
768 } CONSOLE_API_MESSAGE, *PCONSOLE_API_MESSAGE;
769
770 // Check that a CONSOLE_API_MESSAGE can hold in a CSR_API_MESSAGE.
771 CHECK_API_MSG_SIZE(CONSOLE_API_MESSAGE);
772
773 #endif // _CONMSG_H
774
775 /* EOF */