This article describes how to shutdown windows from C++ utilizing the Windows API to ExitWindowsEX. You will learn how to Shutdown, Restart, Power Off, Log Off and Force a windows shutdown. This code has been tested in Windows XP, and Windows 7.
This article contains a short method on how to obtain the date / time functions utilizing different programming methods in C++.