Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » How to check whether application is running
Re: How to check whether application is running [message #38777 is a reply to message #27874] Wed, 16 January 2013 17:38 Go to previous messageGo to previous message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Except at least on Windows, if you have rights to execute the program, finding out what an application is creating is a matter of running a debugtool. The app doesn't need debugsymbols for that.
So this scheme would only work if 2 mutexes were used:
The app would then:
1)generate a new name and create a new mutex
2)try to open a mutex with the previous name stored in an encrypted file and if succeeds store this name, if not terminate.

other ideas that I used in practise
1)instead of displaying an error message, you can also bump the running instance.
2)instead of terminating, close the running instance by sending a signal to it, wait for it to terminate, if it doesn't terminate on time, forcefully kill it. Then proceed starting the app.

[Updated on: Wed, 16 January 2013 17:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TopWindow minimum size
Next Topic: Timeout on PromptYesNo?
Goto Forum:
  


Current Time: Wed May 08 08:16:54 CEST 2024

Total time taken to generate the page: 0.02519 seconds