Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for easy answer to error msg.
Message
De
07/01/2000 11:03:10
 
 
À
07/01/2000 01:39:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00310673
Message ID:
00314501
Vues:
20
>>CLOSE ALL
>>QUIT
>
>Isn't QUIT supposed to close all anyway?
>

QUIT is supposed to be well-behaved, and I'd always assumed up until a few months back that it made the standard ExitProcess() call to sghit down, which should close the shared .DLLs context and decrement it's reference flag. I discovered that at times it didn't always clean up the way I'd expected, especially with API calls that allocated NetAPI buffers, where I didn't clean them up properly as described in the MSDN.

Explicitly closing VFP's files, releasing memory variables, and then calling ExitProcess() seems to shut things down more consistently for me. In addition, using ExitProcess() allows me to return a termination code other than 0 if I want/need to do so. As I pointed out, it was a SWAG, but one with at least a little empirical data that it might be a workaround.

CLOSE ALL shouldn't be necessary, but I've seen doing RELEASE ALL/CLOSE ALL get rid of some dangling object refs that resulted in "Cannot Exit From Visual FoxPro" errors.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform