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

CFV 6.6C Interface w/ WINEXEC

dick17901
Beginner
483 Views
I am making the call : Iret = WinExec('NotePad.exe '//efile(1:lenE)//CHAR(0) ,SW_SHOW)

What call must I make to only proceed when the above call is successful?
0 Kudos
1 Reply
llynisa
Beginner
483 Views

If you look up the specification for WinExec in CVF Help or in the MSDN library, you will find the answer in the return value: "If the function succeeds, the return value is greater than 31". So I suggest:

if (Iret > 31) then ........................

But you might also like to consider what to do if it fails - see the spec.

HTH

Bear of Little Brain

0 Kudos
Reply