LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to keep a variable value between two runs ?

I don't remember the function that allow to have persistent variable ( to keep the value inside the exe file ).I don't want to use a file.
What is the best way to do that ?.

Thank you
0 Kudos
Message 1 of 2
(3,057 Views)
To be able to store variables between runs of a process, you will need to persist it in a file or perhaps in the registery. Because as soon as the process ends, the OS will cleanup any memory locations that were tied to the app. This does not include globals, static globals, file handles. You could just save the state information in the registry and this way, there wont a file that a user could accidently delete. The CVI programmers toolbox has functions that let you manipulate the registry.

Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
Message 2 of 2
(3,057 Views)