xref: /reactos/win32ss/user/winsrv/consrv/consrv.h (revision 2b64d453)
1c2c66affSColin Finck /*
2c2c66affSColin Finck  * COPYRIGHT:       See COPYING in the top level directory
3c2c66affSColin Finck  * PROJECT:         ReactOS Console Server DLL
4c2c66affSColin Finck  * FILE:            win32ss/user/winsrv/consrv/consrv.h
5c2c66affSColin Finck  * PURPOSE:         Main header - Definitions
6c2c66affSColin Finck  * PROGRAMMERS:     Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7c2c66affSColin Finck  */
8c2c66affSColin Finck 
9c2c66affSColin Finck #ifndef __CONSRV_H__
10c2c66affSColin Finck #define __CONSRV_H__
11c2c66affSColin Finck 
12c2c66affSColin Finck /* Main header */
13c2c66affSColin Finck #include "../winsrv.h"
14c2c66affSColin Finck 
15c2c66affSColin Finck #include <strsafe.h>
16c2c66affSColin Finck 
17c2c66affSColin Finck /* PSDK/NDK Headers */
18c2c66affSColin Finck #define WIN32_NO_STATUS
19c2c66affSColin Finck #define _INC_WINDOWS
20c2c66affSColin Finck #define COM_NO_WINDOWS_H
21c2c66affSColin Finck 
22c2c66affSColin Finck #include <winnls.h>
23c2c66affSColin Finck #include <wincon.h>
24c2c66affSColin Finck 
25c2c66affSColin Finck #define NTOS_MODE_USER
26c2c66affSColin Finck #include <ndk/mmfuncs.h>
27c2c66affSColin Finck 
28c2c66affSColin Finck /* CONSOLE Headers */
29c2c66affSColin Finck #include <win/conmsg.h>
30c2c66affSColin Finck 
31c2c66affSColin Finck /* Heap Helpers */
32c2c66affSColin Finck #include "heap.h"
33c2c66affSColin Finck 
34c2c66affSColin Finck /* Globals */
35c2c66affSColin Finck extern HINSTANCE ConSrvDllInstance;
36c2c66affSColin Finck 
37c2c66affSColin Finck #define ConsoleGetPerProcessData(Process)   \
38c2c66affSColin Finck     ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
39c2c66affSColin Finck 
40c2c66affSColin Finck typedef struct _CONSOLE_PROCESS_DATA
41c2c66affSColin Finck {
42c2c66affSColin Finck     LIST_ENTRY ConsoleLink;
43c2c66affSColin Finck     PCSR_PROCESS Process;   // Process owning this structure.
44c2c66affSColin Finck 
45c2c66affSColin Finck     HANDLE ConsoleHandle;
46c2c66affSColin Finck     BOOLEAN ConsoleApp;     // TRUE if it is a CUI app, FALSE otherwise.
47c2c66affSColin Finck 
48c2c66affSColin Finck     RTL_CRITICAL_SECTION HandleTableLock;
49c2c66affSColin Finck     ULONG HandleTableSize;
50c2c66affSColin Finck     struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table
51c2c66affSColin Finck 
52c2c66affSColin Finck     LPTHREAD_START_ROUTINE CtrlRoutine;
53c2c66affSColin Finck     LPTHREAD_START_ROUTINE PropRoutine; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS.
54c2c66affSColin Finck     // LPTHREAD_START_ROUTINE ImeRoutine;
55c2c66affSColin Finck } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA;
56c2c66affSColin Finck 
57c2c66affSColin Finck #include "include/conio.h"
58c2c66affSColin Finck #include "include/conio_winsrv.h"
59c2c66affSColin Finck 
6092611107SHermès Bélusca-Maïto #include "api.h" // For the CON_API_* macros.
61c2c66affSColin Finck #include "include/console.h"
62c2c66affSColin Finck #include "include/settings.h"
63c2c66affSColin Finck #include "include/term.h"
64c2c66affSColin Finck #include "console.h"
65*2b64d453SHermès Bélusca-Maïto #include "coninput.h"
66c2c66affSColin Finck #include "conoutput.h"
67c2c66affSColin Finck #include "handle.h"
68c2c66affSColin Finck #include "lineinput.h"
69c2c66affSColin Finck 
70c2c66affSColin Finck /* shutdown.c */
71c2c66affSColin Finck ULONG
72c2c66affSColin Finck NTAPI
73c2c66affSColin Finck ConsoleClientShutdown(IN PCSR_PROCESS CsrProcess,
74c2c66affSColin Finck                       IN ULONG Flags,
75c2c66affSColin Finck                       IN BOOLEAN FirstPhase);
76c2c66affSColin Finck 
77c2c66affSColin Finck #endif /* __CONSRV_H__ */
78