From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Standard dll call versus .net dll

Hi,

 

Hopefully I can ask this question correctly. I am using a LabVIEW (8.5)  Call Library Function to communicate with a dll written by our software group in C++ .net. We call our dll the 'USB Test Fixture.dll'. The 'USB Test Fixture.dll' internally contains a call to a vendor's dll (CyUSB.dll) which is written in the .net format. Whenever I try to make a call to the 'USB Test Fixture.dll' I get an error log message from 'USB Test Fixture.dll' essentially stating that it cannot locate the CyUSB.dll. 

 

I know this is a very very general scenario, but any suggestions as to what might be going on? 

0 Kudos
Message 1 of 4
(3,564 Views)

Hi jim,

 

I thing You need to register that dll.

 

To register a DLL open a command prompt, navigate to the folder where your ActiveX control is, normally the system32 folder of Windows, and type

regsvr32 <name of dll file>.

 

Rgds,

Venky

0 Kudos
Message 2 of 4
(3,548 Views)

Hi there

 

Make sure the CyUSB.dll can be found in the systems search path. That is

 

- The folder in which the calling application is located (e.g. LabVIEW.exe or in case you compile a LabVIEW application the folder your app is located)

- The windows system32 folder

- Any of the folders contained in the PATH environment variable

 

You only can/need register dlls which are COM DLLs.  

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 3 of 4
(3,512 Views)

Jim77215 wrote:

Hi,

 

Hopefully I can ask this question correctly. I am using a LabVIEW (8.5)  Call Library Function to communicate with a dll written by our software group in C++ .net. We call our dll the 'USB Test Fixture.dll'. The 'USB Test Fixture.dll' internally contains a call to a vendor's dll (CyUSB.dll) which is written in the .net format. Whenever I try to make a call to the 'USB Test Fixture.dll' I get an error log message from 'USB Test Fixture.dll' essentially stating that it cannot locate the CyUSB.dll. 

 

I know this is a very very general scenario, but any suggestions as to what might be going on? 


Well, I think you are messing up something. A .Net DLL can not be called with the Call Library Node but needs to be accessed with the .Net functions in LabVIEW. Such a DLL does not export any functions normally and the Call Library Node can only access exported functions from a DLL.

 

So you probably have a normal DLL that then accesses a .Net DLL. .Net DLLs However are only searched by Windows in the application directory (where LabVIEW.exe is for your development environment or where your app.exe is for a built LabVIEW app) and in the Global Assembly Cache (GAC). No other directories are searched by .Net by default, in order to minimize the chance to create what is commenly called DLL hell.

 

Rolf Kalbermatter 

Rolf Kalbermatter
My Blog
Message 4 of 4
(3,500 Views)