Board index » cppbuilder » Process spawning and communication
Dave Pugh
![]() CBuilder Developer |
Dave Pugh
![]() CBuilder Developer |
Process spawning and communication2005-09-23 03:03:36 PM cppbuilder3 Morning Folks. I'm writing an application that needs to be able to execute dos batch files and other executables. I want to have the output from these redirected into a visual component within my app, such as TMemo. In a unix app, I'd have used fork and execv. In Borland, I've been looking at "spawnlp" call in process.h, which does execute the program, but I can't find any way of redirecting it's standard out. Any thoughts? DaveP |
Rob
![]() CBuilder Developer |
2005-09-23 03:14:49 PM
Re:Process spawning and communication
Dave Pugh wrote:
QuoteMorning Folks. |
Oliver Rutsch
![]() CBuilder Developer |
2005-09-23 04:39:23 PM
Re:Process spawning and communication
Hi Dave,
You may have a look at my ProjectMaker tool source code. There's a class called TConsoleRedirector in tools.cpp. It is multi-threaded and it supports read events. Look at ProjectMakerForm.cpp how it is used. It should do everything you want. Download address: helene-lange-weg.mine.nu/Rutsch/cppcorner.html Bye, Oliver {smallsort} |
Dave
![]() CBuilder Developer |
2005-09-24 01:32:16 PM
Re:Process spawning and communication
Thanks Guys
|