Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
692 connectés 

  FORUM HardWare.fr
  Programmation

  [c++] Comment fait on pour éteindre le PC à partir d'un programme ?

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[c++] Comment fait on pour éteindre le PC à partir d'un programme ?

n°26321
fucky_fuck
Posté le 20-04-2001 à 23:58:00  profilanswer
 

Ben voilà, tout est dans le titre ...

mood
Publicité
Posté le 20-04-2001 à 23:58:00  profilanswer
 

n°26333
JosyX
aok : the conquerors RuleZ
Posté le 21-04-2001 à 01:35:19  profilanswer
 

sous quel os ?
 
sous win , fonct° de l api win.
 
ex : ExitWindowsEx(EWX_REBOOT , 0)
 
Platforms: Win 95/98, Win NT  
 
ExitWindowsEx shuts down or reboots the user's computer. Of course, since the shutdown/reboot process will begin once the function is called, there won't normally be much left for your program to do. The function returns 0 if an error occured, or 1 if successful.  
 
uFlags
One or more of the following flags specifying how to shut down or reboot the computer:  
EWX_FORCE = 4
Force any applications to quit instead of prompting the user to close them.  
EWX_LOGOFF = 0
Log off the network.  
EWX_POWEROFF = 8
Shut down the system and, if possible, turn the computer off.  
EWX_REBOOT = 2
Perform a full reboot of the system.  
EWX_SHUTDOWN = 1
Shut down the system.  
dwReserved

n°26335
fucky_fuck
Posté le 21-04-2001 à 02:01:07  profilanswer
 

Ouais c'étais pour windows, déoloé de n'avoir pas précisé...
Merci beaucoup.


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation

  [c++] Comment fait on pour éteindre le PC à partir d'un programme ?

 

Sujets relatifs
[PHP]mettre des info s dans une table a partir d'une liste[ASPX]lancer une webform à partir d'une autre
programme JET pour rendre service s'il vous plait.. si vous l'avez...[c#] comment lancer une fenetre à partir d'une autre
Comment executer un programme externe en HTML...??comment traiter les mails par programme ?
Generer des fichires HTML a partir d'asp ou phpInstaller un Prog à partir des .cabs (setup foireux) ???
[apache] comment je l'installe à partir du fichier .msi ? 
Plus de sujets relatifs à : [c++] Comment fait on pour éteindre le PC à partir d'un programme ?


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR