Author: hbelusca Date: Sun Aug 11 17:06:19 2013 New Revision: 59697
URL: http://svn.reactos.org/svn/reactos?rev=59697&view=rev Log: [KERNEL32] Fix the prototype of the undocumented function SetConsolePalette (see http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 and https://github.com/harbour/core/commit/d79a1b7b812cbde6ddf718ebfd6939a24f633... for a usage example); tested by Mysoft a.k.a. Grégory Macario Harbs. Needed for modifying VGA palettes for NTVDM.
Modified: trunk/reactos/dll/win32/kernel32/client/console/console.c trunk/reactos/include/psdk/wincon.h
Modified: trunk/reactos/dll/win32/kernel32/client/console/console.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/c... ============================================================================== --- trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] Sun Aug 11 17:06:19 2013 @@ -712,16 +712,19 @@
/* * @unimplemented (Undocumented) - */ -BOOL -WINAPI -SetConsolePalette(DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2) -{ - DPRINT1("SetConsolePalette(0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1, Unknown2); + * @note See http://comments.gmane.org/gmane.comp.lang.harbour.devel/27844 + * Usage example: https://github.com/harbour/core/commit/d79a1b7b812cbde6ddf718ebfd6939a24f633... + */ +BOOL +WINAPI +SetConsolePalette(HANDLE hConsoleOutput, + HPALETTE hPalette, + UINT dwUsage) +{ + 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; }
/*
Modified: trunk/reactos/include/psdk/wincon.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincon.h?rev=5... ============================================================================== --- trunk/reactos/include/psdk/wincon.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/wincon.h [iso-8859-1] Sun Aug 11 17:06:19 2013 @@ -473,6 +473,8 @@ 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);