From 6f5c254e8860f1a2721df32ae234f7f720cf4655 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Tue, 1 Oct 2013 23:17:34 +1000 Subject: csbix-kernel32 --- dlls/kernel32/console.c | 48 +++++++++++++++++++++++++++++++++++++++++++ dlls/kernel32/kernel32.spec | 1 + 2 files changed, 49 insertions(+) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 9f2f528..66bbcef 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -2153,6 +2153,54 @@ BOOL WINAPI GetConsoleScreenBufferInfo(HANDLE hConsoleOutput, LPCONSOLE_SCREEN_B return ret; } +/*********************************************************************** + * GetConsoleScreenBufferInfoEx (KERNEL32.@) + */ +BOOL WINAPI GetConsoleScreenBufferInfoEx(HANDLE hConsoleOutput, LPCONSOLE_SCREEN_BUFFER_INFOEX csbix) +{ + OSVERSIONINFOW osvi; + CONSOLE_SCREEN_BUFFER_INFO csbi; + BOOL ret; + int i; + + /* Only for Windows Vista or later */ + ZeroMemory(&osvi, sizeof(OSVERSIONINFOW)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); + GetVersionExW(&osvi); + if (osvi.dwMajorVersion < 6) return FALSE; + + if (csbix->cbSize != sizeof(CONSOLE_SCREEN_BUFFER_INFOEX)) return FALSE; + + GetConsoleScreenBufferInfo(hConsoleOutput, &csbi); + csbix->dwSize.X = csbi.dwSize.X; + csbix->dwSize.Y = csbi.dwSize.Y; + csbix->dwCursorPosition.X = csbi.dwCursorPosition.X; + csbix->dwCursorPosition.Y = csbi.dwCursorPosition.Y; + csbix->wAttributes = csbi.wAttributes; + csbix->srWindow.Left = csbi.srWindow.Left; + csbix->srWindow.Right = csbi.srWindow.Right; + csbix->srWindow.Top = csbi.srWindow.Top; + csbix->srWindow.Bottom = csbi.srWindow.Bottom; + csbix->dwMaximumWindowSize.X = csbi.dwMaximumWindowSize.X; + csbix->dwMaximumWindowSize.Y = csbi.dwMaximumWindowSize.Y; + + SERVER_START_REQ(get_console_output_infoex) + { + req->handle = console_handle_unmap(hConsoleOutput); + if ((ret = !wine_server_call_err( req ))) + { + csbix->wPopupAttributes = reply->popup_attr; + csbix->bFullscreenSupported = reply->fullscreen; + for (i=0;i<16;i++) + { + csbix->ColorTable[i] = reply->colortable.ct[i]; + } + } + } + SERVER_END_REQ; + + return ret; +} /****************************************************************************** * SetConsoleActiveScreenBuffer [KERNEL32.@] Sets buffer to current console diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 08b225f..6740940 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -489,6 +489,7 @@ @ stdcall GetConsoleOutputCP() @ stdcall GetConsoleProcessList(ptr long) @ stdcall GetConsoleScreenBufferInfo(long ptr) +@ stdcall GetConsoleScreenBufferInfoEx(long ptr) # @ stub GetConsoleSelectionInfo @ stdcall GetConsoleTitleA(ptr long) @ stdcall GetConsoleTitleW(ptr long) -- 1.7.10.4