Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - C question
  
User name:
Password:
Reply:
 

UserPost
labmaster
Posts: 18/43
Awesome - thanks Para.
Parasyte
Posts: 194/514
This is probably what you want: http://www.codeproject.com/threads/redir.asp
labmaster
Posts: 17/43
Yeah, that's what I've got at the moment (slightly less pretty, it creates a temporary batch file and winexec's it), I was hoping there was a better way of doing it, but I can live with that.
Euclid
Posts: 129/193
I remember being able to do that in unix... though i have no idea if the c function call "System("") is actually there in windows.

what I'll be doing is something like this:
System("b.exe > somefile");
then all the input you want is in somefile.

But if you want A.exe and B.exe to run together and depending on what happens in B, A will act differently, then you'll have to go into all those yucky semaphores and monitors. (and shared memory and stuff)
labmaster
Posts: 16/43
Okay, here's the scenario. I have a program called A.exe. I want A.exe to be able to run B.exe (a command line program), and capture its output, storing it into a buffer. Is this possible with C/++, and if so, would I do it (I know it can be done with some scripting languages like perl).

Note: Names have been changed to protect their identity.
Acmlm's Board - I2 Archive - Programming - C question


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.010 seconds.