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
Solved

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

Posted on 2004-10-19
3
165 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.

839 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