The OpenWaitableTimer function returns a handle to an existing named “waitable” timer object.
HANDLE OpenWaitableTimer(
DWORD dwDesiredAccess, |
// access flag |
BOOL bInheritHandle, |
// inherit flag |
LPCTSTR lpTimerName |
// pointer to timer object name |
); |
|
This parameter can be any combination of the following values:
Value |
Meaning |
TIMER_ALL_ACCESS |
Specifies all possible access rights for the timer object. |
TIMER_MODIFY_STATE |
Enables use of the timer handle in the SetWaitableTimer and CancelWaitableTimer functions to modify the timer’s state. |
SYNCHRONIZE |
Enables use of the timer handle in any of the wait functions to wait for the timer’s state to be signaled. |
If the function succeeds, the return value is a handle to the timer object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
The OpenWaitableTimer function enables multiple processes to open handles to the same timer object. The function succeeds only if some process has already created the timer using the CreateWaitableTimer function. The calling process can use the returned handle in any function that requires the handle of a timer object, such as the wait functions, subject to the limitations of the access specified in the dwDesiredAccess parameter.
The returned handle can be duplicated by using the DuplicateHandle function. Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The timer object is destroyed when its last handle has been closed.
CancelWaitableTimer, CloseHandle, CreateProcess, CreateWaitableTimer, DuplicateHandle, SetWaitableTimer
file: /Techref/os/win/api/win32/func/src/f66_12.htm, 4KB, , updated: 2000/4/7 11:19, local time: 2024/12/2 04:06,
18.119.143.45:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/Techref/os/win/api/win32/func/src/f66_12.htm"> OpenWaitableTimer</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.