1.

Solve : Can I stop a program from opening twice??

Answer»

Hi,
I have a program which  I want to be open at one time only. I have a program called popman. If I try to open it a second time it TELLS me 'open one instance only' How do they do they do that?They are probably checking the running tasks on the computer to see if it is already running.  How they do that depends on what PROGRAMMING language they wrote the program in. Quote from: Squashman on May 30, 2012, 06:05:05 AM

They are probably checking the running tasks on the computer to see if it is already running.  How they do that depends on what programming language they wrote the program in.

Another common method, which also works if the program file is renamed, or if copies of the same program are run from different locations, is for the APPLICATION to create a mutex while it is running. Other instances will also try to acquire that mutex and discover it is already in use, which they can use as an indication that the program is already running and ACT ACCORDINGLY. (If the program crashes the mutex will be closed as part of process termination)hank you for yur help
Regards
Geoffl


Discussion

No Comment Found