Hey guys, does anyone have any experience with Waitable Timers cause I'm having a bit of bother with them.

I create one with (surprise surprise again) SetWaitableTimer and again everythings grand, I get back a none -ero value.

Now if I call WaitForSingleObject evrything works, the thread suspend for appropiate timeout and then continues, the problem is that I really want to not suspend the thread but just have the callback routine called after the timeout but it just never gets called.

I've read over msdn (heres the link for those interested) and I can't see why it shouldn't work. Am I using this thing out of the context it's ment to be used?

Thanks anyone if you can offer help, Eoin.
Posted on 2004-03-25 15:10:11 by Eóin

[...]and the thread that set the timer calls the completion routine when it enters an alertable wait state.

That's how Async Procedure Calls are done... so I'm afraid you'll have to Sleep() (or do another action that puts you in a wait state).
Posted on 2004-03-25 15:20:54 by f0dder
Create a separate thread that waits and then triggers the callback?

Otherwise like f0dder said you'll have to Sleep(). I think SleepEx() with bAlertable = TRUE will do this.
Posted on 2004-03-25 16:20:02 by iblis
Thanks guys, its a pity but I can think of a work around for my particular prob. Cheers.
Posted on 2004-03-26 18:05:53 by Eóin