ShutDown Function
Shuts down Epson RC+ and optionally shuts down or restarts Windows.
Syntax
ShutDown ( [mode] [, Forced] )
Parameters
- mode
- Set the mode shown below with an integer value.
Constant Value Meaning Mode omitted -1 Displays a dialog allowing the user to choose the shutdown option. SHUTDOWN_ALL 0 Shuts down Epson RC+ and Windows. SHUTDOWN_RESTART 1 Shuts down Epson RC+ and restarts Windows. SHUTDOWN_EPSONRC 2 Shuts down Epson RC+. - Forced
- Optional. Use to force a shutdown.
Description
Use ShutDown to shut down RC+ and optionally shutdown or reboot Windows from your program. You can force a shutdown by using the Forced parameter.
Note
If you shutdown with the Forced parameter while tasks are running, you could lose data. Be sure to save data before shutdown.
About the Controllers to use
Shutdown Function cannot be used with T/VT series.
When the controller configuration is set to “Cooperative mode” in virtual controller
When the controller configuration is set to “Cooperative mode” in the virtual controller, the global Preserve variables will not be saved if ShutDown function is executed. Do not use ShutDown function if you need to save the global Preserve variables.
Return Values
Returns the following integer values.
- -1: When a dialog is displayed and the user selects Cancel.
- 0: If shutdown fails
- 1: If shutdown is successful
ShutDown Function Example
If Shutdown(SHUTDOWN_EPSONRC) = 1 Then
Print "Shutdown: OK"
Else
Print "Shutdown: NG"
EndIf