Navigation: thinBasic Modules > PC > PC Control functions > PC_ShutDown |
|
Description
The PC_ShutDown() function shutdowns or restarts the system.
Syntax
PC_ShutDown(sComputer AS STRING,
sMsg AS STRING,
nReboot AS NUMBER,
nNumSec AS NUMBER,
nForce AS NUMBER) AS NUMBER
Returns
Return a number
If the function fails, the return value is zero.
If the function succeeds, the return value is nonzero.
Parameters
sComputer AS STRING
The computer name to shutdown.
sMsg AS STRING
The message to show.
nReboot AS NUMBER
A nonzero value for reboot, if zero shutdown.
nNumSec AS NUMBER
The seconds of delay before shutdown or reboot.
nForce AS NUMBER
A nonzero value for force closing open process, if zero don't' force closing.
Remarks
In order to reboot or shutdown the local PC you can use the $PC_MY_PC constant.
For nReboot and nForce yo can use the following constants:
%PC_SD_REBOOT
%PC_SD_DONOT_REBOOT
%PC_SD_FORCE
%PC_SD_DONOT_FORCE
Restrictions
See also
PC Module, PC_PreventShutDown, PC_RestartDialog
Examples
PC_ShutDown($PC_MY_PC,
"System ShutDown ...",
%PC_SD_DONOT_REBOOT,
7,
%PC_SD_DONOT_FORCE)
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |