Using Win32 functions in Visual FoxPro Image Gallery
Power Management
..msdn
GetPwrCapabilities
GetSystemPowerStatus
IsPwrSuspendAllowed
SetSuspendState
SetSystemPowerState
SetThreadExecutionState
Code examples:
SetSystemPowerState
..msdn    Add comment     W32 Constants      Translate this page
The SetSystemPowerState function suspends the system by shutting power down. Depending on the ForceFlag parameter, the function either suspends operation immediately or requests permission from all applications and device drivers before doing so.
Code examples:
Declaration:
BOOL SetSystemPowerState(
  BOOL fSuspend,
  BOOL fForce
);

FoxPro declaration:
DECLARE INTEGER SetSystemPowerState IN kernel32;
    INTEGER fSuspend,;
    INTEGER fForce


Parameters:
fSuspend
[in] If this parameter is TRUE, the system is suspended. If the parameter is FALSE, the system hibernates.

fForce
[in] If this parameter is TRUE, the function broadcasts a PBT_APMSUSPEND event to each application and driver, then immediately suspends operation. If the parameter is FALSE, the function broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation.
Return value:
If power has been suspended and subsequently restored, the return value is nonzero.
My comment:
The first parameter is ignored in Windows Me/98/95.
This function is similar to the SetSuspendState function.
Word Index links for the SetSystemPowerState :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-03-18 08:06:53
Modified: 2006-01-13 20:26:05
Visited in last 7 days: 15
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.167.202.184)
6 sec.Function: 'SQLGetConfigMode'
11 sec.Function: 'CM_Request_Device_Eject_Ex'
17 sec.Function: 'ActivateKeyboardLayout'
22 sec.Function: 'GetModuleFileNameEx'
28 sec.Function: 'GetModuleFileName'
33 sec.Function: 'JetBeginSession'
38 sec.Function: 'SQLCreateDataSource'
44 sec.Function: 'NetMessageNameAdd'
50 sec.Function: 'RpcStringFree'
56 sec.Function: 'send'
Google
Advertise here!