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