ExitWindowsEx
This function shuts down the system.
BOOL ExitWindowsEx(
UINT uFlags,
DWORD dwReserved
);
Parameters
uFlags
[in] Specifies the type of shutdown. This parameter must be one of the following values.Value Description EWX_POWEROFF Shuts down the system and turns off the power. Note This flag is not supported on a Windows Mobile-based Pocket PC.
EWX_REBOOT Shuts down the system and reboots. dwReserved
[in] Reserved; this parameter is ignored.
Return Values
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
Remarks
The ExitWindowsEx function returns as soon as it has initiated the shutdown. The shutdown then proceeds asynchronously. Because the function executes asynchronously, a nonzero return value indicates that the shutdown has been initiated. It does not indicate whether the shutdown will succeed. It is possible that the system, the user, or another application will abort the shutdown.
If the function fails, you can obtain extended error information by calling GetLastError.
Requirements
Pocket PC: Windows Mobile 5.0 and later.
Smartphone: Windows Mobile 5.0 and later.
OS Versions: Windows CE 5.01 and later.
Header: Aygshell.h.
Send Feedback on this topic to the authors