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
SetWaitableTimer
..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
Declaration:
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
Parameters:
hTimer
[in] Handle to the timer object. The CreateWaitableTimer or OpenWaitableTimer function returns this handle.

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

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

pfnCompletionRoutine
[in] Pointer to an optional completion routine.

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

fResume
[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  
FreeTranslation.com 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: 17
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.225.20.73)
15 sec.Example: 'Displaying icons in the system tray (VFP9)'
30 sec.Function: 'JetInit'
44 sec.Function: 'RegSaveKey'
59 sec.Function: 'FindText'
1.22 min.Function: 'mixerGetLineControls'
1.4 min.
Function group: 'GDI+'
1.58 min.Function: 'InternetDial'
1.82 min.Function: 'StrToInt'
2 min.Function: 'keybd_event'
2.22 min.Function: 'ShowHTMLDialog'
Google
Advertise here!