BOOL ExitWindowsEx( UINT uFlags, // shutdown operation DWORD dwReserved // reserved );Parameters uFlags Specifies the type of shutdown. This parameter must include one of the following EWX_LOGOFF: Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off. EWX_POWEROFF: Shuts down the system and turns off the power. The system must support the power-off feature.
EWX_REBOOT: Shuts down the system and then restarts the system.
EWX_SHUTDOWN: Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. dwReserved Reserved; this parameter is ignored. Return Values If the function succeeds, the return value is nonzero.
UINT uFlags, // shutdown operation
DWORD dwReserved // reserved
);Parameters
uFlags Specifies the type of shutdown. This parameter must include one of the following EWX_LOGOFF: Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off.
EWX_POWEROFF: Shuts down the system and turns off the power. The system must support the power-off feature.
EWX_REBOOT: Shuts down the system and then restarts the system.
EWX_SHUTDOWN: Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. dwReserved
Reserved; this parameter is ignored.
Return Values
If the function succeeds, the return value is nonzero.