--- mstools/samples/console/readchar.c 2018/08/09 18:20:36 1.1 +++ mstools/samples/console/readchar.c 2018/08/09 18:21:18 1.1.1.2 @@ -3,6 +3,9 @@ #include #include "console.h" +/* Microsoft Developer Support + Copyright (c) 1992 Microsoft Corporation */ + /********************************************************************* * FUNCTION: demoReadConChar(HANDLE hConOut) * * * @@ -30,7 +33,7 @@ void demoReadConChar(HANDLE hConOut) "a buffer, then print that buffer to the console at the\n" "current cursor position. Hit ESC to return.\n\n"); hStdIn = GetStdHandle(STD_INPUT_HANDLE); - PERR((int) hStdIn != -1,"GetStdHandle"); + PERR(hStdIn != INVALID_HANDLE_VALUE, "GetStdHandle"); /* save the console mode */ bSuccess = GetConsoleMode(hStdIn, &dwStdInMode); PERR(bSuccess, "GetConsoleMode");