LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a LAbVIEW dll from VB

I have a small LV application which monitors several temperature tranducers. To configure the display I use a sub-VI set up like a dialog box to get user input and then save the configuration. I was recently asked to compile the VI as a dll to be called from a Visual Basic program and pass the temperature readings on demand. No problem there. However, I wanted the VB program to also be able to request the dll to show the configuration dialog. This is causing major crashes (Win2K system. Is this just not possible?
Thanks
0 Kudos
Message 1 of 2
(2,823 Views)
In general, having the VI open its front panel shouldn't cause any problems. I just tried it out on my Windows 2000 machine and it worked fine. I started with the example "Using Microsoft Visual Basic to Call LabVIEW DLLs That Pass Numeric Data Types" off of NIs website. I then modified the VI so that it called a subVI to show its front panel. I then rebuilt the dll and called it from Visual Basic. The front panel appeared fine and didn't crash.

Some things to note/watch out for:
1. When I defined my prototype I used standard calling convention.
2. The subVI contains a property node to show the front panel.
3. In the build script on the VI Settings tab, the subVI was configured so its front panel was not removed.

I have attached the parts of
the example that I modified for your review.
Message 2 of 2
(2,823 Views)