August 27th, 1999, 07:51 PM
I've been wondering how you can make an application know if there is already another running instance. The reason is that I don't want the user opening this program more than once at a time. Does anybody know how to do this? Thanks for the help.
Sef
August 27th, 1999, 09:10 PM
There are a number of ways. Perhaps the most common is to set up a named semaphore which you can check at program startup. If the semaphore is not already in use, then your program is not running so set it and then let your program start as usual. Next time someone starts your app, the semaphore will now be set when you test it. See "CMutex" and its cousins for details.