Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TMP files hanging around..
Message
 
À
03/09/1997 16:58:41
Gino Miceli
Lan Professionals, Inc.
Bay Shore, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00048372
Message ID:
00048463
Vues:
23
>I have a 'launcher' application run my APP. This controlling EXE creates a cursor or two while loading. Since this EXE does not get control back from the APP, it never cleans up after itself (the TMP files). How can I force it to clean up these files?

Gino,

It depends on whether the TMP files being left behind are the result of creating the cursors or temporary files that FoxPro creates automatcially. If it's the former, a CLOSE ALL on exit should do it. However, if it's the latter, then creating a procedure or non-visual class in the controlling EXE to handle the shutdown will do the trick. For example, a SET PROCEDURE TO MyProc will make the procedure file available to any called application. All you have to do is add the procedure file to the called applications, but mark it as excluded. When the shutdown procedure is called, control is returned to the EXE. Of course, if you close the procedure file in the application it won't work.

I took the solution to this problem a step further. On startup, my application creates a batch file to delete left behind TMP files. If the user exits normally, the shutdown routine deletes it. However, if they exit by either re-booting or turning the machine off, the batch file is left behind. My installation routine inserts lines in the user's AUTOEXEC.BAT to look for the file, and if present execute it. If it's found, AUTOEXEC.BAT will delete it after execution.

HTH,

George
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform