reactos/dll/win32/kernel32/include/console.h
Hermès Bélusca-Maïto 3e44a5d71c
[KERNEL32][CONSRV] Retrieve the best-suited language ID corresponding to the active console output code page. (#4301)
CORE-17601, CORE-17803
Replaces PR #4281.

Implement SrvGetConsoleLangId() (server-side) and set the new current
thread's locale after connecting to a console, or changing its output
code page.

Based on API tracing on Windows 2003, as well as on comments and code
gathered from: https://github.com/microsoft/terminal

Tests results are listed in PR #4301.
2022-02-08 15:58:02 +01:00

102 lines
2.4 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS System Libraries
* FILE: dll/win32/kernel32/include/console.h
* PURPOSE: Console API Client Definitions
* PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
*/
#pragma once
/* CONSTANTS ******************************************************************/
#define HANDLE_DETACHED_PROCESS (HANDLE)-1
#define HANDLE_CREATE_NEW_CONSOLE (HANDLE)-2
#define HANDLE_CREATE_NO_WINDOW (HANDLE)-3
/* FUNCTION PROTOTYPES ********************************************************/
BOOLEAN
WINAPI
ConDllInitialize(IN ULONG Reason,
IN PWSTR SessionDir);
VOID
InitializeCtrlHandling(VOID);
DWORD
WINAPI
ConsoleControlDispatcher(IN LPVOID lpThreadParameter);
DWORD
WINAPI
PropDialogHandler(IN LPVOID lpThreadParameter);
HANDLE WINAPI
DuplicateConsoleHandle(HANDLE hConsole,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwOptions);
BOOL WINAPI
GetConsoleHandleInformation(IN HANDLE hHandle,
OUT LPDWORD lpdwFlags);
BOOL WINAPI
SetConsoleHandleInformation(IN HANDLE hHandle,
IN DWORD dwMask,
IN DWORD dwFlags);
BOOL WINAPI
VerifyConsoleIoHandle(HANDLE Handle);
BOOL WINAPI
CloseConsoleHandle(HANDLE Handle);
HANDLE WINAPI
GetConsoleInputWaitHandle(VOID);
HANDLE
TranslateStdHandle(HANDLE hHandle);
VOID
SetTEBLangID(VOID);
VOID
SetUpConsoleInfo(IN BOOLEAN CaptureTitle,
IN OUT LPDWORD pTitleLength,
IN OUT LPWSTR* lpTitle OPTIONAL,
IN OUT LPDWORD pDesktopLength,
IN OUT LPWSTR* lpDesktop OPTIONAL,
IN OUT PCONSOLE_START_INFO ConsoleStartInfo);
VOID
SetUpHandles(IN PCONSOLE_START_INFO ConsoleStartInfo);
VOID
InitExeName(VOID);
VOID
SetUpAppName(IN BOOLEAN CaptureStrings,
IN OUT LPDWORD CurDirLength,
IN OUT LPWSTR* CurDir,
IN OUT LPDWORD AppNameLength,
IN OUT LPWSTR* AppName);
USHORT
GetCurrentExeName(OUT PWCHAR ExeName,
IN USHORT BufferSize);
LPCWSTR
IntCheckForConsoleFileName(IN LPCWSTR pszName,
IN DWORD dwDesiredAccess);
HANDLE WINAPI
OpenConsoleW(LPCWSTR wsName,
DWORD dwDesiredAccess,
BOOL bInheritHandle,
DWORD dwShareMode);
/* EOF */