From 4df1a905ab59fbbd4a13f4ace0c05a586e39ee82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sun, 11 Aug 2013 17:06:19 +0000 Subject: [PATCH] =?UTF-8?q?[KERNEL32]=20Fix=20the=20prototype=20of=20the?= =?UTF-8?q?=20undocumented=20function=20SetConsolePalette=20(see=20http://?= =?UTF-8?q?comments.gmane.org/gmane.comp.lang.harbour.devel/27844=20and=20?= =?UTF-8?q?https://github.com/harbour/core/commit/d79a1b7b812cbde6ddf718eb?= =?UTF-8?q?fd6939a24f633e52=20for=20a=20usage=20example);=20tested=20by=20?= =?UTF-8?q?Mysoft=20a.k.a.=20Gr=C3=A9gory=20Macario=20Harbs.=20Needed=20fo?= =?UTF-8?q?r=20modifying=20VGA=20palettes=20for=20NTVDM.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/trunk/; revision=59697 --- reactos/dll/win32/kernel32/client/console/console.c | 13 ++++++++----- reactos/include/psdk/wincon.h | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/kernel32/client/console/console.c b/reactos/dll/win32/kernel32/client/console/console.c index ddb7bdf6eb3..6b438749149 100644 --- a/reactos/dll/win32/kernel32/client/console/console.c +++ b/reactos/dll/win32/kernel32/client/console/console.c @@ -712,16 +712,19 @@ SetConsoleMenuClose(BOOL bEnable) /* * @unimplemented (Undocumented) + * @note See http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 + * Usage example: https://github.com/harbour/core/commit/d79a1b7b812cbde6ddf718ebfd6939a24f633e52 */ BOOL WINAPI -SetConsolePalette(DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2) +SetConsolePalette(HANDLE hConsoleOutput, + HPALETTE hPalette, + UINT dwUsage) { - DPRINT1("SetConsolePalette(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1, Unknown2); + DPRINT1("SetConsolePalette(0x%x, 0x%x, %d) UNIMPLEMENTED!\n", hConsoleOutput, hPalette, dwUsage); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + // Return TRUE so that we don't fail when being used by NTVDM even if not implemented. + return TRUE; } /* diff --git a/reactos/include/psdk/wincon.h b/reactos/include/psdk/wincon.h index 11744dd3d9c..65528546555 100644 --- a/reactos/include/psdk/wincon.h +++ b/reactos/include/psdk/wincon.h @@ -473,6 +473,8 @@ BOOL WINAPI SetConsoleMenuClose(_In_ BOOL); BOOL WINAPI SetConsoleCursor(_In_ HANDLE, _In_ HCURSOR); /* Undocumented, see http://undoc.airesoft.co.uk/kernel32.dll/ShowConsoleCursor.php */ INT WINAPI ShowConsoleCursor(_In_ HANDLE, _In_ BOOL); +/* Undocumented, see http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 */ +BOOL WINAPI SetConsolePalette(_In_ HANDLE, _In_ HPALETTE, _In_ UINT); BOOL WINAPI WriteConsoleA(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID); BOOL WINAPI WriteConsoleW(HANDLE,CONST VOID*,DWORD,LPDWORD,LPVOID);