Why won't VB ActiveX exe shutdown after using Automation close in Labview

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

You could always try setting up a type of communication where LabVIEW makes a call to the ActiveX server to shut it down. For example, you implement a function in your VB program which, when called, closes the COM port and calls End(). Just call this function from LabVIEW when you are finished and it should close out. It's worth a try.
J.R. Allen

Similar Messages

  • Why won't firefox open up again after i completly close it?

    When I close completely out of Firefox, then later try re-opening it, it won't open. It acts like it wants to open but will not. The only other way to use Firefox after closing out of it, is by shutting my computer down completely. How else can this be fix? When i go to update Firefox, it says that the program is in use and cannot update till i close out of it, but I already closed out of Firefox... Whats going on? My Firefox version is 3.5.16, and my system is Windows 7.

    See "Hang at exit":
    * http://kb.mozillazine.org/Firefox_hangs
    * [[Firefox hangs]]

  • Why won't my Mac Pro sleep after Lion is installed?

    Why won't my Mac Pro sleep after Lion is installed?

    Tell us, what hardware add ons?
    old software? that required PowerPC/Rosetta maybe.
    Look for any apps, process that used powerpc and look for updates, check out RoaringApps for a table of Lion compatible programs
    does it happen iwth a clean install?
    how about if you do a Safe Boot?

  • Why won't this song play even after I authorized the computer? It says that I need to authorize the computer, then I enter my username and password and it says the computer is already authorized. But then the song still won't play. What do I do?

    Why won't this song play even after I authorized the computer? It says that I need to authorize the computer, then I enter my username and password and it says the computer is already authorized. But then the song still won't play. What do I do?

    Use the Apple ID support -> http://www.apple.com/support/appleid/ - click through the contact information and select the iTunes, etc., hot button. You can have Apple call you or email them.
    Clinton

  • Why won't my camera work? I used the screen shot for the first time and since i did that every time i take a picture the shutter closes as though it's taking it but no picture gets taken...help! Any suggestions?

    Why won't my camera work? I used the screen shot for the first time and since i did that every time i take a picture the shutter closes as though it's taking it but no picture gets taken...help! Any suggestions?

    Hey briannagrace96,
    Welcome to Apple Support Communities! I'd check out the following article, it looks like it applies to your situation:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/ts1363
    You'll want to go through the following troubleshooting steps, and for more detail on each step follow the link to the article above:
    Try the iPod troubleshooting assistant:
    If you have not already done so, try the steps in the iPod Troubleshooting Assistant (choose your iPod model from the list).
    If the issue remains after following your iPod's troubleshooting assistant, follow the steps below to continue troubleshooting your issue.
    Restart the iPod Service
    Restart the Apple Mobile Device Service
    Empty your Temp directory and restart
    Verify that the Apple Mobile Device USB Driver is installed
    Change your iPod's drive letter
    Remove and reinstall iTunes
    Disable conflicting System Services and Startup Items
    Update, Reconfigure, Disable, or Remove Security Software
    Deleting damaged or incorrect registry keys
    Take care,
    David

  • Why do the rulers (cmd R) disappear after using Print (cmd P) ?

    Why do the rulers (cmd R) disappear after using Print (cmd P) ?

    If you are referring to Pages v5.2.2 on Mavericks, or v5.5.1 on Yosemite — the rulers do not disappear in the Pages document when using the Print (cmd+P) keyboard shortcut. The document horizontal rules are temporarily obscurred by the drop down print dialog sheet.
    I observe no evidence of disappearing rules unless they are forced via the cmd+R keyboard shortcut.

  • Why won't some of my songs, that used to sync, sync to my iPhone 5 now? There is an empty circle appearing to the left of the check marks for each of the songs that were not successfully synced.

    Why won't some of my songs, that used to sync, sync to my iPhone5 now? There is an empty circle appearing to the left of the check mark in iTunes for the songs that are not properly syncing.

    I've continued tests on different films, and tried my entire collection. I've found about two dozen that will play fine on the PC, but will not cooperate when streamed to either Apple TV or my iPad. I tried several more tests with the audio, and that turned out not to be a factor -- I could not replicate that on another test.
    I wonder if something in the header of these files is corrupted or a flag is set incorrectly or something along those lines, as the data appears to be fine -- it's just not "handshaking" with my streaming hardware and/or the Apple Home Sharing code that powers it.
    Is there any way for me to "scrub" these files and amend their headers, or get into the file and tinker with that info by hand?

  • Why the App Store ask for sq.after using it for years and how do find the answers

    Why the App Store ask for sq.after using it for years and how do find the answers

    Reset security questions
    http://support.apple.com/kb/HT5312
    If you do not have a Rescue email, you need to contact apple support, they will guide you through the process of resetting your security questions.
    https://ssl.apple.com/emea/support/itunes/contact.html

  • Why won't my ipod charge when i use my new usb

    why won't my ipod charge when i use my new usb is used?

    A new USB what? Cable? If the old one still works and the new one does not that would point to a bad new cable.

  • Why is Adobe SendNow not working anymore (after using Adobe Send)?

    Why is Adobe SendNow not working anymore (after using Adobe Send)?
    Can this be fixed?

    We are concerned that you did not have a positive experience with Adobe Send. Can you share more information about your workflow so we can try to diagnose the problem?
    If you can provide some context on whether you were using the Adobe Send website or the integration with Adobe Reader? Can you share some details on the types of files and approximate sizes you were trying to send to your clients?

  • Track Height Stays Large After Using Automation

    My understanding is that the new GarageBand track height is not changable just like the old version of GarageBand.
    The track height does get larger though when you view automation.
    I think that's nice, but in two projecs now, I've had the track height randomly stay large after using automation and it will not go back to being small.  I assume this is a bug but I really hope someone has seen this and perhaps has a cure.  It's driving me batty.
    Thanks for any help.

    That looks buggy in your screenshots.
    When I disable the automation by pressing the Show/Hide Automation button, the track will shrink again:
    Have you used the Show/Hide Automation button or the "Enable Automation" button?
    Léonie

  • Why won't Safari open PDF-documents after uninstalling Adobe Reader?

    Hi.
    I wonder why Safari won't open a PDF-document after I uninstallet Adobe Reader. Prior to my installation of Adobe Reader, Safari opened PDF's without any diffyculty.
    I've tried to reset Safari but it didn't seem to help at all.
    What do I do?
    Thanks
    Mike

    There might be a residual plug-in interfering with Safari's PDF opening capabilities.
    Installed plug-ins are listed via Safari > Help menu.
    They are located in
    /Library/Internet Plug-ins
    and
    ~/Library//Internet Plug-ins
    (tilde is home folder)
    charlie

  • Why won't my iPhone 4 charge after I installed iOS 5 update?

    After I upgraded to ops 5, my iPhone 4 won't charge in my car or using the wall charger. I can only charge it via USB on my laptop. I need help with resolving this issue ASAP! Thanks..... I absolutely love apple products and this is the first problem I've had in over 10 years of owning apple products! Thanks 

    Help! I am having exact same problem after updating my iphone4 to the 5.0.1. My husband can charge his iphone using my wall charger, so it is not bad, and I also cannot charge from his wall charger, only can charge my iphone now using my Macbook. I have tried all the 'fixes I have seen on this forum, the hard shut-down, etc, nothing has helped.

  • Why won't my HDMI output work after update my iPad to iOS6?

    After updating my iPad to iOS6 it won't play my videos on my tv via HDMI cable. The tv displays "invalid format" I don't know how to chnage the display settings on the iPad because maybe there are none. Is there some backdoor way to change the settings so maybe I can use my $40+ cables I bought?

    This is vatastrophic! I came to a congressional doctor meeting to give a lecture! It would't work!! Only iphone 4 projected muzzy picture and only on photo show!
    Are they crazy? Why did they fricked it up?
    Both were updated to iOs6!!!

  • Why won't my G5 shut down after upgrading to OS 10.4?

    Hey guys. I have a problem with upgrading my OS to 10.4.
    I am running a Late 2004 Dual 2 GHz PowerPC G5 with two internal drives. About a month ago, I upgraded the OS to 10.4.3. It was great having spotlight, but the comptuer would refuse to shut itself down. Instead, it closes all the apps and windows, and gives me a spinning ball. After about 10 minutes, the hard-drives stop clicking, after which the fans kick on and stay on full blast until I manually unplug the comptuer. I have upgraded to 10.4.6, reset PRAM, reset SMU (PMU?), verified and repaired...
    In thinking that this was a problem with the OS on the previous system, I installed 10.4.3 (my install disc) onto my second drive, which was happily running 10.3 (this was my backup). If running on this other drive, with 10.4.3, it also fails to shut down! I have done the same suite of resets and upgrades to 10.4.6, but it still doesn't shut down. Is there an incompatibility between my G5 and 10.4? Any advice about what I can do? Help!

    Contributed by Fumiaki Kawashima a Level 4 here;
    There are many reasons to become unable shutting down or restarting from Apple Menu. Some were explained by other posters.
    Most importantly, loginwindow (the parent process is launchd.) close out the user session, continue to set the device permissions and user preferences to their defaults in a restart action, or the process power off the system in a shutdown action. However, the issue proves that somewhere in those routines cannot be performed.
    Users authentication system seems to be intact because you can restart or shutdown from the login window. However, the admin account authenticated by the Tiger security systems could confuse somehow and affect loginwindow process for setting up the user environment. This may result in interfering with the process for the shutdown and restart mentioned above.
    Test if you can shutdown from the keyboard-- Holding down controloptioncommand keys, and then press the eject key.
    Check if the loginwindow plists are corrupted. To do this test, remove the followings to temporary folders on the desktop, and shutdown from the keyboard shortcut combination. Restart the computer to test the recurrence.
    /Library/Preferences/com.apple.loginwindow.plist
    /Users/HOME/Library/Preferences/com.apple.loginwindow.plist
    Try disabling Login Items for third-party applications via the Accounts system preference, if any.
    Verify whether any third-party kernel extensions (including device drivers) interfere with the loginwindow hooks process-- Start up with a Safe-mode, then test the Restart from Apple Menu to see whether it works. Also, boot into a Single-user mode, and test if "reboot" command is available from the BSD layer. The I/O Kit API for software developers provides a shutdown hook so that ".kext" troubleshooting may need to be considered. Besides, some bad programmed extension may not be unloaded automatically at a shutdown or restart.
    If the computer is configured with Irish language Input method and/or third-party Irish keyboard, try disabling them to test.
    A third-party application or custom script may interfere with the loginwindow hooks for the Shut Down or Restart. For example, if you install an application that prevents casually powering down a system, the Shut Down and Restart buttons may not work. Also, if you install a P2P file sharing application, try uninstalling it.
    As last resorts, troubleshoot a bad RAM and consider "Erase and Install" solution.
    OPTION:
    Post a part of system.log that indicates events from "localhost kernel[0]: standard timeslicing quantum is 10000 us" to the next same line.
    This may help to narrow down because restarting or shutting down the system process can initiate the procedure programmatically by sending an appropriate Apple event to Mac OS X Tiger's system process (loginwindow).
    Likewise, check console.log whether any failures is reported.
    Corrections:
    Most importantly, the loginwindow (the parent process is launchd.) close out the user session, continue to set the device permissions and user preferences to their defaults in a restart action, or the process power off the system in a shutdown action.
    However, the admin account authenticated by the Tiger security systems could confuse somehow and it may impact on the loginwindow process for setting up the user environment. This may result in interfering with the process for the shutdown and restart as mentioned above.
    Addendum:
    If you post a copy of system.log, consider to edit the Ethernet interface ID to a fake value.
    API = Application Programming Interface
    Cheers!
    DALE

Maybe you are looking for