LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

exiting then relaunching

I would like to exit my CVI program with the exit() command, then
re-launch the program. How can I do this?

Bruce Mihura


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 2
(2,918 Views)
I solved this problem by creating a "parent" process who's only job was to launch the "child" process and wait for it to complete. If you return a value with the "ExitProcess" Win32 SDK call from the child to the parent, you can notify the parent that the child has terminated and that it wants to be restarted, which the parent process can readily then do. The parent can use the GetExitCodeProcess Win32 SDK call to retrieve the child's exit code. The Win32 SDK distributed with Measurement Studio describes the ExitProcess function.
0 Kudos
Message 2 of 2
(2,918 Views)