Michael Bate
2003-10-10 21:02:43 UTC
According to the Windows documentation (online at
/library/en-us/multimed/htm/_win32_multimedia_timers.asp) the callback
function invoked by a multimedia timer can only do VERY limited things,
mainly MIDI functions, a couple of other timing functions, and PostMessage.
The problem with PostMessage is that this places a message in the Windows
message queue, to be dealt with when Windows gets around to it. The whole
point of the multimedia timer, I thought, was to do things at a precisely
scheduled time.
I have seen code that calls SetEvent from the callback function, even though
this is technically illegal. I have written and tested such code, and it
seems to work OK. But I am nervous.
Does anyone have any information that I am missing?
Thanks in advance.
Michael Bate
Senior Software Developer
Radionics, Inc. a division of Tyco Healthcare
/library/en-us/multimed/htm/_win32_multimedia_timers.asp) the callback
function invoked by a multimedia timer can only do VERY limited things,
mainly MIDI functions, a couple of other timing functions, and PostMessage.
The problem with PostMessage is that this places a message in the Windows
message queue, to be dealt with when Windows gets around to it. The whole
point of the multimedia timer, I thought, was to do things at a precisely
scheduled time.
I have seen code that calls SetEvent from the callback function, even though
this is technically illegal. I have written and tested such code, and it
seems to work OK. But I am nervous.
Does anyone have any information that I am missing?
Thanks in advance.
Michael Bate
Senior Software Developer
Radionics, Inc. a division of Tyco Healthcare