I built an instrument driver in Visual Basic and created an ActiveX EXE server to call it from Labview (since I need to see a non-modal form (a progress bar showing time left to scan), I can't make it a dll).
The problem I have is that when the program ends, I call Automation Close to close the refnum yet the activeX exe still remains running. It may have something to do with the com port. When I run the server only calling methods that do not actually talk to the instrument, I can close it down. When I initialize the com port however, the server no longer closes down and the com port remains open.
I created another method to explicitly close the com port before I call Automation Close
but the activeX exe still remains running. When I disable the progress bar from showing and create an ActiveX dll, everything closes fine, but I would like to show the progress bar. Is there something in Visual Basic I need to do to check that it has no callers to it and close down? Any ideas?
Thanks, Trish