[CONSRV-WINSRV]
[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 #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/exfuncs.h>
28 #include <ndk/iofuncs.h>
29 #include <ndk/mmfuncs.h>
30 #include <ndk/obfuncs.h>
31 #include <ndk/psfuncs.h>
32 #include <ndk/setypes.h>
33 #include <ndk/rtlfuncs.h>
34
35 /* Public Win32K Headers */
36 #include <ntuser.h>
37
38 /* PSEH for SEH Support */
39 #include <pseh/pseh2.h>
40
41 /* CSRSS Header */
42 #include <csr/csrsrv.h>
43
44 /* CONSOLE Headers */
45 #include <win/console.h>
46 #include <win/conmsg.h>
47
48
49 /* Heap Helpers */
50 #include "heap.h"
51
52 /* Globals */
53 extern HINSTANCE ConSrvDllInstance;
54
55 #define ConsoleGetPerProcessData(Process) \
56 ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
57
58 typedef struct _CONSOLE_PROCESS_DATA
59 {
60 LIST_ENTRY ConsoleLink;
61 PCSR_PROCESS Process; // Process owning this structure.
62 HANDLE ConsoleEvent;
63
64 HANDLE ConsoleHandle;
65 HANDLE ParentConsoleHandle;
66
67 BOOL ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise.
68
69 RTL_CRITICAL_SECTION HandleTableLock;
70 ULONG HandleTableSize;
71 struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table
72
73 LPTHREAD_START_ROUTINE CtrlDispatcher;
74 LPTHREAD_START_ROUTINE PropDispatcher; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS.
75 } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA;
76
77 #endif // __CONSRV_H__
78
79 /* EOF */