ec9b9aa3fc2ecdc7b655f5142262b30e5e4cb466
[reactos.git] / reactos / win32ss / user / consrv / consrv.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: win32ss/user/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 #pragma once
13
14 /* PSDK/NDK Headers */
15 #include <stdarg.h>
16 #define WIN32_NO_STATUS
17 #define _INC_WINDOWS
18 #define COM_NO_WINDOWS_H
19 #include <windef.h>
20 #include <winbase.h>
21 #include <wingdi.h>
22 #include <winnls.h>
23 #include <winreg.h>
24 #include <wincon.h>
25 #include <winuser.h>
26 #define NTOS_MODE_USER
27 #include <ndk/iofuncs.h>
28 #include <ndk/mmfuncs.h>
29 #include <ndk/obfuncs.h>
30 #include <ndk/psfuncs.h>
31 #include <ndk/setypes.h>
32 #include <ndk/rtlfuncs.h>
33
34 /* Public Win32K Headers */
35 #include <ntuser.h>
36
37 /* PSEH for SEH Support */
38 #include <pseh/pseh2.h>
39
40 /* CSRSS Header */
41 #include <csr/csrsrv.h>
42
43 /* CONSOLE Headers */
44 #include <win/console.h>
45 #include <win/conmsg.h>
46
47
48 /* Heap Helpers */
49 #include "heap.h"
50
51 /* Globals */
52 extern HINSTANCE ConSrvDllInstance;
53
54 #define ConsoleGetPerProcessData(Process) \
55 ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
56
57 typedef struct _CONSOLE_PROCESS_DATA
58 {
59 LIST_ENTRY ConsoleLink;
60 PCSR_PROCESS Process; // Process owning this structure.
61 HANDLE ConsoleEvent;
62 struct _CONSOLE* /* PCONSOLE */ Console;
63 struct _CONSOLE* /* PCONSOLE */ ParentConsole;
64
65 BOOL ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise.
66
67 RTL_CRITICAL_SECTION HandleTableLock;
68 ULONG HandleTableSize;
69 struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table
70
71 LPTHREAD_START_ROUTINE CtrlDispatcher;
72 LPTHREAD_START_ROUTINE PropDispatcher; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS.
73 } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA;
74
75 #endif // __CONSRV_H__
76
77 /* EOF */