I need a nice code sample for writing and reading from a DOS window. What I'm trying to do is open a dos console program, send characters to it, and read its output as it's printed. Preferred language is Visual Basic, but C++ is okay too. Please feel free to use Win32 API calls. Thanks.