LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to get the App name?

Is there a function all that will return the name of the CVI application that executes that function call?  I need to determine if I'm using the real version of the app, or the simulator version.
0 Kudos
Message 1 of 4
(2,962 Views)

The name of the executable is the first parameter of main (): argv[0]. You can retrieve it at program start and store in a global variable for future use during program life.

The name retrieved is the executable one in case of a final application (YourApp.exe) and the debug executable in case you are running in the IDE (usually YourApp_dbg.exe)



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(2,952 Views)
Perfect!  I never stopped to see what argv was.  This works like a charm.
 
Thanks...
0 Kudos
Message 3 of 4
(2,951 Views)
Following items in argv array, if any, contains the command-line parameters set when the program is launched, argc holds the counter of array elements. These are a common way to customize the expected behaviour of your application before launching it.
When operating in the IDE, command-line parameters can be set with Run options >> Command line menu tem.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(2,941 Views)