09b87fc81f5b5630a1701591422c0c1158722e63
[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 /* PSDK/NDK Headers */
13 #include <stdarg.h>
14 #define WIN32_NO_STATUS
15 #define _INC_WINDOWS
16 #define COM_NO_WINDOWS_H
17 #include <windef.h>
18 #include <winbase.h>
19 #include <winnls.h>
20 #include <winreg.h>
21 #include <wincon.h>
22 #include <winuser.h>
23 #define NTOS_MODE_USER
24 #include <ndk/exfuncs.h>
25 #include <ndk/mmfuncs.h>
26 #include <ndk/obfuncs.h>
27 #include <ndk/rtlfuncs.h>
28
29 /* Public Win32K Headers */
30 #include <ntuser.h>
31
32 /* PSEH for SEH Support */
33 #include <pseh/pseh2.h>
34
35 /* CSRSS Header */
36 #include <csr/csrsrv.h>
37
38 /* CONSOLE Headers */
39 #include <win/conmsg.h>
40
41 /* Heap Helpers */
42 #include "heap.h"
43
44 /* Globals */
45 extern HINSTANCE ConSrvDllInstance;
46
47 #define ConsoleGetPerProcessData(Process) \
48 ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
49
50 typedef struct _CONSOLE_PROCESS_DATA
51 {
52 LIST_ENTRY ConsoleLink;
53 PCSR_PROCESS Process; // Process owning this structure.
54
55 HANDLE ConsoleHandle;
56 HANDLE InputWaitHandle;
57
58 BOOLEAN ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise.
59
60 RTL_CRITICAL_SECTION HandleTableLock;
61 ULONG HandleTableSize;
62 struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table
63
64 LPTHREAD_START_ROUTINE CtrlRoutine;
65 LPTHREAD_START_ROUTINE PropRoutine; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS.
66 // LPTHREAD_START_ROUTINE ImeRoutine;
67 } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA;
68
69
70 // Helper for code refactoring
71 // #define USE_NEW_CONSOLE_WAY
72
73 #ifndef USE_NEW_CONSOLE_WAY
74 #include "include/conio.h"
75 #else
76 #include "include/conio_winsrv.h"
77 #endif
78
79 #include "include/console.h"
80 #include "include/settings.h"
81 #include "include/term.h"
82 #include "console.h"
83 #include "conoutput.h"
84 #include "handle.h"
85 #include "lineinput.h"
86
87 #endif /* __CONSRV_H__ */