Click to See Complete Forum and Search --> : Rebooting


Ron Daemen
April 19th, 1999, 09:20 AM
Hi,

How can i force a reboot of a Windows 95/98/NT pc using VC++. I need to be able to reboot this machine without user-questions popping up about saving documents e.g. or a sysem waiting for "stopped / hanging" programs.

I want to execute this code if a machine is leaking resources or filling it's memory caused by problems.

Hope anyone can help me !

-- Ron Daemen

April 19th, 1999, 11:02 PM
ExitWindowsEx (EWX_REBOOT ,0);

Daniel Levine
April 20th, 1999, 12:26 AM
Hi,

If you don't want questions to pop up, then use:

ExitWindowsEx(EWX_REBOOT|EWX_FORCE,0L);

Daniel.