--- mstools/samples/console/flush.c 2018/08/09 18:20:36 1.1 +++ mstools/samples/console/flush.c 2018/08/09 18:23:15 1.1.1.3 @@ -1,3 +1,14 @@ + +/******************************************************************************\ +* This is a part of the Microsoft Source Code Samples. +* Copyright (C) 1993 Microsoft Corporation. +* All rights reserved. +* This source code is only intended as a supplement to +* Microsoft Development Tools and/or WinHelp documentation. +* See these sources for detailed information regarding the +* Microsoft samples programs. +\******************************************************************************/ + #include #include "console.h" @@ -23,7 +34,7 @@ void demoFlush(HANDLE hConOut) setConTitle(__FILE__); hStdIn = GetStdHandle(STD_INPUT_HANDLE); - PERR((int) hStdIn != -1, "GetStdHandle"); + PERR(hStdIn != INVALID_HANDLE_VALUE, "GetStdHandle"); myPuts(hConOut, "Type a number of characters quickly. I will read 5\n" "characters from the input buffer with a Sleep() delay\n" "which will allow it to fill with characters. After 5\n"