PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • 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:
sysLogoffEnds the current session
sysPoweroffStops the system and turns the power off.
sysRebootStops and restarts the system.
Versions 18 and later
sysLockSession
New in version 18
sysLockSession
sysLockSession
Locks the current session.
Remarks

Shutdown via software not allowed

If the shutdown via software is not supported by the system, 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: wd270std.dll
See also
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment