If FALSE, any system wake events remain enabled. If TRUE, the system disables all wake events. If FALSE, the function broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation. If TRUE, the function broadcasts a PBT_APMSUSPEND event to each application and driver, then immediately suspends operation. If the ForceFlag parameter is TRUE, the system suspends operation immediately if it is FALSE, the system requests permission from all applications and device drivers before doing so. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4). The SetSuspendState function suspends the system by shutting power down. So it's treating boolHibernate as 0 so can't suspend only hibernate. As we're passing Null, Null, Null (because it's an ordinary function that doesn't expect to be called from a command line but by a program) to a function that expects values. Note I can't guarantee it will always work.
0 Comments
Leave a Reply. |