Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Run Prevention
Message
 
À
06/06/2001 13:40:20
Bill Gravell
Indoor Purification System
Menifee, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00515926
Message ID:
00515930
Vues:
12
>Has anyone ever run across a way to determine if an application is already running and prevent it from being started a 2nd or 3rd or .... time. We have some users that forget that they have minimized an app and start it again...causes some interesting problems.
>
>Thanks,
>
>Bill

Bill,

Probably the best way to handle this is to add a table to your database that keeps track of which users (by SYS(0)) are on your system. ie. Users (Username C(100))

Set it up so that when the application starts, the table is searched for a record matching the SYS(0) of the machine. If the record's not found, then you can just add the record. The key to preventing further access is to lock the matching (or new) record. If the record can't be locked, that would indicate that the machine already has an instance of the application running.
Brien R. Givens

Brampwood Systems
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform