Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to suspend or hibernate your system
..msdn    Add comment     W32 Constants      Translate this page
Activates the specified waitable timer. When the due time arrives, the timer is signaled and the thread that set the timer calls the optional completion routine.
Code examples:
How to suspend or hibernate your system
BOOL WINAPI SetWaitableTimer(
    HANDLE hTimer,
    const LARGE_INTEGER* pDueTime,
    LONG lPeriod,
    PTIMERAPCROUTINE pfnCompletionRoutine,
    LPVOID lpArgToCompletionRoutine,
    BOOL fResume
FoxPro declaration:
DECLARE INTEGER SetWaitableTimer IN kernel32;
    INTEGER hTimer,;
    STRING @pDueTime,;
    LONG lPeriod,;
    INTEGER pfnCompletionRoutine,;
    INTEGER lpArgToCompletionRoutine,;
    INTEGER fResume
[in] Handle to the timer object. The CreateWaitableTimer or OpenWaitableTimer function returns this handle.

[in] Time after which the state of the timer is to be set to signaled, in 100 nanosecond intervals. Use the format described by the FILETIME structure.

[in] Period of the timer, in milliseconds. If lPeriod is zero, the timer is signaled once. If lPeriod is greater than zero, the timer is periodic.

[in] Pointer to an optional completion routine.

[in] Pointer to a structure that is passed to the completion routine.

[in] If this parameter is TRUE, restores a system in suspended power conservation mode when the timer state is set to signaled.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
Timers are initially inactive. To activate a timer, call SetWaitableTimer. If the timer is already active when you call SetWaitableTimer, the timer is stopped, then it is reactivated. Stopping the timer in this manner does not set the timer state to signaled, so threads blocked in a wait operation on the timer remain blocked.

For pDueTime use the format described by the FILETIME structure. Positive values indicate absolute time. Be sure to use a UTC-based absolute time, as the system uses UTC-based time internally. Negative values indicate relative time.
Word Index links for the SetWaitableTimer :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2006-04-17 13:20:30
Modified: 2006-04-17 13:23:39
Visited in last 7 days: 32
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 (
12 sec.Function: 'waveInPrepareHeader'
23 sec.Function: 'GetIconInfo'
33 sec.Function: 'GetCurrentProcessId'
45 sec.Function: 'SetJob'
57 sec.Function: 'WritePrivateProfileSection'
1.12 min.Function: 'CreateDC'
1.33 min.Function: 'MAPIResolveName'
1.5 min.Function: 'GlobalLock'
1.68 min.Function: 'GdipFillPieI'
1.88 min.Function: 'JetTerm'
Advertise here!