Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forced poweroff
Message
From
01/04/1999 22:53:35
Man Wai Chang
Hang Hing Metal Manufacturer
Hung Hom, Hong Kong
 
 
To
All
General information
Forum:
Visual C++
Category:
Other
Title:
Forced poweroff
Miscellaneous
Thread ID:
00204524
Message ID:
00204524
Views:
64
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
Next
Reply
Map
View

Click here to load this message in the networking platform