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