Author: Roy Eassa
Date: 12:09:32 04/05/02
Go up one level in this thread
On April 05, 2002 at 14:58:14, Tim Foden wrote: >On April 05, 2002 at 13:58:17, Roy Eassa wrote: > >>I understand that it reads stdin. I was wondering if there was a way for >>another app to "send" something that, to Chest, looked like it was coming from >>stdin. This question is aimed at those who are experienced with programming >>tricks in Windows and/or DOS. > >Yes it is possible. Under Win32 you follow the following procedure. > >1. Save your current processes stdin, stdout and stderr. >2. Replace your stdin, stdout and stderr with pipes. >3. Create the child process, inheriting handles. >4. Restore your saved stdin, stdout and stderr. >5. Communicate with the child process using your end of the pipes. > >Cheers, Tim. > Tim, thank you. I should have been more explicit. My app, over which I DO have control, needs to talk to an _existing_ DOS app, which I must treat as a "black box". (The latter is not a child process.) Under these strict conditions, is this still possible? Additional info: I can write my app in VB or VC++ or something else. The first two I have some experience with; the something else I will need to learn. However, I've downloaded Tcl/Tk and will try to learn it because then what I do could presumably work on other platforms. Ultimately I'd even like to make Chest available to Mac users! I have a Mac and old versions of a Mac C/C++ compiler (Metrowerks), and there's Tcl/Tk for Mac, so maybe it's just a matter of focusing (my weak point!).
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.