Article View: borland.public.cppbuilder.nativeapi
Article #12999Re: Not enough timers available
From: Yahia El-Qasem
Date: Mon, 03 Nov 2003 18:15
Date: Mon, 03 Nov 2003 18:15
17 lines
2058 bytes
2058 bytes
every TTimer uses a Win32 timer... these are limited... perhaps your client has already some apps running using timers... another point : I don't think it is a good idea to disable and enable the timer within the event beacause it results in destroying and recreating it everytime the event is triggered... I use in my apps a different approach... a state variable which gets initialized before the timer is enabled to 0... then at the beginning of the event handling code I incerement it... and check for it to be 1... if it is run my code.. and at the end of the event handler I decrement it ( independent of the value ).... this way it is sure that my code does not suffer from reentry via the timer event... and that I don't keep destroying and recreating Win32 timers... my apps run on Win NT and Win2K server machines... without ever seeing a problem like the one you describe happen. Yahia
Technical Details
Message-ID:
<3fa69bc0$2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3fa6983b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b8fa3a8b1adf4915 X-Google-Attributes: gid10cc67,public X-Google-Thread: f5c5c,b8fa3a8b1adf4915 X-Google-Attributes: gidf5c5c,public X-Google-ArrivalTime: 2003-11-03 10:33:51 PST Reply-To: "Yahia El-Qasem" <Yahia.El-Qasemno.spam@mgh.metro-ag.de> From: "Yahia El-Qasem" <Yahia.El-Qasem@mgh.metro-ag.de> Newsgroups: borland.public.cppbuilder.nativeapi,borland.public.cppbuilder.vcl.components.using References: <3fa6983b$1@newsgroups.borland.com> Subject: Re: Not enough timers available Date: Mon, 3 Nov 2003 19:15:13 +0100 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 217.83.97.43 Message-ID: <3fa69bc0$2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1067883456 217.83.97.43 (3 Nov 2003 10:17:36 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail