Solved

timeSetEvent Error..

Posted on 2003-11-10
3
1,056 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
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 learn how to clear a vector as well as how to detect empty vectors in C++.

744 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

11 Experts available now in Live!

Get 1:1 Help Now