LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL not load correctly, only when selected manually

Hi,
 
I'm having a strange problem with a DLL.
When I open my VI it shows no error and the path in the Call Library Function is correct.
When I run the VI, labview causes an exception within the external code called by the Call Library Function.
 
I know there's no issue with the DLL code though.
 
When I open the Call library function and select the DLL manually the VI works fine. I save the VI, but when I close labview and open the VI again I get the exception again and have to repeat the manual selection process again.
 
I'm currently using labview 7.1.1 but have 8.0.1 installed on the same machine. Both versions give the same error.
 
Does anyone know what can be the rootcause of this behaviour and how to solve it ?
 
Regards,
Marcel Janssen
 
0 Kudos
Message 1 of 5
(3,046 Views)

Hi Marcel,

Can Windows find the DLL in it's search path or is it in the same folder as your VI? You could try and remove the absolute path for the DLL in the call library node so that it only contains the dll name. This way LabVIEW will search for it when the VI containing the Call Library node is loaded in to memery.

You could also try to recompile the VI heirachy. Open the VI containing the call Library node, press and hold both the <ctrl> and <shift> keys. Now click with you mouse on the run button. This will force LabVIEW to recompile the heirachy of this VI.

What if you create a new VI and place a Call Library node and configure it for the same DLL. will this fail also?

Hope this helps

Thanks

Karsten

0 Kudos
Message 2 of 5
(3,033 Views)

Hello Karsten,

 

Yesterday I managed to solve the issue. Indeed this was path related.

Somehow the path depth seemed to deep and when moving the DLL to a different location it worked well.

I will also try your suggested option of removing the absolute path. Actually I think this method would be nicer to use.

The only thing I worry about is how this will affect executables that I build. How wil they manage to find the DLL ?

Regarding the executables, I don't distribute the DLL because this is a DLL supplied by a the hardware supplier and already installed by the end-user of my system when they install the drivers.

 

regards,

Marcel

 

0 Kudos
Message 3 of 5
(3,030 Views)

Hi Marcel,

See the following documents for details on finding DLLs in LabVIEW and a LabVIEW Build Executable

LabVIEW Searching for a DLL Used in the Call Library Function Node

My Stand-Alone Executable Cannot Find My DLL, Even Though I Have Specified the Path for the DLL

For you information in LabVIEW 8.2 you can specify the DLL path trough a Path input on the Call Library Node.

Thanks

Karsten

0 Kudos
Message 4 of 5
(3,025 Views)

Thanks Karsten, real good info there. This solves the issues I'm having.

 

0 Kudos
Message 5 of 5
(3,007 Views)