--- q_a/samples/inherit/child.c 2018/08/09 18:29:19 1.1 +++ q_a/samples/inherit/child.c 2018/08/09 18:30:08 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. +\******************************************************************************/ + /* Standard output handle/standard error handle redirection test program */ @@ -51,10 +62,10 @@ int main() Beep(5000,500); /* no reliable way of reporting errors to the console */ /* if we can't open a console handle */ hStdErr = GetStdHandle(STD_ERROR_HANDLE); - if ((int) hStdErr == -1) + if (hStdErr == INVALID_HANDLE_VALUE) myError(hConout, "GetStdHandle", __LINE__); hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); - if ((int) hStdOut == -1) + if (hStdOut == INVALID_HANDLE_VALUE) myError(hConout, "GetStdHandle", __LINE__); fSuccess = WriteFile(hStdErr, stdErrMsg, strlen(stdErrMsg), &cBytesWritten, NULL);