Using Win32 functions in Visual FoxPro Image Gallery
Power Management
Code examples:
How to suspend or hibernate your system
..msdn    Add comment     W32 Constants      Translate this page
Enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running.
Code examples:
How to suspend or hibernate your system
EXECUTION_STATE SetThreadExecutionState(
FoxPro declaration:
DECLARE INTEGER SetThreadExecutionState IN kernel32;
    INTEGER esFlags
[in] Execution requirements for the thread.
Return value:
If the function succeeds, the return value is the previous thread execution state.
If the function fails, the return value is NULL.
My comment:
To run properly on a power-managed computer, applications such as fax servers, answering machines, backup agents, and network management applications must use ES_SYSTEM_REQUIRED | ES_CONTINUOUS when they process events.

Multimedia applications, such as video players and presentation applications, must use ES_DISPLAY_REQUIRED when they display video for long periods of time without user input. Applications such as word processors, spreadsheets, browsers, and games do not need to call SetThreadExecutionState.
Word Index links for the SetThreadExecutionState :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2006-04-17 13:12:02
Modified: 2006-04-17 13:14:23
Visited in last 7 days: 41
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
19 sec.
Function group: 'URL Monikers'
37 sec.Function: 'SetWindowRgn'
58 sec.Updates
1.32 min.Function: 'SQLExecDirect'
1.67 min.Function: 'NetConnectionEnum'
1.97 min.Function: 'GetEnvironmentStrings'
2.28 min.Example: 'Creating a file, then moving it to another destination'
2.68 min.Function: 'RestartDialog'
3.05 min.Function: 'HttpSendRequest'
3.38 min.Function: 'GetRawInputDeviceInfo'
Advertise here!