Alon Marx
May 9th, 1999, 03:46 AM
I am trying to set an event using a multimedia timer (wish I could use the NT WaitableTimer..).
Using the following code simply does not work. The only thing I could do is use a callback instead of an event handle, but then I discovered that the SetEvent function could not be called in a multimedia timer callback...
Why can't I use the handle option of timeSetEvent?
Thanks, Alon
HANDLE handle = CreateEvent(NULL, FALSE, FALSE, NULL);
.
.
.
// Start multimedia timer
// The following does not work :
UINT flags = fPeriodic ? (TIME_CALLBACK_EVENT_SET|TIME_PERIODIC)
: (TIME_CALLBACK_EVENT_SET|TIME_ONESHOT);
mmr = timeSetEvent(delay, resolution, (LPTIMECALLBACK)handle, 0, flags);*/
Using the following code simply does not work. The only thing I could do is use a callback instead of an event handle, but then I discovered that the SetEvent function could not be called in a multimedia timer callback...
Why can't I use the handle option of timeSetEvent?
Thanks, Alon
HANDLE handle = CreateEvent(NULL, FALSE, FALSE, NULL);
.
.
.
// Start multimedia timer
// The following does not work :
UINT flags = fPeriodic ? (TIME_CALLBACK_EVENT_SET|TIME_PERIODIC)
: (TIME_CALLBACK_EVENT_SET|TIME_ONESHOT);
mmr = timeSetEvent(delay, resolution, (LPTIMECALLBACK)handle, 0, flags);*/