LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I capture return value from an external exe call

I need to call an external exe from my c-code and I would like to capture the exit code when it's done.  I've looked at both the LanuchExecutableEx() and system() functions and neither one does this.  With LaunchExecutableEx() I can check to see if it's done or abort it if necessary, but I don't see a way to get the exit code when it is done.  Is it possible to do this with LabWindows?

0 Kudos
Message 1 of 2
(4,191 Views)

DanQ:

 

Another way to launch an executable is by using CreateProcess().  You can then use GetExitCodeProcess() to read the results.

 

See more details here: http://digital.ni.com/public.nsf/allkb/E250246D65A6A18D8625659F0065F310 

Message 2 of 2
(4,188 Views)