Group: Power Management - Library: kernel32
The SetSystemPowerState function suspends the system by shutting power down. Depending on the ForceFlag parameter, the function either suspends operation immediately or requests permission from all applications and device drivers before doing so.
BOOL SetSystemPowerState(
BOOL fSuspend,
BOOL fForce
);
DECLARE INTEGER SetSystemPowerState IN kernel32;
INTEGER fSuspend,;
INTEGER fForce
fSuspend [in] If this parameter is TRUE, the system is suspended. If the parameter is FALSE, the system hibernates.
fForce [in] If this parameter is TRUE, the function broadcasts a PBT_APMSUSPEND event to each application and driver, then immediately suspends operation. If the parameter is FALSE, the function broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation.
If power has been suspended and subsequently restored, the return value is nonzero.
The first parameter is ignored in Windows Me/98/95.
This function is similar to the SetSuspendState function.
Home