Using Win32 functions in Visual FoxPro Image Gallery
Power Management
Code examples:
..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:
BOOL SetSystemPowerState(
  BOOL fSuspend,
  BOOL fForce

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

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

[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 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: 31
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: 'GetNumberOfEventLogRecords'
36 sec.Function: 'StretchBlt'
55 sec.Function: 'HeapLock'
1.2 min.Function: 'SHGetFileInfo'
1.5 min.Function: 'CeCreateProcess'
1.8 min.Function: 'IsPwrSuspendAllowed'
2.08 min.Example: 'GDI+: custom Clock Control'
2.4 min.Function: 'GetRTTAndHopCount'
2.72 min.Function: 'recvfrom'
3 min.Function: 'waveOutUnprepareHeader'
Advertise here!