LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using "call library function" vi!!

Hello!
 
I am using "Call library function" and I have a problem.
IWe have a dll (I haven´t compiled this dll, but I know that the source code is .NET), the dll has a function that is used to initialitates a driver, it has no input paremeter, and a return value (boolean).
When I configure the "Call library function" , I browse the dll, but it doesn´t appear the name of the functions that contains this dll. Could it be a problem in a dll?Do you have to compile the dll, doing "something special"?
Is posible to use this vi with a dll which its source code is .NET? What calling conventions can we use? I have read something about calling conventions in "Using external code manual" but it doesn´t clarify me.Could you explain me more about calling conventions? 
 
Thaks in advanced!!
 
Graci
0 Kudos
Message 1 of 4
(2,638 Views)
Sounds like in the compilation of the DLL the function wasn't set as an dllexport function.

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 2 of 4
(2,628 Views)
The question is how the DLL was designed to be called. Typically if the DLL is a .NET DLL (aka .NET assembly), then you can't call it with C-style calls (such as the Call Library node). Instead, you need to use the .NET palette, which was introduced in LV 7.
 
It is possible to have a .NET assembly expose C functions that can be called by the Call Library node, but it's very rare. I'm assuming that you most likely need to use the .NET nodes in LabVIEW.
0 Kudos
Message 3 of 4
(2,622 Views)


@Gracinda wrote:
Hello!
 
I am using "Call library function" and I have a problem.
IWe have a dll (I haven´t compiled this dll, but I know that the source code is .NET), the dll has a function that is used to initialitates a driver, it has no input paremeter, and a return value (boolean).
When I configure the "Call library function" , I browse the dll, but it doesn´t appear the name of the functions that contains this dll. Could it be a problem in a dll?Do you have to compile the dll, doing "something special"?
Is posible to use this vi with a dll which its source code is .NET? What calling conventions can we use? I have read something about calling conventions in "Using external code manual" but it doesn´t clarify me.Could you explain me more about calling conventions? 
 
Thaks in advanced!!
 
Graci


A .Net DLL does normally not export C functions but a .Net interface instead. You can't use the Call Library Node to call a .Net interface but need to use the specific .Net functionality in LabVIEW.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 4
(2,613 Views)