LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL not working when loading from a project

Hello,

 

I have made a couple of .vi's that calls a function in a .dll.

In turn, this .dll that is called from my .vi is dependent on another .dll. All these files are stored in the same directory as the .vi.

 

Now, the .dll's are confidential, so I cannot post a direct example.

 

For example:

Test.vi

Main.dll

SubFuntions.dll

 

Test.vi calls Device_Find from Main.dll.

 

All the functions are working if I run this in a .vi without project. However, as soon as I import all the .vi's into a project it seems the "SubFuntions.dll" is not loaded (or it appears this way to me) as I do get an error returned from the main .dll. The error basically is telling me my device is not connected.

 

Now I have tried putting the path to the dll directory directly into the function call, but this does not work.

I tried "loading" the SubFuntions.dll in the Test.vi, does not work

 

Then I found a topic in this forum that returns the path of loaded .dlls and behold it returns the path of the .dlls that are needed but somehow in a project things are broken.

 

As soon as I close labview and start my test.vi directly, it works again. 

 

Does anybody else have an idea what is happening here?

0 Kudos
Message 1 of 2
(212 Views)

Definitively have seen similar issue in the past (but that was some DLLs from user.lib added to project), but currently unable to reproduce.

If .net used, then I have seen the "opposite" behavior — the VI, where nested .net assemblies was used cannot load these when loaded "stand alone", but everything works when loaded from the Project.

Try to create minimal code snippet where this issue is reproducible.

Attached example LabVIEW 2024 Q1 x64 saved as 2021 and DLL from CVI 2020.

 

0 Kudos
Message 2 of 2
(191 Views)