ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / System functions
  • Shutdown via software not allowed
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
SysShutdown (Function)
In french: SysArrête
Stops the system or closes the current Windows session.
Example
// Stops the system and turns the power off
SysShutdown(sysPoweroff)
Syntax
<Result> = SysShutdown(<Shutdown mode>)
<Result>: Boolean
  • True if no problem occurred,
  • False otherwise. ErrorInfo returns more details.
The result is immediately sent. Then, the shutdown process is performed in background task.
<Shutdown mode>: Constant
Indicates the requested shutdown mode:
sysLockSessionLocks the current session.
sysLogoffEnds the current session
sysPoweroffStops the system and turns the power off.
sysRebootStops and restarts the system.
Remarks

Shutdown via software not allowed

If the system does not support software shut down, SysShutdown stops Windows and displays the following message on the computer: "You can now switch your computer off".
Related Examples:
Managing the Windows session Unit examples (WINDEV): Managing the Windows session
[ + ] Managing the Windows session by programming with the WLanguage functions.
This example explains how to close the Windows session, stop the system and restart the PC, etc.
Component: wd290std.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help