xref: /reactos/dll/win32/kernel32/include/console.h (revision a9feb191)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS System Libraries
4  * FILE:            dll/win32/kernel32/include/console.h
5  * PURPOSE:         Console API Client Definitions
6  * PROGRAMMERS:     Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7  */
8 
9 #pragma once
10 
11 /* CONSTANTS ******************************************************************/
12 
13 #define HANDLE_DETACHED_PROCESS     (HANDLE)-1
14 #define HANDLE_CREATE_NEW_CONSOLE   (HANDLE)-2
15 #define HANDLE_CREATE_NO_WINDOW     (HANDLE)-3
16 
17 // Enable (and then get rid of) this define when support for
18 // console initialization handles is implemented in CONSRV.
19 // #define USE_CONSOLE_INIT_HANDLES
20 
21 
22 /* FUNCTION PROTOTYPES ********************************************************/
23 
24 BOOLEAN
25 WINAPI
26 ConDllInitialize(IN ULONG Reason,
27                  IN PWSTR SessionDir);
28 
29 VOID
30 WINAPI
31 BasepUninitConsole(VOID);
32 
33 VOID
34 InitializeCtrlHandling(VOID);
35 
36 DWORD
37 WINAPI
38 ConsoleControlDispatcher(IN LPVOID lpThreadParameter);
39 
40 DWORD
41 WINAPI
42 PropDialogHandler(IN LPVOID lpThreadParameter);
43 
44 HANDLE WINAPI
45 DuplicateConsoleHandle(HANDLE hConsole,
46                        DWORD  dwDesiredAccess,
47                        BOOL   bInheritHandle,
48                        DWORD  dwOptions);
49 
50 BOOL WINAPI
51 GetConsoleHandleInformation(IN HANDLE hHandle,
52                             OUT LPDWORD lpdwFlags);
53 
54 BOOL WINAPI
55 SetConsoleHandleInformation(IN HANDLE hHandle,
56                             IN DWORD dwMask,
57                             IN DWORD dwFlags);
58 
59 BOOL WINAPI
60 VerifyConsoleIoHandle(HANDLE Handle);
61 
62 BOOL WINAPI
63 CloseConsoleHandle(HANDLE Handle);
64 
65 HANDLE WINAPI
66 GetConsoleInputWaitHandle(VOID);
67 
68 HANDLE
69 TranslateStdHandle(HANDLE hHandle);
70 
71 #define SetTEBLangID(p) (p)
72 
73 VOID
74 SetUpConsoleInfo(IN BOOLEAN CaptureTitle,
75                  IN OUT LPDWORD pTitleLength,
76                  IN OUT LPWSTR* lpTitle OPTIONAL,
77                  IN OUT LPDWORD pDesktopLength,
78                  IN OUT LPWSTR* lpDesktop OPTIONAL,
79                  IN OUT PCONSOLE_START_INFO ConsoleStartInfo);
80 
81 VOID
82 SetUpHandles(IN PCONSOLE_START_INFO ConsoleStartInfo);
83 
84 VOID
85 InitExeName(VOID);
86 
87 VOID
88 SetUpAppName(IN BOOLEAN CaptureStrings,
89              IN OUT LPDWORD CurDirLength,
90              IN OUT LPWSTR* CurDir,
91              IN OUT LPDWORD AppNameLength,
92              IN OUT LPWSTR* AppName);
93 
94 USHORT
95 GetCurrentExeName(OUT PWCHAR ExeName,
96                   IN USHORT BufferSize);
97 
98 LPCWSTR
99 IntCheckForConsoleFileName(IN LPCWSTR pszName,
100                            IN DWORD dwDesiredAccess);
101 
102 HANDLE WINAPI
103 OpenConsoleW(LPCWSTR wsName,
104              DWORD   dwDesiredAccess,
105              BOOL    bInheritHandle,
106              DWORD   dwShareMode);
107 
108 /* EOF */
109