Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28629 Discussions

Executing a program without a window

nijhuis
Beginner
280 Views
I have a Fortran Windows Application in which I have to start another Fortran program in a loop. I do this withthe call "stat =SYSTEM("program2.exe"), but any time program2 is executed a console window appears. I do not need this window because program2 only reads a file, performs something and writes to another file. In my case program2 was built as a console application.
How can I get rid of the console windows? What project type is needed for program2 to have no windows on the screen?
I already tried to make a subroutine of progam2, but that did not work correct, because in a loop the initial status of the variables is not reset. So I really need to run it as a program executable.
Guus
0 Kudos
1 Reply
Steven_L_Intel1
Employee
280 Views
Don't use SYSTEM - it creates the console window. Use CreateProcess instead. Example at http://h18009.www1.hp.com/fortran/visual/vfn09/page3.html#win32
0 Kudos
Reply