Use VI already running using ActiveX

  Is there a way to make it fail if it doesn't find a VI-a already running?  Any ideas on why it's opening a new VI instead of reusing the one in memory.  Is there a setting somewhere that would explain why this happens on the test machine and not my development machine.
  I'm currently trying to control a VI from c++ using the ActiveX server on the VI in LabVIEW 9, I'm building the application using MS VC++ express 2010.  This VI(lets call it VI-a is invoke node to get and set data on another VI-b.  For testing I have a copy of VI-b that is gutted so it loads into memory but doesn't run, it connects to hardware I don't have in my development setup.
#import "PATH\LaVIEW.tlb" 
static LabVIEW::_ApplicationPtr         pLVApp = (LabVIEW::_ApplicationPtr)      NULL;
static LabVIEW::VirtualInstrumentPtr    pVI    = (LabVIEW::VirtualInstrumentPtr) NULL; 
void init_VI()
    //Multithreaded application
    CoInitializeEx(NULL, COINIT_MULTITHREADED); 
    pLVApp.CreateInstance("LabVIEW.Application"); 
    //Error checking not shown
    return; 
void connect_to_fp()
    HRESULT            hr                      = S_OK;
    char                    password[60]    = "";
    VARIANT_BOOL  reserveForCall  = VARIANT_FALSE;
    long                    options             = 0x20;
    //Multithreaded application
    CoInitializeEx(NULL, COINIT_MULTITHREADED);  
    pVI.CreateInstance("LabVIEW.VirtualInstrument");
    pVI = pLVApp->GetVIReference(vi_path, LPCTSTR(password), reserveForCall, options); 
    //Error checking not shown
    hr = pVI->OpenFrontPanel(VARIANT_TRUE, LabVIEW::eVisible)
    return; 
I wasn't able to try commenting out the CreateInstance call on the test machine.  However removing it has had no effect on my development machine.
Details of my setup: 
  On my development machine I can run VI-a before starting the c++ application and it will connect and use the VI-a that is already running in memory or I can let the c++ application bring up VI-a.  When I was running a test recently when I would get the reference to VI-a it would open a new FP for VI-a (I'm assuming it started a new instance of VI-a) instead of using the one that was currently loaded and running, the VI-a also isn't running like it normally does.  The VI-a gets it's values from VI-b once at init but it never updates them again.  Also there is a switch on VI-a that controls a status indicator that doesn't update when the switch when it is toggled.  There is another indicator on a separate tab that shows how long a loop took to execute that is changing, which is why I believe it is at least partially running.
 My biggest issue is that I haven't been able to recreate this on my development machine.  Anytime I have VI-a open and running my c++ application reuses that one instead of trying to open a new one.  My connection code is pretty much strait out of the c++/ActiveX example from NI. 
Thanks. 
Solved!
Go to Solution.

I haven't found an answer to erroring out instead of creating a new instance but I did find a way to deal with the project issue.  If you create an instance, then open the project, then open the VI from the projects instance it will work.  New init_VI:
 void init_VI()
    //Multithreaded application
    CoInitializeEx(NULL, COINIT_MULTITHREADED); 
    pLVMainApp.CreateInstance("LabVIEW.Application"); 
   pLVPrj = pLVMainApp->OpenProject(PATH_TO_PROJECT); 
    pLVApp = pLVPrj->GetApplication();
    //Error checking not shown
    return; 

Similar Messages

  • After closing out, FF will not restart, says it is already running forcing me to reboot. I have removed and re-installed FF and still get the same message when trying to open the internet using FF. How can this be fixed?

    When I close out Firefox, and return later to use the internet, I click on Firefox and it gives me a message stating that Firefox is already running and needs to be closed before restarting or reboot my system. This occurs every time Firefox is closed and attempt to re-start it,,, not only at times,,,, EVERY time.
    I have tried removing Firefox from my system and re-installing to fix this issue however,,, this did not work. After re-installing, I still get the same message when attempting to restart Firefox.
    I have also tried Ctrl, Alt, delete to open the task manager and find there is no task to close.
    I do not have any problems when using IE, I prefer to use Firefox as it is faster and crashes less than IE.
    I am very frustrated at having to reboot my system each time I want to use the internet.
    How can this problem be repaired?

    There are various causes for this error, see [[Firefox is already running but is not responding]] for details.

  • When I use a GSI external antenna for WiFi I first get a message that "Firefox is already running but not responding etc", and then Firefox crashes. Can anyone help please?

    Because of weak WiFi signal I need to use an external antenna (GSI USB wireless WIFI long range network adapter). My computer can see the signal clearly and shows that I am connected to the right network. But when I try to launch Firefox I get a message that "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." When I click "OK" Firefox tries to load websites but gives up and reports "Problem Loading". It looks like Firefox is having trouble "seeing" the signal from the external antenna. What do I need to do please?

    Try Ubuntu support, I don't think your problem is with Firefox - it will use the connection that the Operating System "makes". I'm a real noob with Ubuntu myself, and don't think I can help you figure out the problem.
    http://ubuntuforums.org/

  • I use Firefox to access the internet-but when I go off the internet but don't shut down, then go back on Firefox it won't open because "it is already running". Task Manager doesn't show that it is operating so I can't shut it off. What to do?

    It is in the question but to repeat.
    1. When I go online I use Mozilla Firefox
    2. While I am doing other work, I usually close the internet.
    3. If I go back on the internet and click on Mozilla it won't come up, stating that "it is already running".
    4. Despite that, when I open Task Manager, it doesn't show that it is running so I can't shut it down or open it.
    5. If I log off or shut off the computer, then after I log in or reboot the computer, I can open Mozilla.
    Thanks from a Mozilla fan.

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    See "Firefox hangs when you quit it":
    *https://support.mozilla.com/kb/Firefox+hangs

  • I have the problem described in /forums/knowledge-base-articles/704725. (Firefox is already running but not responding). My only solution is to use Task Manager to end the firerfox process. I am the only user and there are no other profiles on my system

    Occasionally I have the problem discussed in /forums/knowledge-base-articles/704725 , Firefox is already running. My only fix is to use Task Manager to end the firefox process. At such tmes, I have no other instances running.

    '''https://support.mozilla.org/questions/997866?esab=a&s=&r=1&as=s'''.<BR>
    This is not a cure but will make it easier if Firefox locks up.

  • Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. I have a wndiws 7 system and use a Intel core processor. I have restarted several times and still ge this

    Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system. I have a wndows 7 system and use a Intel core processor. I have restarted several times and still ge this error. I have also tried to reinstall firefox and get the same error
    == This happened ==
    Every time Firefox opened
    == today ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; InfoPath.2; .NET4.0C; AskTbUT2V5/5.8.0.12304)

    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    <u>'''Safe Mode'''</u>
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.

  • When i go to sign on it says firefox is already running, but is not responding and to close exisiting FF process or restart system. Have used FF for years with no problems?

    I have been using FF to acess the web for years but recently (within the last few days) I get the above message. I have deleted the ff I was using and downloaded the 3.6 again but continue to get the same message

    Hopefully this support article is what you need:
    https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding

  • Firefox will not open, getting message "Already running, but not responding", also can't use TaskManager to close it.

    Have FF4, downgraded to FF3.6.17. Still not working.
    When I close out of FF, it still is in the processes tab of my Task Manager. And it won't let me do the "End Process" technique.
    End up having to restart computer... Pain in butt.
    Also even though I uninstalled Firefox 3.6.17, I still have these files which I can't delete.
    [IMG]http://i52.tinypic.com/727ubb.jpg[/IMG]

    Sounds like Firefox is "hanging at exit". That problem is frequently caused by an Extension or a Plugin. Read all of the following articles.<br /><br />
    NOTE: Establish a habit of exiting/closing Firefox with Firefox button > Exit or File > Exit to allow an orderly shutdown of Firefox and closing of all of the files that Firefox has open.
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #*Mac users: http://techheavy.com/2011/02/the-mac-task-manager/
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably an Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • I am unable to start Firefox. Getting message that it's already running. Can't find my profile using "%APPDATA%\Mozilla\Firefox\Profiles|". What do I need to do

    I am unable to start Firefox. Getting message that it's already running. Can't find my profile using "%APPDATA%\Mozilla\Firefox\Profiles|". Rebooting my computer didn't help. Since I experienced that problem I also noticed that all my bookmarks which I had copied into the Windows Internet Explorer have also disappeared. I am using Firefox as my primary search engine and usually don't use Internet Explorer. I am running Windows 7 on my machine.

    Try this add on [https://addons.mozilla.org/en-US/firefox/addon/open-profile-folder/ Open Profile Folder]

  • Is there a way to open a second firefox instance using a shortcut key (i.e. Ctrl + Alt + 9), while a first instance is already running?

    This happens both in Windows XP and Windows 7. Firefox is the only application that does not allow this consistently (this works with MS-Word, Google Chrome, Notepad etc.).

    Yes, but {Ctrl + N} is useful only when you are already in Firefox. I meant quickly launching Firefox while using another application via a user-assigned shortcut key. For example, I am writing a text in MS-Word and I want to run a quick Wikipedia search; now, if Firefox is already running in the background, my shortcut for Firefox (e.g Ctrl + Alt + 9) won't do anything - it will only launch Firefox, if it is the first Firefox window to be opened. Thanks anyway though!

  • "FF is already running, but is not responding. To open a new window, you must first close existing FF, or restart your system. So have to use Int Exp Would like to talk about this, but always get the results that support is closed

    I prefer using Firefox, and do all the time. However, this used to happen occasionally, then go away. Now it is happening all the time.
    If I try to enter aol email, I receive the message: "Firefox is already running, but is not responding. To open a new window, you must first close the existing FF process, or restart your system.
    And I can find no way to close it when that happens.
    Would really like to have this solved. Do not believe it is a computer or internet problem - just had my computer repaired because of a faulty disc drive. It is a three year old Dell, with Windows XP

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    *https://support.mozilla.com/kb/Firefox+hangs
    * http://kb.mozillazine.org/Profile_in_use
    * https://support.mozilla.com/kb/Firefox+is+already+running+but+is+not+responding

  • Frequently, when waking the computer up from Standby and opening a new browsing session, I get a message that Firefox is already running and needs to be closed, even though it was closed during the previous session. I use Task Manager to close it.

    Internet connection is AT&T highspeed DSL via Westell modem. Antivirus is AVG 2011. OS is XP Home SP2, circa 2002.

    * [[Firefox is already running but is not responding]]
    -> Profile in use
    * http://kb.mozillazine.org/Profile_in_use
    Check and tell if its working.

  • Have noticed that after closing Firefox -- when I try to reopen it - get mesg that it is already running -- Am using vers. 6

    Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.

    Must be the "hang at exit" problem. <br /><br />
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • When re-starting FF, after a close, FF says that there is FF already running. Have to use task m. to close firefox.32*exe.

    after using task manager to close the firefox.32*exe process, then FF will restart properly. Doesn't seem to happen if the laptop is powered off.

    Must be the "hang at exit" problem. You already know how to do Step1; now just determine which Add-on (Extension or Plugin) is causing the problem.<br /><br />
    #Stop the Firefox process:
    #*[http://kb.mozillazine.org/Kill_application Mozillazine - Kill application]
    #*Windows 7 users click [http://www.techrepublic.com/blog/window-on-windows/reap-the-benefits-of-windows-7s-task-manager/2576 here]
    #Why Firefox may hang:
    #*[http://support.mozilla.com/en-US/kb/Firefox+hangs Firefox hangs] (see Hang at exit)
    #*[http://kb.mozillazine.org/Firefox_hangs Firefox hangs (Mozillazine)] (see Hang at exit and Closing Firefox properly)
    #*[https://support.mozilla.com/en-US/kb/Firefox+is+already+running+but+is+not+responding Firefox is already running but is not responding]
    #Use Firefox Safe Mode to find a problem with an Extension or Plugin:
    #*Don't check anything when entering Safe Mode, just continue
    #*If the problem does not occur in Safe Mode it is probably and Extension or Plugin causing the problem
    #*See:
    #**[[Safe Mode]] and [http://kb.mozillazine.org/Safe_Mode Safe Mode (Mozillazine)]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    #**[http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    #**[http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • PDFs opening twice using 'open with Firefox' when browser is not already running

    Windows 7 - Firefox 15*-16*
    if Firefox is not already running, opening a PDF document using Firefox (eg right-clicking PDF from desktop, selecting 'open with > Firefox) is always causing Firefox top open the PDF in two different windows.
    Happening with PDF plugins enabled and disabled.
    Maybe this is a bug and I should report as such?

    You can check for problems caused by DDE in Windows.
    *http://kb.mozillazine.org/Windows_error_opening_Internet_shortcut_or_local_HTML_file_-_Firefox

Maybe you are looking for