--- mstools/samples/console/writein.c 2018/08/09 18:20:36 1.1.1.1 +++ mstools/samples/console/writein.c 2018/08/09 18:21:17 1.1.1.2 @@ -4,6 +4,9 @@ #include #include "console.h" +/* Microsoft Developer Support + Copyright (c) 1992 Microsoft Corporation */ + #define MAX_MACRO_EVENTS 256 #define ALT_PRESSED (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED) #define CONTROL_KEY (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED | \ @@ -35,6 +38,7 @@ void demoWriteIn(HANDLE hConOut) int iir; /* index into macro input buffer */ CHAR c; + setConTitle(__FILE__); myPuts(hConOut, "\n\nLet's implement a simple macro record/playback facility.\n" "Hit Alt+R to record, and Alt+P to playback. After turning\n" "on Record mode, enter some keystrokes or mouse clicks.\n" @@ -43,7 +47,7 @@ void demoWriteIn(HANDLE hConOut) "insert the recorded events into the input buffer.\n" "Hit ESC at any time to return."); hStdIn = GetStdHandle(STD_INPUT_HANDLE); - PERR((int) hStdIn != -1, "GetStdHandle"); + PERR(hStdIn != INVALID_HANDLE_VALUE, "GetStdHandle"); for(;;) { /* if our macro event buffer is full, leave Record mode */