xref: /reactos/win32ss/user/winsrv/consrv/console.h (revision d2c71d76)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS Console Server DLL
4  * FILE:            win32ss/user/winsrv/consrv/console.h
5  * PURPOSE:         Console Initialization Functions
6  * PROGRAMMERS:     Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7  */
8 
9 #pragma once
10 
11 typedef struct _CONSOLE_INIT_INFO
12 {
13     PCONSOLE_START_INFO ConsoleStartInfo;
14     BOOLEAN IsWindowVisible;
15 
16     ULONG  TitleLength;
17     PWCHAR ConsoleTitle;
18     ULONG  DesktopLength;
19     PWCHAR Desktop;
20     ULONG  AppNameLength;
21     PWCHAR AppName;
22     ULONG  CurDirLength;
23     PWCHAR CurDir;
24 } CONSOLE_INIT_INFO, *PCONSOLE_INIT_INFO;
25 
26 VOID NTAPI
27 ConSrvInitConsoleSupport(VOID);
28 
29 NTSTATUS NTAPI
30 ConSrvInitConsole(OUT PHANDLE NewConsoleHandle,
31                   OUT struct _CONSRV_CONSOLE** /* PCONSRV_CONSOLE* */ NewConsole,
32                   IN OUT PCONSOLE_INIT_INFO ConsoleInitInfo,
33                   IN PCSR_PROCESS ConsoleLeaderProcess);
34 VOID NTAPI ConSrvDeleteConsole(struct _CONSRV_CONSOLE* /* PCONSRV_CONSOLE */ Console);
35 
36 NTSTATUS
37 ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData,
38                  OUT struct _CONSRV_CONSOLE** /* PCONSRV_CONSOLE* */ Console,
39                  IN BOOLEAN LockConsole);
40 VOID
41 ConSrvReleaseConsole(IN struct _CONSRV_CONSOLE* /* PCONSRV_CONSOLE */ Console,
42                      IN BOOLEAN IsConsoleLocked);
43 
44 
45 BOOLEAN NTAPI
46 ConSrvValidateConsole(OUT struct _CONSRV_CONSOLE** /* PCONSRV_CONSOLE* */ Console,
47                       IN HANDLE ConsoleHandle,
48                       IN CONSOLE_STATE ExpectedState,
49                       IN BOOLEAN LockConsole);
50 
51 NTSTATUS
52 ConSrvConsoleCtrlEventTimeout(IN ULONG CtrlEvent,
53                               IN PCONSOLE_PROCESS_DATA ProcessData,
54                               IN ULONG Timeout);
55