October 22, 2003

Redirecting standard output

I got juked out of a ride to Institute, but it was alight I guess. I wanted to check out this article I found.

Visual Studio.Net made it smooth to modify the project. It seemed pretty easy to redirect output. I always wondered how that was done, but never took the time to find out how.

As I started to think about it, the Win32 API function, CreateProcess had a lot of parameters. Surely one of these had to be start up information.... and ultimately the stdout.

The LPSTARTUPINFO lpStartupInfo parameter is just the key. Further inqury lead to the HANDLE hStdOutput as part of the structure.

Posted by Michael at October 22, 2003 08:26 AM
Comments