Solved

How can I ensure only one instance of my application is running?

Posted on 2004-10-19
3
159 Views
Last Modified: 2013-11-20
As the title states.  Basically, I want to check in my main OnInitDialog method upon startup that my application is not already running, else terminate.
0
Comment
Question by:reidy_boy
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
SteH earned 125 total points
ID: 12348187
Have a look at
http://www.flounder.com/nomultiples.htm
its covering most things needed.
0
 
LVL 13

Expert Comment

by:SteH
ID: 12348211
In the article you find that the check should be done in InitInstance of the CWinApp derived class.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12349024
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 152
sumDigits challenge 9 122
has22 challenge 11 78
fizzArray2 challenge 1 72
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now