Mail Archives: djgpp/2000/07/18/19:05:01
Hullo, folks;
I'm trying to write code that will allow me to take an output file from one
program (fileName.inp), and export it into a pre-existing application.
(Running the pre-existing application, and creating an output file).
The existing program ('CAPTURE') can be run in MS-DOS, using the following
command line;
capture i=<fileName>.inp o=<fileName>.out
where <fileName>.inp is the datafile as created by my program
I'd like to use something similar to the 'WinExec' function available in
Visual Basic.
For instance, a friend (who programs in V.B.) used the following code
sequence...
>static BOOL
>SpawnExternalApp( char *fileName )
>{
> char fileName[PATH_SIZE]; // PATH_SIZE should be 256
> char command_line[PATH_SIZE+128];
>
> UINT extInstance; // ID of external instance
>
> // show a message
> MessageBox( "Starting analysis"); // Syntax?
>
> wsprintf( command_line, "%s %s", "Analysis.EXE", fileName );
>
> // spawn external analysis application
> extInstance = WinExec( command_line, SW_HIDE );
>
> if(extInstance < 32)
> {
> return FALSE;
> }
>
> return TRUE;
...to do something similar.
Is there a similar family of functions that will work in DJGPP? What will I
need to include?
Cheers,
David R
University of Idaho
- Raw text -