Second copy of app launching

Shari shari at gypsyware.com
Wed Jan 25 06:52:31 CST 2006


Another way is to have your application either create a text file on 
launch, or write something to it.

Then, anytime the app launches it looks for that text file, and if 
the file exists or the wording inside of it say something specific, 
the app is running.

On quit, either delete the file or write something else to it.  The 
key here is to catch any type of quit the user uses.  If the program 
doesn't go thru your quit routine, the file will not be changed on 
quit, and will give a false positive on the next launch.

Mine has a text file that on launch, it opens the file for read, 
reads from it etc.  If the word Windows is in the text, my app is 
already open.  If it is opening for the first time, it writes 
something with the word Windows to the file, signifying that the game 
has been launched and is running.  On quit, it writes something else 
to the file.

Shari

-- 
Mac and Windows shareware games
http://www.gypsyware.com


More information about the metacard mailing list