|
-
August 27th, 1999, 07:51 PM
#1
How to tell if your program is already running
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.
-
August 27th, 1999, 09:10 PM
#2
Re: How to tell if your program is already running
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|