Added detection of redirection. GetStdHandle() used instead of CreateFile(). Error message is shown to user when it tries to redirect.

svn path=/trunk/; revision=1879
This commit is contained in:
Nedko Arnaudov
2001-05-03 22:41:16 +00:00
parent 278ce6bf50
commit d9776acd0c
2 changed files with 40 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: RegistryExplorer.cpp,v 1.7 2001/04/24 22:53:00 narnaoud Exp $
/* $Id: RegistryExplorer.cpp,v 1.8 2001/05/03 22:41:16 narnaoud Exp $
*
* regexpl - Console Registry Explorer
*
@@ -172,12 +172,13 @@ int main ()
TCHAR *pchCommand;
pchCommand = Console.Init(INPUT_BUFFER_SIZE,10);
if (pchCommand == NULL)
{
_ftprintf(stderr,_T("Cannot initialize console.\n"));
goto Abort;
}
pchCommand = Console.Init(INPUT_BUFFER_SIZE,10);
if (pchCommand == NULL)
{
_ftprintf(stderr,_T("Cannot initialize console.\n"));
nRetCode = 1;
goto Exit;
}
Console.SetReplaceCompletionCallback(CompletionCallback);