kernel32: Remove no longer needed CONSOLE_Init.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-12-01 17:25:41 +01:00 committed by Alexandre Julliard
parent 826a9615e4
commit 141e53bacc
3 changed files with 0 additions and 41 deletions

View file

@ -265,31 +265,6 @@ DWORD WINAPI GetConsoleProcessList(LPDWORD processlist, DWORD processcount)
return 0;
}
BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params)
{
/* convert value from server:
* + INVALID_HANDLE_VALUE => TEB: 0, STARTUPINFO: INVALID_HANDLE_VALUE
* + 0 => TEB: 0, STARTUPINFO: INVALID_HANDLE_VALUE
* + console handle needs to be mapped
*/
if (!params->hStdInput || params->hStdInput == INVALID_HANDLE_VALUE)
params->hStdInput = 0;
else if (!is_console_handle(params->hStdInput) && VerifyConsoleIoHandle(params->hStdInput))
params->hStdInput = console_handle_map(params->hStdInput);
if (!params->hStdOutput || params->hStdOutput == INVALID_HANDLE_VALUE)
params->hStdOutput = 0;
else if (!is_console_handle(params->hStdOutput) && VerifyConsoleIoHandle(params->hStdOutput))
params->hStdOutput = console_handle_map(params->hStdOutput);
if (!params->hStdError || params->hStdError == INVALID_HANDLE_VALUE)
params->hStdError = 0;
else if (!is_console_handle(params->hStdError) && VerifyConsoleIoHandle(params->hStdError))
params->hStdError = console_handle_map(params->hStdError);
return TRUE;
}
/* Undocumented, called by native doskey.exe */
/* FIXME: Should use CONSOLE_GetHistory() above for full implementation */
DWORD WINAPI GetConsoleCommandHistoryA(DWORD unknown1, DWORD unknown2, DWORD unknown3)

View file

@ -120,15 +120,11 @@ static void copy_startup_info(void)
*/
static BOOL process_attach( HMODULE module )
{
RTL_USER_PROCESS_PARAMETERS *params = NtCurrentTeb()->Peb->ProcessParameters;
kernel32_handle = module;
RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter );
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
CONSOLE_Init(params);
copy_startup_info();
#ifdef __i386__

View file

@ -22,18 +22,6 @@
#define __WINE_KERNEL_PRIVATE_H
NTSTATUS WINAPI BaseGetNamedObjectDirectory( HANDLE *dir );
BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params) DECLSPEC_HIDDEN;
static inline BOOL is_console_handle(HANDLE h)
{
return h != INVALID_HANDLE_VALUE && ((UINT_PTR)h & 3) == 3;
}
/* map a real wineserver handle onto a kernel32 console handle */
static inline HANDLE console_handle_map(HANDLE h)
{
return h != INVALID_HANDLE_VALUE ? (HANDLE)((UINT_PTR)h ^ 3) : INVALID_HANDLE_VALUE;
}
static inline BOOL set_ntstatus( NTSTATUS status )
{