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
The SetSuspendState function suspends the system by shutting power down. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).
Code examples:
How to suspend or hibernate your system
BOOLEAN SetSuspendState(
  BOOL Hibernate,
  BOOL ForceCritical,
  BOOL DisableWakeEvent
FoxPro declaration:
DECLARE INTEGER SetSuspendState IN Powrprof;
    INTEGER Hibernate,;
    INTEGER ForceCritical,;
    INTEGER DisableWakeEvent

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

[in] If this parameter is TRUE, the system suspends operation immediately; if it is FALSE, the system broadcasts a PBT_APMQUERYSUSPEND event to each application to request permission to suspend operation.

[in] If this parameter is TRUE, the system disables all wake events.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
An application may use SetSuspendState to transition the system from the working state to the standby (sleep), or optionally, hibernate (S4) state. This function is similar to the SetSystemPowerState function.

To prevent the user from putting the computer in standby mode, the application must deny the PBT_APMQUERYSUSPEND event.
Word Index links for the SetSuspendState :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2003-03-22 20:53:11
Modified: 2006-01-22 12:48:49
Visited in last 7 days: 26
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 (
18 sec.Function: 'StrCpy'
36 sec.Function: 'GetIconInfo'
54 sec.Function: 'SHAddToRecentDocs'
1.2 min.Function: 'CryptEnumProviderTypes'
1.52 min.Function: 'SystemParametersInfo'
1.83 min.Function: 'ExitProcess'
2.15 min.Function: 'waveOutGetVolume'
2.48 min.Function: 'GetMonitorBrightness'
2.83 min.Function: 'PathMakeUniqueName'
3.18 min.Function: 'DeleteService'
Advertise here!