Reboot method
The Reboot method initiates a restart of a computer.
Syntax
HRESULT Reboot(
[in] LONG TimeOutInSeconds
);
Parameters
TimeOutInSeconds [in]
The amount of time, in seconds, that the shutdown dialog box will be displayed. While the shutdown dialog box is displayed, the shutdown request can be stopped by using the Console::AbortShutdown method.Note In Windows Server 2003 and Windows XP with SP1, the value of this parameter cannot be larger than MAX_SHUTDOWN_TIMEOUT seconds.
Return value
Reboot returns a standard HRESULT.
Remarks
If the TimeOutInSeconds parameter is not zero, the Reboot method displays a dialog box on the screen. The dialog box beeps when it is created and remains on top of other windows that are currently open. The dialog box prompts the user to log off, and can be moved but not closed. A timer counts down the remaining time before the system is restarted.
If TimeOutInSeconds is zero, the computer restarts without displaying the dialog box, and the restart cannot be stopped by the Console::AbortShutdown method.
To use the Reboot method, the caller should be running on the interactive console.
See also
Send comments about this topic to Microsoft
Build date: 1/12/2012