Const EWX_SHUTDOWN = 1 ' pour éteindre
Const EWX_REBOOT = 2 ' pour rebooter
Const EWX_FORCE = 4 ' pour forcer les processus à se terminer
Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
(..)
ret& = ExitWindowsEx(EWX_SHUTDOWN, 0)
tu peux combiner avec EWX_FORCE : ret& = ExitWindowsEx(EWX_FORCE OR EWX_SHUTDOWN, 0)
Là tu éteint ta machine à la bourrinos, cad que Windows n'envoie pas de message de fin aux processus actifs.
Jesus Army
J'ai ca ds un bouquin mais ca ne marche po ! Il doit y avoir une erreur... :(
Lord II
Il y a des parametres à passer mais je ne me rappelle plus lesquels. Ca ne doit pas etre trop dur à trouver ..
Jesus Army
Salut!
Je n'arrive pas à eteindre le pc avec l'API ExitWindowsEx !
Cela fait tout le temps comme si j'utilisais "logoff"...
Help !