Desktop Functions: Smart Device Functions:
|
Search Results for "ExitWindowsEx" in [All]user32
static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason);
static extern bool ExitWindowsEx(uint uFlags, uint dwReason);
Shared Function ExitWindowsEx( _
Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Int32, ByVal dwReserved As Int32) As Int32 If uFlags is set to 'LogOff', then the call will fail if the process calling it is a non-interactive-process (i.e a Windows Service). Read the [ExitWindowsEx] on MSDN for more info. All other values for uFlags work fine for non-interactive-processes.
static extern bool ExitWindowsEx(uint uFlags, uint dwReason);
ExitWindowsEx(ExitWindows.LogOff, ShutdownReason.MajorOther | ShutdownReason.MinorOther); aygshell
static extern bool ExitWindowsEx([MarshalAs(UnmanagedType.U4)]uint dwFlags, [MarshalAs(UnmanagedType.U4)]uint dwReserved);
static extern bool ExitWindowsEx([MarshalAs(UnmanagedType.U4)] ExitWindowsAction uFlags, [MarshalAs(UnmanagedType.U4)] uint dwReserved);
Declare Function ExitWindowsEx Lib "aygshell.dll" (ByVal dwFlags As Integer, ByVal dwReserved As Integer) As Boolean Available only at Windows Mobile 5.0 or later. 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.
ExitWindowsEx(ExitWindowsAction.EWX_REBOOT, 0); kernel32Note that for an application to be restarted when the update requires a computer restart, the installer must call the ExitWindowsEx function with the EWX_RESTARTAPPS flag set or the InitiateShutdown function with the SHUTDOWN_RESTARTAPPS flag set. Enums4: ExitWindows
advapi32
'which is necessary if you want to call ExitWindowsEx. |