Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forced poweroff
Message
De
01/04/1999 22:53:35
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
 
 
À
Tous
Information générale
Forum:
Visual C++
Catégorie:
Autre
Titre:
Forced poweroff
Divers
Thread ID:
00204524
Message ID:
00204524
Vues:
63
I am trying to write a very simple C program to power off
my PC. I created a Visual C++ win32 application with the
following lines:
#include "stdafx.h"
#include "windows.h"

void main(int argc, char* argv[]) {
  printf("Shutting down ...");
  ExitWindowsEx(EWX_POWEROFF | EWX_FORCE, 0);
}
It just didn't work! The program simply exited
without doing a thing. Please help.

BTW, is there a smaller C compiler than Visual C++
that could communicate with Win95?
Regards,
Mr. Man-wai Chang
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform