>>You're right about that, but that's the latest solution we will try to implement in our application. I already got a solution using the createmutex, openmutex and releasemutex in our application, but these functions deliver me another problem.
>>
>>When I start the first application, I create a mutex with the name "App1", de next time a mutex with the name "App1" cannot be created, so I create a mutex with the name "App2". De third time I start my application, when I create a mutex with the name "App1" or "App2", on both creations I get an error. When I quit my first app ( the one which created mutex "App1" ), I cannot run my app again. When I quit my second application, and first application is still running, I can run the application for a second time.
>>
>>The problem now is how to determine my first app (with mutex app1) is closed. This time, my mutex "app1" isn't released in my first app.
>
>I suggest you look at my CLSEvent download in the files section; it uses named Windows events to enforce single-instance anythings. Events do disappear when all event handles are released by all processes on a system; the sample single instance code I show does not create multiple handles to the same event if the single instance functionality is used.
Sander,
I agree with Ed. This class works perfectly and includes code to handle instancing under Terminal Services. I'll certainly be incorporating into my apps.
Mace
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only