--- Soumis par Dev Ashish---
Fermer Windows.
(Q) Comment fermer Windows depuis Access?
(A) Fournir à la fonction fTerminateWin une des constantes
spécifiées.
AVERTISSEMENT: Cette fonction retourne immédiatement et le "shutdown" procède
en arrière plan. Être certain de terminer son application pour générer un processus
tout en douceur.
'**************** Code Begin *******************
Private Declare Function apiExitWindowsEx Lib "user32" _
Alias "ExitWindowsEx" _
(ByVal uFlags As Long, ByVal dwReserved As Long) _
As Long
Public Const EWX_FORCE = 4 'Termine même si une tâche s'obstine
'à ne pas répondre.
Public Const EWX_LOGOFF = 0 'Termine les tâches, puis log off.
Public Const EWX_SHUTDOWN = 1 'Coupe l'alimentation, si possible
Public Const EWX_REBOOT = 2 'Reboot (redémarre) le système
Function fTerminateWin(lngExitVal As Long)
fTerminateWin = apiExitWindowsEx(lngExitVal, 0)
End Function
'***************** Code End *******************