LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the return value of .exe with LaunchExecutable()

Solved!
Go to solution

Hi,

 

I am trying to get the value return by a .exe file started with LaunchExecutable(). Do you think it is possible or I am going the wrong way ?

 

Thanks !

 

Adrien T.

0 Kudos
Message 1 of 3
(3,437 Views)
Solution
Accepted by topic author a.t74

Adrien:

 

If you launch an executable CreateProcess(), you can then use GetExitCodeProcess() to read the results.

 

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

 

Note that you need to have the Windows SDK (aka Win32 API) installed to use CreateProcess/GetExitCodeProcess.  The SDK is included with CVI, but is not installed by default.  If you don't have it installed, reinstall CVI, selecting only SDK or Win32API (depending on which version of CVI you have).

0 Kudos
Message 2 of 3
(3,420 Views)

Ok, I have already tried with CreateProcess() and had some link errors. It was mainly a header issue...

 

Thanks you made my day Smiley Happy

0 Kudos
Message 3 of 3
(3,409 Views)