bmihura -
Global variables in DLLs retain their value as long as the DLL is loaded.
The load options in the sequence file properties defines when TestStand loads and unloads the modules that the sequence file calls. By default this is to use the step unload option. The default step setting is to unload when the sequence file is closed.
A sequence file is closed when the file windows is closed in the editor or when the last execution that used it is closed.
If you do not want the module to be unloaded, you must instruct the operating system to keep it in memory by calling the SDK function "LoadLibrary". A handle is returned and you normally call "FreeLibrary" when you are done. If you never call "FreeLibrary" the DLL cannot be unloaded from m
emory until the process completes.
Note that you can call "LoadLibrary" on yourself in your DLL. I recommend only calling this once because you are returned a resource(handle) that takes up memory.
Scott Richardson (NI)
Scott Richardson
https://testeract.com