Using Win32 functions in Visual FoxPro Image Gallery
Power Management
..msdn
GetPwrCapabilities
GetSystemPowerStatus
IsPwrSuspendAllowed
SetSuspendState
SetSystemPowerState
SetThreadExecutionState
Code examples:
How to suspend or hibernate your system
SetThreadExecutionState
..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
Declaration:
EXECUTION_STATE SetThreadExecutionState(
    EXECUTION_STATE esFlags
);
FoxPro declaration:
DECLARE INTEGER SetThreadExecutionState IN kernel32;
    INTEGER esFlags
Parameters:
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  
FreeTranslation.com 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: 16
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.150.10)
12 sec.Function: 'CreateEllipticRgn'
26 sec.Function: 'mmioClose'
40 sec.Function: 'SetParent'
54 sec.Function: 'EnumClipboardFormats'
1.12 min.Function: 'GetStdHandle'
1.3 min.Function: 'GetLengthSid'
1.52 min.Function: 'OpenVirtualDisk'
1.75 min.Function: 'ConnectNamedPipe'
2 min.Function: 'GetKeyboardLayout'
2.25 min.Function: 'GetProcessVersion'
Google
Advertise here!