Search Results

Search found 3 results on 1 pages for 'setthreadexecutionstate'.

Page 1/1 | 1 

  • Overriding SetThreadExecutionState

    - by unixman83
    I am not sure if this belongs on serverfault or superuser. I would like to override SetThreadExecutionState(ES_DISPLAY_REQUIRED) to be a no-op. How is this accomplished? Is there some registry setting that can be altered instead of API hooking? Blocking ES_DISPLAY_REQUIRED will prevent apps from keeping the monitor powered on. I have an application (likely the antivirus) that is preventing some monitors from entering power-save and I think this function is the culprit.

    Read the article

  • Stop the screen saver and hibernation temporarily in VB.Net

    - by Tim Santeford
    I have a very long running syncronization task that cannot be interrupted by the screen saver or aggressive power saving modes. I want to make a single api call to stop power save mode and then restore it once the task is done. The following code is peaced together from various other posts but it has no effect on XP's power management settings. What am I doing wrong? TIA! Private Declare Function SetThreadExecutionState Lib "kernel32" (ByVal esFlags As Long) As Long Public Enum EXECUTION_STATE As Integer ES_CONTINUOUS = &H80000000 ES_DISPLAY_REQUIRED = &H2 ES_SYSTEM_REQUIRED = &H1 ES_AWAYMODE_REQUIRED = &H40 End Enum Public Shared Sub PowerSaveOff() SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY_REQUIRED Or EXECUTION_STATE.ES_CONTINUOUS) End Sub Public Shared Sub PowerSaveOn() SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS) End Sub Here are the systems screensaver and powermode settings:

    Read the article

  • How to turn on monitor after wake-up from suspend mode?

    - by alek.sys
    Hi all, I need wake up PC from sleep to perform some actions - from C#. I've used CreateWaitableTimer functions, everything goes fine, at given time PC wakes up - but monitor stays in power save mode (turned off). So i want to know - how possible to turn on monitor after wake up? PS I've tried "Complete Guide on How To Turn A Monitor On/Off/Standby" - with SendMessage (Codeproject) and SetThreadExecutionState(ES_DISPLAY_REQUIRED) - it doesn't work Any ideas?

    Read the article

1