UtilPowerHybridShutdown Method
Shutdowns the specified computer and prepares the system for a faster startup.
Use this function only for Windows 8/8.1
Namespace: DevCase.Core.IO.Devices.PowerAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
Public Shared Function HybridShutdown (
Optional computer As String = "",
Optional timeout As Integer = 0,
Optional message As String = "",
Optional mode As ShutdownMode = ShutdownMode.Wait,
Optional reason As ShutdownReason = ShutdownReason.Other,
Optional planning As ShutdownPlanning = ShutdownPlanning.Unplanned,
Optional ignoreErrors As Boolean = true
) As Boolean
Dim computer As String
Dim timeout As Integer
Dim message As String
Dim mode As ShutdownMode
Dim reason As ShutdownReason
Dim planning As ShutdownPlanning
Dim ignoreErrors As Boolean
Dim returnValue As Boolean
returnValue = UtilPower.HybridShutdown(computer,
timeout, message, mode, reason, planning,
ignoreErrors)
static member HybridShutdown :
?computer : string *
?timeout : int *
?message : string *
?mode : ShutdownMode *
?reason : ShutdownReason *
?planning : ShutdownPlanning *
?ignoreErrors : bool
(* Defaults:
let _computer = defaultArg computer ""
let _timeout = defaultArg timeout 0
let _message = defaultArg message ""
let _mode = defaultArg mode ShutdownMode.Wait
let _reason = defaultArg reason ShutdownReason.Other
let _planning = defaultArg planning ShutdownPlanning.Unplanned
let _ignoreErrors = defaultArg ignoreErrors true
*)
-> bool
No code example is currently available or this language may not be supported.
- computer String (Optional)
-
The name of the computer to be shut down.
If the value of this parameter is an empty string, the local computer is shut down.
This parameter can be an addres, for example: 127.0.0.1
- timeout Int32 (Optional)
-
The number of seconds to wait before shutting down the computer.
If the value of this parameter is zero, the computer is shut down immediately.
This value is limited to MaxShutdownTimeout.
- message String (Optional)
-
The message to be displayed in the interactive shutdown dialog box.
- mode ShutdownMode (Optional)
-
Indicates whether to force the shutdown.
- reason ShutdownReason (Optional)
-
The reason for initiating the shutdown.
By default, it is also an 'unplanned' shutdown.
If this parameter is zero,
the default is an undefined shutdown that is logged as "No title for this reason could be found".
- planning ShutdownPlanning (Optional)
-
Indicates whether it's a planned or unplanned shutdoen operation.
- ignoreErrors Boolean (Optional)
-
If , a Win32Exception exception will be thrown if error found.
Boolean if the hydrid shutdown operation is initiated correctlly,
otherwise.
ArgumentException
|
Timeout should be zero or greater than zero.;timeout
|
Win32Exception
|
|