Using Win32 functions in Visual FoxPro Image Gallery
Synchronization
..msdn
CreateEvent
CreateMutex
CreateSemaphore
CreateWaitableTimer
OpenEvent
OpenSemaphore
OpenWaitableTimer
ReleaseMutex
ReleaseSemaphore
ResetEvent
SetEvent
SetWaitableTimer
WaitForSingleObject
Code examples:
How to suspend or hibernate your system
How to suspend or hibernate your system

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Before you begin:
Before testing this code make sure all important documents and applications on local computer are closed. This code suspends the system and wakes it up in about 30 seconds using the WaitableTimer object.

See also:
  • How to initiate System shutdown (WinNT only)
  • Closing Windows
  • Restarting Windows
  • Enabling the SE_SHUTDOWN_NAME privilege for the application
  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    3451 bytes  
    Created: 2003-03-22 20:51:03  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 191  
    Listed functions:
    CloseHandle
    CreateWaitableTimer
    GetLocalTime
    IsPwrSuspendAllowed
    LocalFileTimeToFileTime
    OpenWaitableTimer
    SetSuspendState
    SetThreadExecutionState
    SetWaitableTimer
    SystemTimeToFileTime
    Printer friendly API declarations
    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. The calling process must have the SE_SHUTDOWN_NAME privilege.

    To prevent the user from putting the computer in standby mode, the application must deny the PBT_APMQUERYSUSPEND event.

    * * *
    Read article Programmatically Waking a Windows PC from Suspension by Blake Thompson.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    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.22.76.170)
    3 sec.
    Function group: 'Filled Shape'
    1.39 hrs.Example: 'Locking the workstation'
     Function: 'SetSysColors'
    Function group: 'System Information'
     Example: 'Using Month Calendar Control (VFP9, Comctl32.dll)'
    5.21 hrs.Example: 'Enumerating forms supported by a specified printer'
    11.44 hrs.Function: 'GetPriorityClipboardFormat'
    Function group: 'Clipboard'
    16.81 hrs.Function: 'ClientToScreen'
    Function group: 'Coordinate Space and Transformation'
    19.34 hrs.Function: 'GetACP'
    Function group: 'National Language Support'
     Example: 'Opening access to the Microsoft Internet functions for the application'
    19.68 hrs.Example: 'Retrieving local computer and user names'
    Google
    Advertise here!