Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close a 2nd VFP exe
Message
De
20/07/2007 11:47:32
Thomas Ganss (En ligne)
Main Trend
Frankfurt, Allemagne
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01242070
Message ID:
01242373
Vues:
17
>Thanks for the suggestions. I went the semaphore file route and it's working well. One of the issues that I didn't anticipate and makes the semaphore route easier and simpler is that I actually have two different apps that can call the 2nd app, and if either one of them are running, I need to leave the 2nd app open. Using a semaphore file, when either of the two apps that calls the 2nd app startup, I create a semaphore file in the user's folder getenv("userprofile"). The semaphore file is different for each of the two startup apps. Then when they quit either one of these, it erases it's semaphore file.
>
>The 2nd app, which can be called from either of the first two apps, has a timer that checks for either of the semaphore files and if neither is found, it closes.
>
>Tested and working well.

Yupp, but less bullet proof than a lock on 2 record table for instance - in case of C0000005 the routines deleting the semaphore file might not be called, whereas the lock ceases to exist on process death. And not much more coding needed <g>.

regards

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform