Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automatically log off NT 4 when quitting VFP app
Message
De
27/12/1999 21:34:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00309039
Message ID:
00309041
Vues:
44
>Is there way to force user to log off or automatically log user off when quitting VFP app ?
>

Yes - you make sure everything is ready to shut down, and call the ExitWindowsEx Win32 API call with the parameters 4,0 - this will force a logoff of the NT user. I'd follow this immediately with a call to ExitProcess() to shut down VFP, something like:

DECLARE INTEGER ExitWindowsEx IN Win32API INTEGER nFlags, INTEGER Reserved
DECLARE INTEGER ExitProcess IN Win32API INTEGER nExitCode
CLOSE ALL
FLUSH
=ExitWindowsEx(4,0)
=ExitProcess(0)
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