04-02-2012 03:40 PM
I'm writing a rather large LabWindows/CVI program, and occasionally will triple-click on the desktop icon, starting two copies of it. Is there some way to tell if a program is already running, so that the second copy can shut itself off?
Solved! Go to Solution.
04-02-2012 05:06 PM
Look at CheckForDuplicateAppInstance () command: the help page shows also a short programming example.
04-03-2012 01:48 PM
Or if you want to do it another way create a named mutex that the application grabs when it starts, that way if it can't grab the named mutex you know that another instance of the application is already running.
04-03-2012 04:05 PM
Ok, thanks much. I thought I remembered something being in there somewhere.
04-06-2012 04:10 AM
04-06-2012 04:25 AM
Speaking of using a resource, I used a named pipe to solve this problem in grad school once. Prof thought it was weird but he couldn't deny that it does work