Solved

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

Posted on 2004-10-19
3
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.

751 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