Re: Basic questions about queue timers
- From: "djohnson" <programmer123@xxxxxxx>
- Date: 16 Jan 2006 12:14:54 -0800
Thanks for pulling me in the right direction. Queue timer is exactly
what I need. Now it seems clear and I got this little test code
working exactly as expected. My main problem is that I had my
elapsed time in the 'period' parameter instead of the 'duetime'
parameter, and I needed to set period to 0.
I'm still not sure how to pass my own parameters thru the callback
function but I guess that's for another topic.
BOOL success;
DWORD dueTime;
// queue the timer
dueTime=1000;
success = ::CreateTimerQueueTimer(&m_timerHandle, NULL, TimerProc,
this, dueTime, 0, WT_EXECUTEONLYONCE);
dueTime=1500;
success = ::CreateTimerQueueTimer(&m_timerHandle, NULL, TimerProc,
this, dueTime, 0, WT_EXECUTEONLYONCE);
dueTime=2000;
success = ::CreateTimerQueueTimer(&m_timerHandle, NULL, TimerProc,
this, dueTime, 0, WT_EXECUTEONLYONCE);
dueTime=3000;
success = ::CreateTimerQueueTimer(&m_timerHandle, NULL, TimerProc,
this, dueTime, 0, WT_EXECUTEONLYONCE);
.
- Follow-Ups:
- Re: Basic questions about queue timers
- From: Doug Harrison [MVP]
- Re: Basic questions about queue timers
- References:
- Basic questions about queue timers
- From: djohnson
- Re: Basic questions about queue timers
- From: Doug Harrison [MVP]
- Basic questions about queue timers
- Prev by Date: CSimpleArray CSimpleMap Serialization
- Next by Date: Database in memory
- Previous by thread: Re: Basic questions about queue timers
- Next by thread: Re: Basic questions about queue timers
- Index(es):