--- mstools/samples/console/getnumev.c 2018/08/09 18:20:36 1.1 +++ mstools/samples/console/getnumev.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 */ + /* maximum number of input queue events to peek at */ #define INPUT_RECS 256 @@ -39,7 +42,7 @@ void demoGetNumEvents(HANDLE hConOut) setConTitle(__FILE__); hStdIn = GetStdHandle(STD_INPUT_HANDLE); - PERR((int) hStdIn != -1,"GetStdHandle"); + PERR(hStdIn != INVALID_HANDLE_VALUE, "GetStdHandle"); myPuts(hConOut, "\nLet's display a running count of events waiting in the\n" "console input queue by using the GetNumberOfConsoleInputEvents\n" "API. I will enable mouse input in this console; try\n"