LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot execute a library created with Labview 2011 in visual C++

I created a very simple DLL in Labview 2011, then, I try to call this DLL from a Visual C++ 2005 application.

 

I have tried to load the DLL at compilation time with the .LIB and .H files, and also dynamically with AfxLoadLibrary.

 

 

When I try to call the library function, it works fine, but the second time i call the library freezes the app.

 

 

all the library does is to show a simple dialog box and that's it, no params, no returns, no nothing,

 

but it freezes the app, why the VI works in Labview, but in DLL doesn't?

0 Kudos
Message 1 of 2
(2,243 Views)

Hi Alveru,

 

What might be happening is that the process never ends and when you try to re call it, it fails and that it is why your app freezes, what you can do to probe is that is what is happening is to test your DLL directlly in LabVIEW with the Call Library Function Node so you can import the DLL and test it. If it also freezes or not work as expected the problem is with the DLL.

 

The proceses are automatically closed by LabVIEW at the moment the VI stops running; however, when you deploy the vi, you need to close them manually.

 

Try this out!!

 

Regards,

Luis Elias
NI VeriStand and HIL Product Manager
0 Kudos
Message 2 of 2
(2,213 Views)