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