--- mstools/samples/console/create.c 2018/08/09 18:20:36 1.1.1.1 +++ mstools/samples/console/create.c 2018/08/09 18:21:21 1.1.1.2 @@ -2,6 +2,9 @@ #include #include "console.h" +/* Microsoft Developer Support + Copyright (c) 1992 Microsoft Corporation */ + /********************************************************************* * FUNCTION: demoCreate(HANDLE hConOld) * * * @@ -42,7 +45,7 @@ void demoCreate(HANDLE hConOld) hConHelp = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - PERR((int) hConHelp != -1, "CreateConsoleScreenBuffer"); + PERR(hConHelp != INVALID_HANDLE_VALUE, "CreateConsoleScreenBuffer"); /* change the color of the help screen */ bSuccess = FillConsoleOutputAttribute(hConHelp, BACKGROUND_BLUE, getConX(hConHelp) * getConY(hConHelp), dwWriteCoord, &cCharsWritten); @@ -59,7 +62,7 @@ void demoCreate(HANDLE hConOld) " F5: execute F10: explode\n" " ESC: exit help"); hStdIn = GetStdHandle(STD_INPUT_HANDLE); - PERR((int) hStdIn != -1, "GetStdHandle"); + PERR(hStdIn != INVALID_HANDLE_VALUE, "GetStdHandle"); /* keep track of the currently visible console */ hConCurrent = hConOld; /* switch between the help and previous buffer when user hits F1 or ESC */