+ 3
How to allow one instance of exe
Hi I have an application which need to have only one instance of the application active at a time. What to do when we have to restrict one instance of exe is active?
8 Answers
+ 4
I have done this in Windows via system API calls to get the list of running windows and see if your window title is in the list. I always felt that it needed to be more reliable than using the Title property, but it was the best idea I could find. It solved the problem and there were no reports that indicated otherwise.
+ 2
Use a named mutex with some unique name then check for the enum ERROR_ALREADY_EXISTS
I can't remember how the code implementation looks like but I've tried it before on Qt and it works well
+ 1
I was also wondering about that, but it's os specific, it seems.
0
Thanks Badgirl MIRI
0
Thanks venom85jojes
Does python one is platform independent? If proc.info is having extension as .exe for name, will linux also has .exe extension?
Regarding last method, singleton class is limited to one application. Right? Or is it singleton across the os and user level ?