The WinShutdownSystem function will close all running applications and will then call DosShutdown.
Presentation Manager applications will receive a WM_SAVEAPPLICATION message prior to a WM_QUIT message.
When the system is restarted, all applications that were running when WinShutdownSystem was last called will be restarted.