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: 11
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 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.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.20.196.179)
4.65 hrs.Example: 'Shortcut Menu Class'
 Function: 'DrawFrameControl'
Function group: 'Painting and Drawing'
5.34 hrs.Example: 'How to change display settings: screen resolution, screen refresh rate'
 Function: 'GetComputerObjectName'
9.5 hrs.Example: 'HOWTO: Use the Win32 API to Access File Dates and Times'
 Example: 'Accessing the list of Windows Recent Documents'
16.74 hrs.Example: 'How to find the application associated with a file name'
 Function: 'CreateDirectory'
18.6 hrs.Function: 'UuidToString'
Function group: 'Remote Procedure Call (RPC)'
 Example: 'Testing MS Internet Explorer version installed'
Google
Advertise here!