Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

timeSetEvent Error..

Posted on 2003-11-10
3
Medium Priority
?
1,130 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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

721 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