
April 24th, 2003, 03:33 PM
|
|
Overly white
|
|
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83
Time spent in forums: < 1 sec
Reputation Power: 6
|
|
|
You could just write a "lock file" to a common directory on the server. Then when your app starts have it look and see if the file exists. If it's exists then close the program otherwise starter up. When a user closes the app have it delete the lock file. The only problem with this is that if the app crahses then your lock file will not get deleted. To protect against this your going to have to come up with some solution to check that the user who created the lock file is still using the app. Maybe you could write a program to run on the server that will check the lockfile and see if anything has been written to it. If it has changed then keep it otherwise delete. Then have the client app every 10 mins or so write something like the time to the file.
|