Solved

timeSetEvent Error..

Posted on 2003-11-10
3
1,096 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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 video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

728 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