Christopher Faylor wrote:

> Is there something wrong with Cygwin's code for determining if a handle is a
> console?
> 
>   ...
>   if (GetConsoleScreenBufferInfo (handle, &buf))
>     {
>       ...
>     }
>   else if (GetNumberOfConsoleInputEvents (handle, (DWORD *) &buf))
>     {
>       ...
>     }
> 
> It's been working pretty well for centuries.

  Can't see why it wouldn't be ok.  Both those functions return zero (and
GetLastError() == STATUS_INVALID_HANDLE) if what you pass isn't a console 
handle.

    cheers,
      DaveK


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to