Archived

This topic is now archived and is closed to further replies.

Russell

Text pipes

Recommended Posts

Russell    118
I would like to know if anyone has written a class (or any code) that will accomplish the following: * Allow me to spawn a child process''s console application * Allow me to read text from the child process''s standard output * Allow me to write text to the child process''s standard input I guess polling to see if the child has printed anything would be nice too. In unix this is like two lines of code, but, as usual, Windows makes this a pain in the ass. I know the Win32 API functions I need to accomplish this (CreateProcess(), CreatePipe(), WriteFile() should do the trick), but if someone has already written something like this, it would save me the trouble and probably some cursing

Share this post


Link to post
Share on other sites
Russell    118
Hmm...I looked at that, and it led me to _pipe(), which seems like it might work. I''ll play with it. I have a feeling I''m going to have to use the Win32 API stuff to get the functionality I want though.

Share this post


Link to post
Share on other sites