AFAIK there are mutexes on windows.
every application can register a mutex in the os. Other apps can check
whethera specific mutex is registered, an so know whether the app is
running.
I'm interested in that, too.
At the moment I use 'lock files' as a simple mechanism for all my apps, but that can't work with 'foreign' apps, and has some issues with my on, too.
Accessing the process IDs of Windows via PDH (as explained in win32api docs) doesn't work reliably either (you always get only the PIDs of the processes that were running as you started your app). One could use some external PID list tool, but I don't like that...
What do you mean with mutexes on a system level? Python's mutex module seems to be only for functions within one app.
Best regards,
Henning Hraban Ramm
Südkurier Medienhaus / MediaPro
Support/Admin/Development Dept.
I have the following scenario:
I use the innosetup installer on windows, that should drop a message
if an older instance of the application is still running.
so in my application I have the following lines at startup:
if wx.Platform == "__WXMSW__":
# register a mutex for the running instance, so that
# the installer will drop a message
from win32event import CreateMutex
mutex = CreateMutex ( None, 1, 'fotobuchxxlMutex' )
The fotobuchxxlMutex is registered in the win os that is checked by
the innosetup installer.
thats all, and it works fine. of course only on windows in this way.
Alex Greif
···
________________________________________
http://www.fotobuch-xxl.de/
On 11/23/05, Henning.Ramm@mediapro-gmbh.de <Henning.Ramm@mediapro-gmbh.de> wrote:
>AFAIK there are mutexes on windows.
>every application can register a mutex in the os. Other apps can check
>whethera specific mutex is registered, an so know whether the app is
>running.
I'm interested in that, too.
At the moment I use 'lock files' as a simple mechanism for all my apps, but that can't work with 'foreign' apps, and has some issues with my on, too.
Accessing the process IDs of Windows via PDH (as explained in win32api docs) doesn't work reliably either (you always get only the PIDs of the processes that were running as you started your app). One could use some external PID list tool, but I don't like that...
What do you mean with mutexes on a system level? Python's mutex module seems to be only for functions within one app.
Best regards,
Henning Hraban Ramm
Südkurier Medienhaus / MediaPro
Support/Admin/Development Dept.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
--