Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

SetSystemState( )

Action: Changes the (power) state of the computer.
 
Syntax: SETSYSTEMSTATE (mode, force)
 
Parameters: Mode

Optional parameter specifying one of the following modes:

Value

Meaning

0

Lock system (supported on Windows NT/2000/XP only).

1

Standby.

2

Hibernate.

3

Power Off.

Force

Specifies whether applications with unsaved changes are forcibly closed. If force is not zero, applications are closed. If force is zero, a dialog box is displayed prompting the user to close the applications.

Returns:
0 Function succeeded
Error code Function failed  
 
Example:

; Force system to standby mode
$RC = SetSystemState(1,1)