[CMD][HELP]

Fix the IsConsoleHandle helper.

svn path=/trunk/; revision=62362
This commit is contained in:
Hermès Bélusca-Maïto 2014-02-28 23:55:40 +00:00
parent 4644ad4140
commit de68f2df0f
2 changed files with 4 additions and 2 deletions

View file

@ -25,7 +25,8 @@ BOOL IsConsoleHandle(HANDLE hHandle)
DWORD dwMode;
/* Check whether the handle may be that of a console... */
if ((GetFileType(hHandle) & FILE_TYPE_CHAR) == 0) return FALSE;
if ((GetFileType(hHandle) & ~FILE_TYPE_REMOTE) != FILE_TYPE_CHAR)
return FALSE;
/*
* It may be. Perform another test... The idea comes from the

View file

@ -31,7 +31,8 @@ BOOL IsConsoleHandle(HANDLE hHandle)
DWORD dwMode;
/* Check whether the handle may be that of a console... */
if ((GetFileType(hHandle) & FILE_TYPE_CHAR) == 0) return FALSE;
if ((GetFileType(hHandle) & ~FILE_TYPE_REMOTE) != FILE_TYPE_CHAR)
return FALSE;
/*
* It may be. Perform another test... The idea comes from the