And some music for this column: Restart me up!

Dear Dr. GUI:

I'm just wondering: Have you ever tried to hold down your SHIFT key while restarting your system?

It reboots your system without rebooting your machine. The message in the top left corner shows "Windows is now restarting" in the booting screen.

So, how can I use ExitWindowsEx or other means to achieve the same result?

Thanks,

Alan Cheng

Dr. GUI replies:

Sounds like kind of a shifty thing to do, no? But as it turns out, the 32-bit ExitWindowsEx() API does not allow one to "restart" Microsoft Windows 95. However, if you were to write a 16-bit program and call the 16-bit ExitWindows() API with the EW_RESTARTWINDOWS parameter, you can restart Windows 95. You should be able to spawn a 16-bit application to do this. Or, if you need to do the same from a 32-bit program, then you will have to thunk down to a 16-bit DLL which calls the 16-bit API. See the Microsoft Platform SDK (formerly called the Win32 SDK) for documentation on how to write a flat thunk under Windows 95.