04-22-2010 11:05 AM
I initialize a .NET constructor defined in a .DLL file in my LabVIEW code.
Once the .DLL file is first referenced, LabVIEW locks the .DLL file so I can't update it from Visual Studio. The only way that I have found to unlock the file is to completely close LabVIEW. Simply closing the VI or project does not unlock the file.
Is there a way to force the .DLL file to unlock when the VI is not running?
LabVIEW 8.2
Visual Studio 2008
Windows XP
04-23-2010 11:18 AM
Hello StevenATK,
This is an expected behavior. Once LabVIEW call a DLL it reserves the recourses. to release the resources, you would have to close LabVIEW modify the DLL, recompile and then recall it in LabVIEW again.
Thanks and have a great day.
04-25-2010 01:30 PM - edited 04-25-2010 01:34 PM
I wouldn't say it is expected but known. Personally I expect an application to release a DLL once all consumers of it are closed. So once LabVIEW has closed all VIs referencing the DLL (standard DLL, ActiveX library, .Net assembly) it should also release any lock on those. Anything else is not really nice although for the majority of LabVIEW users probably not a problem, but it can be nasty if you develop on a library to be used in LabVIEW.
All that said I mainly develop standard DLLs and use LabVIEW 7.1.1 to debug them (mainly because it is easier to get into source code debugger mode from there and it starts up quicker than newer LabVIEW versions) and haven't noticed this locking behaviour there so far. It may be different with ActiveX or .Net DLLs however.