Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Execute code when program crashes or is killed.
Message
De
23/01/2001 05:20:23
 
 
À
23/01/2001 05:07:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00467160
Message ID:
00467167
Vues:
17
>Fair enough.
>Doesn't normally happen. Just thought maybe there was some bit of API code I could use..
>

Think about this. It's equivalent to decapitating someone, and afterwards tapping them on the shoulder and saying "By the way, you no longer have a head. Any last words?"

>Thanks for the fast response.
>
>>>Is there a method that fires (or something I can do) so that I can execute
>>>some code when :
>>>a) The program crashes abnormally i.e. a c00005 error.
>>>b) the program is killed from the task manager.
>>>
>>>Most of the time my error handler and on shutdown code can handle this but these
>>>two situations I can't seem to trap.
>>>
>>
>>Pretty obviously not, since both situations are trapped out by the OS, and control is never returned to VFP once the error occurs or the shutdown is forced via TerminateProcess() through Task Manager. VFP simply is removed from memory, and no code within the process ever fires again in these situations. This is the case with most OS-trapped critical errors. The OS protects the rest of the operating environment by forcing the process to stop immediately.
>>
>>>Thanks
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform