Francois Gouget : kernel32: Match the Windows 10 1709+ SetConsoleFont() implementation.

Alexandre Julliard julliard at winehq.org
Thu Nov 14 15:51:28 CST 2019


Module: wine
Branch: master
Commit: da238dc1d11cb57333de40d5ec76985c75f39130
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=da238dc1d11cb57333de40d5ec76985c75f39130

Author: Francois Gouget <fgouget at free.fr>
Date:   Thu Nov 14 00:29:58 2019 +0100

kernel32: Match the Windows 10 1709+ SetConsoleFont() implementation.

That is return the same 'E_NOTIMPL' error code.
Remove the todo_wine-s but keep the tests in case we want to implement
the API for compatibility with old Windows versions.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/console.c       | 2 +-
 dlls/kernel32/tests/console.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 4c0bee2caf..a698e53efe 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -1627,7 +1627,7 @@ DWORD WINAPI GetNumberOfConsoleFonts(void)
 BOOL WINAPI SetConsoleFont(HANDLE hConsole, DWORD index)
 {
     FIXME("(%p, %u): stub!\n", hConsole, index);
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    SetLastError(LOWORD(E_NOTIMPL) /* win10 1709+ */);
     return FALSE;
 }
 
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index 171b2dad4d..1ecb350673 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -2973,12 +2973,12 @@ static void test_SetConsoleFont(HANDLE std_output)
         skip("SetConsoleFont is not implemented\n");
         return;
     }
-    todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+    ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
 
     SetLastError(0xdeadbeef);
     ret = pSetConsoleFont(GetStdHandle(STD_INPUT_HANDLE), 0);
     ok(!ret, "got %d, expected zero\n", ret);
-    todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
+    ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
 
     pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts");
     if (!pGetNumberOfConsoleFonts)




More information about the wine-cvs mailing list