Re: timeSetEvent() wraps after inteval of 429496
- From: "Tobia Quantrill" <xeres@xxxxxx>
- Date: Fri, 10 Jun 2005 09:31:12 +0200
"Chris P." <msdn@xxxxxxxxxxxx> wrote in message
news:q9ca7uqmj1rd$.1v08n1w09vq3u.dlg@xxxxxxxxxxxxx
>
> There is a bug in timeSetEvent(), which is used to schedule a callback
> after a given period, in that if the period is greater than 429496
> milliseconds the actual time period will wrap back to x-429496. So for
> example, setting a period of 430000 which generate a callback in 504ms.
> This is despite the capabilities reported by timeGetDevCaps() reporting
the
> maximum supported value is 1000000.
>
> The actual exports for these time functions are in winmm.dll, and this bug
> seems to have been there for quite a while. I've tested on XP SP2 back to
> Win2K, but don't have anything older on hand. I don't see how it could be
> used as a security compromise in any way, but the behavior is definately
> unexpected.
>
You can always use IReferenceClock.
IReferenceClock* pRefClock;
CoCreateInstance(CLSID_SystemClock,NULL,CLSCTX_INPROC_SERVER,IID_IReferenceC
lock,(void**)&pRefClock);
Now you can use Advise() or AdvisePeriodic() method.
--
It is practically impossible to teach good programming to students that have
had a prior exposure to BASIC: as potential programmers they are mentally
mutilated beyond hope of regeneration. (Edsger Dijkstra 1930-2002)
.
- References:
- BUG: timeSetEvent() wraps after inteval of 429496
- From: Chris P.
- BUG: timeSetEvent() wraps after inteval of 429496
- Prev by Date: Re: waveInClose returns WAVERR_STILLPLAYING
- Next by Date: Re: timeSetEvent() wraps after inteval of 429496
- Previous by thread: Re: timeSetEvent() wraps after inteval of 429496
- Next by thread: Proposed "RF64" file format defines new speaker positions: opoinions?
- Index(es):
Relevant Pages
|
|