G
Guest
I often write console programs that need to detect when stdin and stdout are
redirected.
I found out how to detect this for stdin by using API calls GetStdHandle()
and PeekConsoleInput() (from a Dr. GUI article).
But I still need to detect such for stdout, is there a way?
And shouldn't this be a property of the standard streams?
redirected.
I found out how to detect this for stdin by using API calls GetStdHandle()
and PeekConsoleInput() (from a Dr. GUI article).
But I still need to detect such for stdout, is there a way?
And shouldn't this be a property of the standard streams?