LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining how a LabVIEW Application was launched

Does anyone know of a way to programmatically determine how to a particular LabVIEW application was started? My setup will involve multiple LabVIEW executables. One of these is the main, top level, program. The others are basically script libraries that are also compiled into executables. I choose EXE's as opposed to DLL's because with DLL's you have to basically hard code the link inside the main program. With EXE's I can add/remove new test libraries without having to rebuild my main program. The only problem is that the test library EXE's will not really work properly if run without the main program. So I would like to find a way to have the test library try to determine if it was launched by th
e main program. If it wasn't then it will display a warning and quit automatically.
Systems Engineering - National Instruments
0 Kudos
Message 1 of 3
(2,910 Views)
If your secondary programs work only when your main program is running, you can check the windows (why do i allways suppose everybody uses windows?) task list available using LVWutil32.llb (look for it at NI web site), and see if your main app is running, if not, show the warning and close the secondary exe.
Hope this helps
0 Kudos
Message 2 of 3
(2,910 Views)
Thanks for the help. The only problem is that the secondary programs do not only require the main app running, but they require the main app to start them so that it can properly register each secondary exe. A workable solution that I have come up with is to check the command line arguements. I will have the main app run the exe's and provide a certain command line arguement. The secondary exe's will check the command line arguments to verify that that particular argument is there. Probably not the best solution, but the only one I've found that works so far.

Thanks again.
Systems Engineering - National Instruments
0 Kudos
Message 3 of 3
(2,910 Views)