LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulties using a DLL

I've heard back from the developer, and they have a wrapper DLL which has simple C function exports. (Its KMviaVB.dll in the last attachment). I was able to import it, and I'm going to see if it works.

 

edit: still get the same error "LabVIEW:  An exception occurred within the external code called by a Call Library Function Node. The exception might have corrupted the LabVIEW memory. Save any work to a new location and restart LabVIEW." On monday I'll reboot my machine and see if it goes away.

0 Kudos
Message 11 of 12
(666 Views)

Well, in the ZIP archive is the source for the C++ DLL. There you can see that the Direct functions call directly through the USB IO driver, while the other functions call through a pipe to the separate IO server application. But those functions are all methods of the according (singleton) class so calling them from LabVIEW with the Call Library Node is definitely not a good idea. The wrapper they provide seems to be a Visual Basic DLL which is usually a good solution to be called from LabVIEW as VB has similar constraints in calling external code.

 

However one thing I wonder is the calling convention. You have used C calling convention in the CLN. Have you tried with srtdcall instead?

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