Nick,
in my opinion, you shouldn't keep critical information in global datastorages within DLLs. This can lead to exactly those issues you are observing. The main issue is created because you can never really tell when the DLL becomes loaded into memory and when it becomes unloaded.
Ok, in C-based languages, you can explicitly load and unload DLLs, so you can work around that loading issue, but that is contraproductive to the idea of DLLs.
In LabVIEW, you can never choose and tell for sure when loading/unloading of DLLs occur. Normally, each DLL used in your project should be loaded into memory when loading the VI containing the CLFN.
If the DLL becomes unloaded, all its memory is freed, so all global data are destroyed. Calling the DLL anew will allocate new memory with (hopefully) defaultvalues in the data-area.
So you should rewrite the DLL to retrieve the global data via parameters instead of holding it locally. Another way could be storing it to a non-volatile part of memory, e.g. something like an *.ini-file....
You maybe want to take a look into this
link for some useful infos.
hope this helps,
Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.