|
Visual Studio 2008, MFC, C++
Is there a determine if, as a program starts, it is already running one or more times. Not has run, but is currently already running?
Thanks for your time
|
|
|
|
|
There's a really good example here[^].
|
|
|
|
|
Yes, that is a good article. I just wanted to know how many copies have already been started so the code could avoid putting all the opwninf dialogs on top of each other. I will elect to not add that complexity and let the user deal with it.
Thanks for taking the time to reply.
Thanks for your time
|
|
|
|
|
If you want to be able to count instance hits, have a look at the shared memory option here.[^]
This article also shows some other techniques which I think fix some of the problems described in Joe Newcomer's article first referenced above. I have used the shared memory technique to inhibit multiple instances of a program as well as manage some common data in a program where I allow multiple instances.
[I have a lot of respect for the technical output of both of these authors.]
--
Harvey
|
|
|
|