--- mstools/samples/console/readout.c 2018/08/09 18:20:36 1.1 +++ mstools/samples/console/readout.c 2018/08/09 18:21:19 1.1.1.2 @@ -3,6 +3,9 @@ #include #include "console.h" +/* Microsoft Developer Support + Copyright (c) 1992 Microsoft Corporation */ + /******************************************************************** * FUNCTION: invertRectangle(HANDLE hConOut, COORD coordStart, * * COORD coordCur) * @@ -99,7 +102,7 @@ void demoReadConOut(HANDLE hConOut) "of the buffer to the screen at the current cursor location.\n" "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");