Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting multiple instances of FPD26
Message
 
 
À
10/09/1999 22:56:23
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00263532
Message ID:
00263634
Vues:
22
Ed: Thanks. Why didn't I think of that.
Spencer

>I am running FPD26 under Win98 with no problems. Is there a way to have FPD26 detect whether a previous instance of the program is running?
>>Thanks for your help.
>
>You obviously can't use any of the Win32 API calls, since it's DOS. One trick I've used in the past is to use FCREATE to open a file for low-level I/O in a fixed, known location; if it returns a -1, then either it's already opened by someone, or you don't have the necessary rights to create a file where you've specified (ie you tried writing to a CD, or a network drive where you only have read permissions.
>
>Leave the file open as long as the app is running; when FPDOS exits, it'll close the file and the next FPDOS session will be able to do the FCREATE
>
>
>>SFried
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform