LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow termination of application created by VB after calling LabVIEW vi on DLL

Hi,
I created the vi in LabVIEW that communicates all messages between my computer and scope. After that I compiled it to DLL. This is my declaration in VB.

Public Declare Sub sendCmd Lib "lc_sendcmd" Alias "Lc_sendcmd" (ByVal Command As String, ByVal OutPutStr As String, OutputLen As Long)

The problem is that my application can't terminate as fast as it would be. After I debugged, I found that each time I called the function, termination time is longer (eg. I call this function 10 times, I have to wait for 10s., if I call it 100 times, I have to wait for 100s.). What is the root cause of this problem?
* VB is VB6 and LabVIEW is 6.1
Champ
0 Kudos
Message 1 of 3
(2,666 Views)
Just an idea ...

it looks like a memory leak to me. Check any reference you use, VISA, etc. May be helpful to post your VI and your VB code. Sometimes it's a tiny hidden detail causing a big problem.

p.s.: you can e-mail me the code at labviewerATyahoo.com
0 Kudos
Message 2 of 3
(2,666 Views)
I agree with Lab Viewer. It sounds like you are opening resources and not properly closing them. Thus when you exit the LabVIEW dll, the code must close all the unclosed references at the end which can take lots of time.

Jeremy Braden
National Insturments
0 Kudos
Message 3 of 3
(2,666 Views)