delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/18/19:05:01

Message-Id: <l03120601b59aa03822b3@[129.101.145.218]>
Mime-Version: 1.0
Date: Tue, 18 Jul 2000 16:08:23 -0800
To: djgpp AT delorie DOT com
From: David Roon <roon8505 AT uidaho DOT edu>
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019