Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Mar : Delphi 6 TimeSetEvent Problem

www.cryer.info
Managed Newsgroup Archive

Delphi 6 TimeSetEvent Problem

Subject:Delphi 6 TimeSetEvent Problem
Posted by:"WA Support" (suppo..@wildapache.net)
Date:Thu, 31 Mar 2005 13:41:50

Hello,

I am trying to help a friend understand a problem he is having with the
TimeSetEvent function in Delphi 6.

Microsoft defines  timeSetEven like so:

MMRESULT timeSetEvent(UINT uDelay, UINT uResolution, LPTIMECALLBACK
lpTimeProc, DWORD dwUser, UINT fuEvent);

Arguments:
uDelay - Event delay, in milliseconds. Pretty much the same as uElapse
in SetTimer.
uResolution - Resolution of the timer event, in milliseconds.
lpTimeProc - Pointer to the callback function that we want to be called
periodically.
dwUser - User data passed to the callback function.
fuEvent - Timer event type. May be either TIME_ONESHOT, in which case
the callback function is called only once, or TIME_PERIODIC for periodic
calling.

My friend says that he can not use a value greater than 999000
milliseconds for uDelay or the function dies.  He has tried many values
for uResolution, but all with the same results.

To get around the 999000 milliseconds limit, he has put a sleep call in
the callback function dwUser to put the process to sleep for the amount
of time he needs timeSetEvent to actually run.

Has anyone ever run into a limit on the number of milliseconds that can
be fed into timeSetEvent?  If not, then what could possibly cause the
limitation that we are experiencing?

I can furnish the problematic code if necessary.

Thank you,

Murrah

Replies:

www.cryer.info
Managed Newsgroup Archive