LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot execute VI created from loading DLL

Solved!
Go to solution

Hi,

 

I am trying to create a VI by loading a custom built DLL which references another DLL. I obtained the following error which prevents the execution of the VI.

 

VI Not Executable
The VI is not executable because of one of the following reasons:
1. The shared library or a dependent file is not installed. To make the VI executable, you must install the shared library and all support files on the computer on which you run the VI.
2. A required custom control might be empty or cannot be found. To make the VI executable, update the custom control manually.
3. The VI contains a parameter with an unsupported data type. To make the VI executable, you must replace the empty cluster that the wizard generates with a control or indicator that uses supported data types.
     

I have added the dependent DLLs in the same folder as the VI. There are no unsupported datatypes either.

0 Kudos
Message 1 of 5
(3,641 Views)
Solution
Accepted by topic author macabnv

@macabnv wrote:

     

I have added the dependent DLLs in the same folder as the VI. There are no unsupported datatypes either.


Please refer to this answer I did just this morning. LabVIEW does not know that your DLL has dependencies and simply tells Windows to load it. Windows sees that your DLL has dependencies and tries to resolve them but for Windows the directory in which your VI is located has absolutely no meaning. Windows doesn't know what a VI is nor that the request to load your DLL was made in reference to that VI!

 

Windows also doesn't allow an application to add custom search paths for DLL dependencies, so even if LabVIEW wanted it can't tell Windows to add the directory in which the VI is located to the search paths. If Windows had such a feature it would also be a potential security risk as a malicious software could very easily inject its own malware DLL that fakes a normal DLL.

Rolf Kalbermatter
My Blog
Message 2 of 5
(3,626 Views)

Thank you Rolf! That really helped.

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

Thank You

I copied my extra dlls in " C:\Program Files\National Instruments\LabVIEW 2020\user.lib\sumarrayWrapper " folder in which that dll is dependent.

Now it is working fine

0 Kudos
Message 4 of 5
(1,900 Views)

And what is THAT folder? 

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(1,894 Views)