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).

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

Boolean
if the function succeeds, otherwise.

Remarks

See Also