Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 24th, 2003, 02:40 PM
ricgre99 ricgre99 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 15 ricgre99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PrevInstance

I know you can use PreInstance to stop a second occurance of a app on a Windows enviroment on a single client. But if a instance is running on a client how can I stop any other client from running the same app?

Reply With Quote
  #2  
Old April 24th, 2003, 03:33 PM
defjamninja defjamninja is offline
Overly white
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Location: Fresno, CA
Posts: 83 defjamninja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > PrevInstance


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT