Solved

timeSetEvent Error..

Posted on 2003-11-10
3
1,065 Views
Last Modified: 2007-12-19

Platform : Win2K Pro/SP4,  VC7/WinMM

Hi All,
       I need some hi-resolution timers. (ranging 10ms to 25 ms). I know Windows may not be be able to maintain that resolution, but I can manage that. But the real problem is sometimes I get an error when calling timeSetEvent() function (Time ID NULL). I went thru MSDN real quick and I could not find any method to see the reason why it failed.

This is what I do.
        I have several streaming data channels (UDP).
        Every channel has a timer object for data dispatch.
        These channels could stop start timers at any time (normally they just keep running).
        I call timeSetEvent() on every channel object at beginning. (timer resolution 23 ms for testing)
        It works fine for ~20 channels.
        The rest fails on tiemSetEvent()

        I checked timeCaps. (min resolution 1ms)

Any idea whats wrong ?? Is there a limitation for timesetEvent() ???

~ J
0
Comment
Question by:mxjijo
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 125 total points
ID: 9716449
Yes, there is a limitation - see http://support.microsoft.com/default.aspx?scid=kb;EN-US;140104 ("HOWTO: Availability of Multimedia Timers"):

The number of multimedia timers your application can create at one time can vary based on the operating system it is running on and whether the application is 16-bit or 32-bit.

The following table gives an indication of what you can expect:

Operating System      16-bit app   32-bit app
--------------------------------------------------------------
Windows 3.11               8           0 (Not supported on Win32s)
Windows 95                32          32
Windows 98                32          32
Windows NT 3.51           16          16 per process
Windows NT 4.0            16          16 per process
Windows 2000              16          16 per process

0
 
LVL 8

Author Comment

by:mxjijo
ID: 9716473

What the.. !!!

thank u jkr :)
0
 

Expert Comment

by:twinstarjoe
ID: 14470625
What is this limit in Windows XP ?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now