Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine # of times that VFP .exe is running on a PC
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00779412
Message ID:
00779441
Vues:
8
>Is it possible to determine whether a VFP 7 .exe is running more than once on a PC running either W98, ME, 2000 or XP?
>Here is my scenario:
>I don't think I can use a semaphore file without a lot of work because most forms, etc are closing all tables upon release.
>Also, creating a file when the app starts and then deleting it upon exit can result in support calls if the app doesn't terminate gracefully.
>
>TIA.


Alan,

Another solution is to create a "users" dbf file and lock a record in it whenever your app starts. If the next instance of the app the user tries to load can lock the record then no other instance is running. If it cannot lock the record then another instance must already be running. Even if your app crashes it will release the lock on the control record and free it for the next instance.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform