Prevent Windows From Entering Hibernate Mode in WINDOWS 7

Newbie Member
15Dec2011,13:00   #1
prabhakar.rishav's Avatar
Hello,

I have to prevent Windows 7 from entering Hibernate mode.



Preventing it to enter SLEEP mode was done by

"SetThreadExecutionState(ES_CONTINUOUS |ES_AWAYMODE_REQUIRED|ES_SYSTEM_REQUIRED|ES_DISPLA Y_REQUIRED);"


but this code doesn't stop windows from entering Hibernation.

what can be done to achieve the above..??