I recently ran across a problem that was surprisingly challenging. I have a console application and I wanted to be able to send it information over standard input. That includes piping data to it such as
echo "test" | myapp.exe and receiving command redirection such as
myapp.exe < file.txt (see this link for more information about Windows command redirection). This sort of input all comes into your application by way of a stream called "standard input" or "stdin" for short. It turns out there's a lot of edge cases to consider when trying to capture standard input, and accounting for them all can be difficult.