Comment fermer l'ordinateur a l'aide de vb6? je voudrait connaitre le codage svp
jft23
Messages postés1Date d'inscriptionlundi 7 novembre 2005StatutMembreDernière intervention 7 novembre 2005
-
7 nov. 2005 à 23:43
BruNews
Messages postés21040Date d'inscriptionjeudi 23 janvier 2003StatutModérateurDernière intervention21 août 2019
-
8 nov. 2005 à 10:07
Bonjour,
J'aimerais bien connaître les secrets pour fermer l'ordinateur
(shutdown,log off,restart,force) etc. Donc en gros, le codage pour tout
ça. Comme je commence mes cours, j'aimerai que l'on soit assez préci
merci!
A voir également:
Comment fermer l'ordinateur a l'aide de vb6? je voudrait connaitre le codage svp
BasicInstinct
Messages postés1470Date d'inscriptionmardi 5 février 2002StatutMembreDernière intervention20 octobre 201412 8 nov. 2005 à 09:48
trop precis la reponse
Declare Function ExitWindowsEx Lib "user32" Alias "ExitWindowsEx" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long
· uFlags
Specifies the type of shutdown. This parameter must be some combination of the following values:
EWX_FORCE
Forces processes to terminate. When this flag is set, Windows does not send the messages WM_QUERYENDSESSION and WM_ENDSESSION to the applications currently running in the system. This can cause the applications to lose data. Therefore, you should only use this flag in an emergency.
EWX_LOGOFF
Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off.
EWX_POWEROFF
Shuts down the system and turns off the power. The system must support the power-off feature.
Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section.
Windows 95: Security privileges are not supported or required.
EWX_REBOOT
Shuts down the system and then restarts the system.
Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section.
Windows 95: Security privileges are not supported or required.
EWX_SHUTDOWN
Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped.
Windows NT: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section.
Windows 95: Security privileges are not supported or required.