PowrProfSetSuspendState Method
Suspends the system by shutting power down.
Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("PowrProf.dll", ExactSpelling = true, SetLastError = true)]
public static bool SetSuspendState(
bool hibernate,
bool force,
bool wakeupEventsDisabled
)
<DllImportAttribute("PowrProf.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function SetSuspendState (
hibernate As Boolean,
force As Boolean,
wakeupEventsDisabled As Boolean
) As Boolean
Dim hibernate As Boolean
Dim force As Boolean
Dim wakeupEventsDisabled As Boolean
Dim returnValue As Boolean
returnValue = PowrProf.SetSuspendState(hibernate,
force, wakeupEventsDisabled)
public:
[DllImportAttribute(L"PowrProf.dll", ExactSpelling = true, SetLastError = true)]
static bool SetSuspendState(
bool hibernate,
bool force,
bool wakeupEventsDisabled
)
[<DllImportAttribute("PowrProf.dll", ExactSpelling = true, SetLastError = true)>]
static member SetSuspendState :
hibernate : bool *
force : bool *
wakeupEventsDisabled : bool -> bool
No code example is currently available or this language may not be supported.
- hibernate Boolean
-
If this parameter is , the system hibernates.
If the parameter is , the system is suspended.
- force Boolean
-
This parameter has no effect.
- wakeupEventsDisabled Boolean
-
If this parameter is , the system disables all wake events.
If the parameter is , any system wake events remain enabled.
Boolean if the function succeeds,
otherwise.