Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to close an EXE gracefully (Ed Rauh's class)
Message
De
18/04/2007 09:29:32
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01217197
Message ID:
01217265
Vues:
35
I would use a semiphore file to signal the other app to close. I would use a timer in the Application object which would check for the presence of this file and when "seen" would gracefully shut down itself.
The exe which spawns this external exe when shutting down should place the token file in a "visible" directory.

Glenn


>My main application starts a second exe that remains running all the time.
>When the main application closes, the secondary exe should close automatically. Is there an elegant way to do this?
>
>
>I have used Ed Rauh class (File #9477) to launch the secondary FoxPro exe. It can be closed with his KillProc(), which runs TerminateProcess. That works, but Ed had a note in his class that says this does not shut down in an orderly fashion; it should only be used for emergencies!
>
>So the question is: how does one close the secondary exe in an orderly fashion?
>
>Cyril
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform