LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview .Net Interop assembly Error finding dll

Solved!
Go to solution

Hello

 

labview 2012 (32bit)

Windows 7 (64bit)

 

I have a labview built .NET assembly which returns an error when I try to call the .NET assembly from anything (including a labview test vi)

The assembly it seems, is trying to find a DLL which I call in the VI I use to build the assembly, is unable to, and reports an error.

If I build the assembly without calling the DLL in question, all is well and I can execute my .NET assembly VIs without any problems.

 

I don't understand why the Run time labView environment can find the DLL without any problems yet the .NET assembly cannot.

 

Has anybody encountered this before?

 

(I have included a screen shot of my test vi and the error received).

 

I look forward to any help and comments.

 

Thanks in advance

 

Chuck

0 Kudos
Message 1 of 4
(3,043 Views)
Solution
Accepted by topic author Nickleback

Welcome to LabVIEW's "DLL Hell". LabVIEW is very fickle when calling DLL's, here are some tricks to try:

1. Place the DLL you are calling along side the .NET dll that you built with LabVIEW

2. If the DLL is either ActiveX or .NET, try registering it

3. Post back if neither of those worked.

Charles Chickering
Architecture is art with rules.

...and the rules are more like guidelines
0 Kudos
Message 2 of 4
(3,033 Views)

Hi thanks for the info Charles

 

I will give that a try on Monday (once im back in the Lab)

One thing I find particularly confusing is that when you build the .NET component, a data directory is included in the path. This directory does have the DLL im missing so I was assuming that the .NET would be able to find my dll if the same directory structure were maintained. This however does not appear to be the case, even if I call the .NET component from it's build location It still can't find the ODL.

 

One other thought I had was: Do you need the header file with the Dll? (I thought the header was just to provide prototypes during the build process) but I could be wrong.

 

Chuck

0 Kudos
Message 3 of 4
(3,012 Views)

Hi Charles

 

Figured it out.

 

The problem turned out to be the "Failed to load" part of the error message. It appears there is another DLL loaded by the first that was not in the data directory. Once I found and copied that dll to the same place as my QMPhones.dll it all worked.

 

Thanks four your help

 

 

Chuck

 

0 Kudos
Message 4 of 4
(2,993 Views)