From eafb1ee3f72dd234a76279aaaa10000a8bd3ee10 Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 25 Aug 2005 19:47:44 +0000 Subject: [PATCH] - added stubs for Set/GetConsoleHistoryInfo(), GetConsoleOriginalTitleA/W(), Set/GetConsoleScreenBufferInfoEx() and GetCurrentConsoleFontEx() - added missing structure definitions svn path=/trunk/; revision=17543 --- reactos/lib/aclui/aclui.xml | 2 +- reactos/lib/advapi32/advapi32.xml | 2 +- reactos/lib/kernel32/kernel32.def | 2 + reactos/lib/kernel32/kernel32.xml | 4 +- reactos/lib/kernel32/misc/console.c | 104 +++++++++++++++++++++++++++ reactos/lib/kernel32/misc/lcformat.c | 2 - reactos/lib/ntdll/ntdll.xml | 2 +- reactos/lib/ntmarta/ntmarta.xml | 2 +- reactos/w32api/include/wincon.h | 34 ++++++++- reactos/w32api/include/windows.h | 2 +- 10 files changed, 145 insertions(+), 11 deletions(-) diff --git a/reactos/lib/aclui/aclui.xml b/reactos/lib/aclui/aclui.xml index a45825e89aa..c0679abac91 100644 --- a/reactos/lib/aclui/aclui.xml +++ b/reactos/lib/aclui/aclui.xml @@ -5,7 +5,7 @@ 0x0500 - 0x501 + 0x0600 0x0600 ntdll kernel32 diff --git a/reactos/lib/advapi32/advapi32.xml b/reactos/lib/advapi32/advapi32.xml index 65f38ca005d..6241ce8b4ad 100644 --- a/reactos/lib/advapi32/advapi32.xml +++ b/reactos/lib/advapi32/advapi32.xml @@ -5,7 +5,7 @@ 0x600 0x0500 - 0x0501 + 0x0600 scm_client ntdll kernel32 diff --git a/reactos/lib/kernel32/kernel32.def b/reactos/lib/kernel32/kernel32.def index 7d64ca07598..39e611b4be9 100644 --- a/reactos/lib/kernel32/kernel32.def +++ b/reactos/lib/kernel32/kernel32.def @@ -773,6 +773,7 @@ SetConsoleCursorPosition@8 SetConsoleDisplayMode@12 SetConsoleFont@8 SetConsoleHardwareState@12 +SetConsoleHistoryInfo@4 SetConsoleIcon@4 SetConsoleInputExeNameA@4 SetConsoleInputExeNameW@4 @@ -787,6 +788,7 @@ SetConsoleNumberOfCommandsW@8 ;SetConsoleOS2OemFormat SetConsoleOutputCP@4 SetConsolePalette@12 +SetConsoleScreenBufferInfoEx@8 SetConsoleScreenBufferSize@8 SetConsoleTextAttribute@8 SetConsoleTitleA@4 diff --git a/reactos/lib/kernel32/kernel32.xml b/reactos/lib/kernel32/kernel32.xml index 7a05027b375..c85f1010262 100644 --- a/reactos/lib/kernel32/kernel32.xml +++ b/reactos/lib/kernel32/kernel32.xml @@ -4,9 +4,9 @@ - 0x0502 + 0x0600 - 0x0500 + 0x0600 k32.h break.c diff --git a/reactos/lib/kernel32/misc/console.c b/reactos/lib/kernel32/misc/console.c index 0f71bf93ee0..039beda947a 100644 --- a/reactos/lib/kernel32/misc/console.c +++ b/reactos/lib/kernel32/misc/console.c @@ -3622,4 +3622,108 @@ GetConsoleInputExeNameA(DWORD nBufferLength, LPSTR lpBuffer) return Ret; } + +/*-------------------------------------------------------------- + * GetConsoleHistoryInfo + * + * @unimplemented + */ +BOOL STDCALL +GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) +{ + DPRINT1("GetConsoleHistoryInfo(0x%p) UNIMPLEMENTED!\n", lpConsoleHistoryInfo); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +/*-------------------------------------------------------------- + * SetConsoleHistoryInfo + * + * @unimplemented + */ +BOOL STDCALL +SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo) +{ + DPRINT1("SetConsoleHistoryInfo(0x%p) UNIMPLEMENTED!\n", lpConsoleHistoryInfo); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +/*-------------------------------------------------------------- + * GetConsoleOriginalTitleW + * + * @unimplemented + */ +DWORD STDCALL +GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle, + IN DWORD nSize) +{ + DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +} + + +/*-------------------------------------------------------------- + * GetConsoleOriginalTitleA + * + * @unimplemented + */ +DWORD STDCALL +GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle, + IN DWORD nSize) +{ + DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n", lpConsoleTitle, nSize); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return 0; +} + + +/*-------------------------------------------------------------- + * GetConsoleScreenBufferInfoEx + * + * @unimplemented + */ +BOOL STDCALL +GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, + OUT PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx) +{ + DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +/*-------------------------------------------------------------- + * SetConsoleScreenBufferInfoEx + * + * @unimplemented + */ +BOOL STDCALL +SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput, + IN PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx) +{ + DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, lpConsoleScreenBufferInfoEx); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + + +/*-------------------------------------------------------------- + * GetCurrentConsoleFontEx + * + * @unimplemented + */ +BOOL STDCALL +GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput, + IN BOOL bMaximumWindow, + OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx) +{ + DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + /* EOF */ diff --git a/reactos/lib/kernel32/misc/lcformat.c b/reactos/lib/kernel32/misc/lcformat.c index 997b7d5be2a..cec05853074 100644 --- a/reactos/lib/kernel32/misc/lcformat.c +++ b/reactos/lib/kernel32/misc/lcformat.c @@ -28,8 +28,6 @@ * -Gunnar */ -#define WINVER 0x0500 - #include #include "wine/config.h" diff --git a/reactos/lib/ntdll/ntdll.xml b/reactos/lib/ntdll/ntdll.xml index b577ac69ab5..bb2dc919bb3 100644 --- a/reactos/lib/ntdll/ntdll.xml +++ b/reactos/lib/ntdll/ntdll.xml @@ -5,7 +5,7 @@ - 0x0502 + 0x0600 rtl diff --git a/reactos/lib/ntmarta/ntmarta.xml b/reactos/lib/ntmarta/ntmarta.xml index 82207f3eb86..64ba64f1340 100644 --- a/reactos/lib/ntmarta/ntmarta.xml +++ b/reactos/lib/ntmarta/ntmarta.xml @@ -5,7 +5,7 @@ 0x0500 - 0x501 + 0x600 0x0600 ntdll kernel32 diff --git a/reactos/w32api/include/wincon.h b/reactos/w32api/include/wincon.h index 4a058ed76b5..80665b78aaf 100644 --- a/reactos/w32api/include/wincon.h +++ b/reactos/w32api/include/wincon.h @@ -107,7 +107,6 @@ typedef struct _KEY_EVENT_RECORD { PACKED #endif KEY_EVENT_RECORD; - typedef struct _MOUSE_EVENT_RECORD { COORD dwMousePosition; DWORD dwButtonState; @@ -128,8 +127,39 @@ typedef struct _INPUT_RECORD { } Event; } INPUT_RECORD,*PINPUT_RECORD; +#if (_WIN32_WINNT >= 0x0600) +#define HISTORY_NO_DUP_FLAG 0x1 +#define CONSOLE_OVERSTRIKE 0x1 +typedef struct _CONSOLE_HISTORY_INFO { + UINT cbSize; + UINT HistoryBufferSize; + UINT NumberOfHistoryBuffers; + DWORD dwFlags; +} CONSOLE_HISTORY_INFO, *PCONSOLE_HISTORY_INFO; + +typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { + ULONG cbSize; + COORD dwSize; + COORD dwCursorPosition; + WORD wAttributes; + SMALL_RECT srWindow; + COORD dwMaximumWindowSize; + WORD wPopupAttributes; + COLORREF ColorTable[16]; +} CONSOLE_SCREEN_BUFFER_INFOEX, *PCONSOLE_SCREEN_BUFFER_INFOEX; + +typedef struct _CONSOLE_FONT_INFOEX { + ULONG cbSize; + DWORD nFont; + COORD dwFontSize; + UINT FontFamily; + UINT FontWeight; + WCHAR FaceName[LF_FACESIZE]; +} CONSOLE_FONT_INFOEX, *PCONSOLE_FONT_INFOEX; +#endif + BOOL WINAPI AllocConsole(void); -#if (_WIN32_WINNT >= 0x05001) +#if (_WIN32_WINNT >= 0x0501) BOOL WINAPI AttachConsole(DWORD); #endif HANDLE WINAPI CreateConsoleScreenBuffer(DWORD,DWORD,CONST SECURITY_ATTRIBUTES*,DWORD,LPVOID); diff --git a/reactos/w32api/include/windows.h b/reactos/w32api/include/windows.h index 6b89013bb6c..390b5ff3c21 100644 --- a/reactos/w32api/include/windows.h +++ b/reactos/w32api/include/windows.h @@ -47,11 +47,11 @@ #include #include #include -#include #include #if !(defined NOGDI || defined _WINGDI_H) #include #endif +#include #ifndef _WINUSER_H #include #endif