kernel32: Import FreeConsole from kernelbase.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4031265f69
commit
99e6bab3ed
|
@ -425,7 +425,7 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R
|
|||
if ((fd = get_console_bare_fd(handle)) != -1)
|
||||
{
|
||||
put_console_into_raw_mode(fd);
|
||||
if (WaitForSingleObject(GetConsoleInputWaitHandle(), 0) != WAIT_OBJECT_0)
|
||||
if (WaitForSingleObject(handle, 0) != WAIT_OBJECT_0)
|
||||
{
|
||||
ret = bare_console_fetch_input(handle, fd, timeout);
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R
|
|||
{
|
||||
if (!VerifyConsoleIoHandle(handle)) return rci_error;
|
||||
|
||||
if (WaitForSingleObject(GetConsoleInputWaitHandle(), timeout) != WAIT_OBJECT_0)
|
||||
if (WaitForSingleObject(handle, timeout) != WAIT_OBJECT_0)
|
||||
return rci_timeout;
|
||||
}
|
||||
|
||||
|
@ -531,24 +531,6 @@ DWORD WINAPI GetConsoleTitleA(LPSTR title, DWORD size)
|
|||
static WCHAR* S_EditString /* = NULL */;
|
||||
static unsigned S_EditStrPos /* = 0 */;
|
||||
|
||||
/***********************************************************************
|
||||
* FreeConsole (KERNEL32.@)
|
||||
*/
|
||||
BOOL WINAPI FreeConsole(VOID)
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
/* invalidate local copy of input event handle */
|
||||
console_wait_event = 0;
|
||||
|
||||
SERVER_START_REQ(free_console)
|
||||
{
|
||||
ret = !wine_server_call_err( req );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* start_console_renderer
|
||||
*
|
||||
|
|
|
@ -524,7 +524,7 @@
|
|||
@ stdcall -import FoldStringW(long wstr long ptr long)
|
||||
@ stdcall -import FormatMessageA(long ptr long long ptr long ptr)
|
||||
@ stdcall -import FormatMessageW(long ptr long long ptr long ptr)
|
||||
@ stdcall FreeConsole()
|
||||
@ stdcall -import FreeConsole()
|
||||
@ stdcall -import FreeEnvironmentStringsA(ptr)
|
||||
@ stdcall -import FreeEnvironmentStringsW(ptr)
|
||||
@ stub -i386 FreeLSCallback
|
||||
|
|
|
@ -85,24 +85,6 @@ static BOOL get_open_object_attributes( OBJECT_ATTRIBUTES *attr, UNICODE_STRING
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static HANDLE normalize_handle_if_console(HANDLE handle)
|
||||
{
|
||||
if ((handle == (HANDLE)STD_INPUT_HANDLE) ||
|
||||
(handle == (HANDLE)STD_OUTPUT_HANDLE) ||
|
||||
(handle == (HANDLE)STD_ERROR_HANDLE))
|
||||
handle = GetStdHandle( HandleToULong(handle) );
|
||||
|
||||
/* yes, even screen buffer console handles are waitable, and are
|
||||
* handled as a handle to the console itself !!
|
||||
*/
|
||||
if (is_console_handle(handle))
|
||||
{
|
||||
if (VerifyConsoleIoHandle(handle))
|
||||
handle = GetConsoleInputWaitHandle();
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GetTickCount64 (KERNEL32.@)
|
||||
*/
|
||||
|
@ -135,10 +117,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
|
|||
BOOL WINAPI RegisterWaitForSingleObject( HANDLE *wait, HANDLE object, WAITORTIMERCALLBACK callback,
|
||||
void *context, ULONG timeout, ULONG flags )
|
||||
{
|
||||
TRACE( "%p %p %p %p %d %d\n", wait, object, callback, context, timeout, flags );
|
||||
|
||||
object = normalize_handle_if_console( object );
|
||||
return set_ntstatus( RtlRegisterWait( wait, object, callback, context, timeout, flags ));
|
||||
return (*wait = RegisterWaitForSingleObjectEx( object, callback, context, timeout, flags)) != NULL;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue