[WIN32SS::WINSRV] Improve the FILE header section. Brought to you by Adam Stachowicz...
[reactos.git] / reactos / win32ss / user / winsrv / consrv / consrv.h
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 /* PSDK/NDK Headers */
16 #define WIN32_NO_STATUS
17 #define _INC_WINDOWS
18 #define COM_NO_WINDOWS_H
19
20 #include <winnls.h>
21 #include <wincon.h>
22
23 #define NTOS_MODE_USER
24 #include <ndk/mmfuncs.h>
25
26 /* CONSOLE Headers */
27 #include <win/conmsg.h>
28
29 /* Heap Helpers */
30 #include "heap.h"
31
32 /* Globals */
33 extern HINSTANCE ConSrvDllInstance;
34
35 #define ConsoleGetPerProcessData(Process) \
36 ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
37
38 typedef struct _CONSOLE_PROCESS_DATA
39 {
40 LIST_ENTRY ConsoleLink;
41 PCSR_PROCESS Process; // Process owning this structure.
42
43 HANDLE ConsoleHandle;
44 BOOLEAN ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise.
45
46 RTL_CRITICAL_SECTION HandleTableLock;
47 ULONG HandleTableSize;
48 struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table
49
50 LPTHREAD_START_ROUTINE CtrlRoutine;
51 LPTHREAD_START_ROUTINE PropRoutine; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS.
52 // LPTHREAD_START_ROUTINE ImeRoutine;
53 } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA;
54
55
56 // Helper for code refactoring
57 // #define USE_NEW_CONSOLE_WAY
58
59 #ifndef USE_NEW_CONSOLE_WAY
60 #include "include/conio.h"
61 #else
62 #include "include/conio_winsrv.h"
63 #endif
64
65 #include "include/console.h"
66 #include "include/settings.h"
67 #include "include/term.h"
68 #include "console.h"
69 #include "conoutput.h"
70 #include "handle.h"
71 #include "lineinput.h"
72
73 /* shutdown.c */
74 ULONG
75 NTAPI
76 ConsoleClientShutdown(IN PCSR_PROCESS CsrProcess,
77 IN ULONG Flags,
78 IN BOOLEAN FirstPhase);
79
80 #endif /* __CONSRV_H__ */