PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Windows NT or 2000
  • Shutdown via software not allowed
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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:
sysPoweronScreenTurns the power of the screen on
This feature is not supported by all the Pocket PCs.
WINDEV This constant is not available.
sysLogoffEnds the current session
Windows Mobile This constant is not available.
sysPoweroffStops the system and turns the power off
sysPoweroffScreenTurns the power of the screen off
This feature is not supported by all the Pocket PCs.
WINDEV This constant is not available.
sysRebootStops and restarts the system
Versions 18 and later
sysLockSession
New in version 18
sysLockSession
sysLockSession
Locks the current session.
Windows Mobile This constant is not available.
Remarks

Windows NT or 2000

To shut down the system in Windows NT or 2000, the calling program (or the user who started it) must have enough privileges to perform the shutdown operation otherwise the call will fail.

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:
The System functions Unit examples (WINDEV Mobile): The System functions
[ + ] Using the WLanguage "System" functions available in WINDEV Mobile:
- SysShutdown associated with the sysReboot, sysPoweroff, sysPoweronScreen and sysPoweroffScreen constants.
- SysDirStorageCard that is used to retrieve the path of the storage card
- SysSpace that is used to retrieve the sizes of spaces (storage and program, total and free)
- SysSerialNum that is used to retrieve the serial number of the device
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.
Components
WINDEVReports and Queries wd230std.dll
Windows Mobile wp230std.dll
See also
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment