Desktop Functions: Smart Device Functions:
|
Search Results for "ExitWindows" in [All]user321: CreateWindow
WINSTA_EXITWINDOWS = 0x0040,
WINSTA_EXITWINDOWS | WINSTA_ENUMERATE | WINSTA_READSCREEN |
static extern bool ExitWindowsEx(ExitWindows uFlags, ShutdownReason dwReason);
static extern bool ExitWindowsEx(uint uFlags, uint dwReason);
Shared Function ExitWindowsEx( _
ByVal uFlags As ExitWindows, _
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); advapi32
'which is necessary if you want to call ExitWindowsEx. Enums4: ACCESS_MASK
WINSTA_EXITWINDOWS = 0x00000040,
WINSTA_EXITWINDOWS = &H40 5: ExitWindows
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. 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 enum ExitWindowsAction : uint 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); |