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
SetSuspendState
..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
Declaration:
BOOLEAN SetSuspendState(
  BOOL Hibernate,
  BOOL ForceCritical,
  BOOL DisableWakeEvent
);
FoxPro declaration:
DECLARE INTEGER SetSuspendState IN Powrprof;
    INTEGER Hibernate,;
    INTEGER ForceCritical,;
    INTEGER DisableWakeEvent

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

ForceCritical
[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.

DisableWakeEvent
[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  
FreeTranslation.com 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: 14
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.158.212.93)
6 sec.Function: 'SetComputerName'
12 sec.Function: 'GetProductInfo'
18 sec.Function: 'GdipCreateHBITMAPFromBitmap'
24 sec.Function: 'CeCreateProcess'
30 sec.Function: 'MessageBox'
37 sec.Function: 'IsPwrSuspendAllowed'
44 sec.Function: 'WriteProcessMemory'
50 sec.Function: 'SHGetFileInfo'
57 sec.Function: 'SHGetFolderPath'
1.05 min.Function: 'IsWellKnownSid'
Google
Advertise here!