02-13-2008 09:10 AM
02-14-2008 07:27 PM
02-20-2008 11:20 PM
Hi Marty,
thanks a lot for the reply
But let me tell u my actual problem
Im trying to run an exe (it’s a c program) that takes command line parameters
as input and prints the info using printf statements on the command line.
Just as an ex: say I have test.exe that takes 2
parameters namely employee NAME and ID and prints the entire information of the
Employee like date of birth, address etc,
now all I want, is to create a GUI using lab windows, run the exe with
parameters from the GUI and wat ever is output by the Exe is to be displayed on
a Textbox of the GUI
Here actually I m able to run the exe by creating a
batch file (1.bat which in turn calls test.exe with the parameters) and display the output on the
text box using PeekNamedPipe as u can see in Process.c file
above,
only that the output from the exe is displayed after much delay, which is not
acceptable.
Could u suggest where I have gone wrong or wat wud be better way to do this, so that the display is faster.
Note : The test.exe is very big and runs for about 5 mins with lot of data printed on the screen every few seconds.
Thanks and Regards
Praveen
02-21-2008 02:39 AM
If you can wait for the exe to terminate before reading its output you could call it via LaunchExecutableEx ( ) redirecting the output to a file, reading back the file after the program has terminated as described in this thread. Since the executable is long lasting, you could start a loop testing if ExecutableHasTerminated ( ) and optionally use TerminateExecutable ( ) to abort it prematurely.
02-21-2008 09:51 PM
02-22-2008 12:01 AM
02-22-2008 01:29 AM
02-25-2008 11:47 AM
02-26-2008 10:01 AM