Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/02/2011, 19:12
tazzwt
 
Fecha de Ingreso: marzo-2010
Mensajes: 432
Antigüedad: 14 años, 1 mes
Puntos: 11
reiniciar y apagar el equipo con C++

Cual es el comando para reiniciar y apagar el equipo en C++.

Para Windows y Linux (Ubuntu)


Código C++:
Ver original
  1. #include <windows.h>
  2.  
  3. int main()
  4. {
  5.    ExitWindowsEx(EWX_SHUTDOWN|EWX_POWEROFF| EWX_FORCE, 0);
  6.          return 0;
  7.  
  8. }

Código C++:
Ver original
  1. #include <windows.h>
  2.  
  3. int main()
  4. {
  5.    ExitWindowsEx(EWX_SHUTDOWN|EWX_POWEROFF| EWX_FORCE, 0);
  6.       return 0;
  7.  
  8. PostQuitMessage(0);
  9.      return 0;
  10.  
  11. }
__________________
Libro de HTML 5 + codigo fuente bajar aqui.