diff --git a/reactos/base/applications/cmdutils/help/help.c b/reactos/base/applications/cmdutils/help/help.c index 69af5ebd091..2a2b67cb5ba 100644 --- a/reactos/base/applications/cmdutils/help/help.c +++ b/reactos/base/applications/cmdutils/help/help.c @@ -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 diff --git a/reactos/base/shell/cmd/console.c b/reactos/base/shell/cmd/console.c index 921684b08ba..a01c0c8d748 100644 --- a/reactos/base/shell/cmd/console.c +++ b/reactos/base/shell/cmd/console.c @@ -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