1 2 /*3 EWX_FORCE Forces programs to close without sending WM_QUERYENDSESSION4 and WM_ENDSESSION messages to notify them that Windows is5 shutting down. With any of the other flags, programs have 6 the7 power to abort the shut down.8 EWX_LOGOFF Closes all programs and then logs the user off.9 EWX_POWEROFF Powers down the computer if it supports it.10 EWX_REBOOT Reboots the machine.11 EWX_SHUTDOWN Shuts the machine off without restarting it.12 */13 14 void__fastcall TForm1::Button1Click(TObject *Sender)
15 {
16 ExitWindowsEx(EWX_SHUTDOWN, 0);
17 }