alarm() on PC/MSoft (long)
mikeg at rocketmail.com
Mon Nov 3 21:49:17 PST 1997
---"John D. Gwinner" <gwinner at northnet.org> wrote:
> Note: there's a solution here, but first some
> > > Is there a message pump in the app? SetTimer,
> > with a processor
> > > callback, won't work without a message loop, I
> > believe.
> > I'll verify it at the moment I finish this reply
> > I clearly read from MS Developers Network CDs
> > is one of the two. Either a message loop in which
> > application gets WM_TIMER message OR a function
> > back. If this does not work I don't know what to
> > Some people claim that kaffe works fine under
> > build. I hope they tried more then HelloWorldApp.
> > does not need any threads.
> As I mentioned, it was an MSJ article: check out
Volume 12, number 3,
> "Under the Hood" by Matt Pietrek. It's on the
October MSDN, if you've got
> that handy.
> With this quick review out of the way, consider a
question Ive heard
> several times recently: "Ive called SetTimer in a
program that doesnt
> have any windows. Therefore, I set the timer to
call a function, rather
> than post a message to a window. However, my timer
callback (see Figure 1)
> is never called."
> .... Fig 1 snipped
> My immediate response is to ask if their program
has a DispatchMessage
> loop. Theyll reply that they shouldnt need one.
After all, they told
> SetTimer to call their TIMERPROC rather than post a
message. The problem
> is that calling DispatchMessage isnt optional if
youre using timers. As
> youll see later, DispatchMessage is needed for
both varieties of timer
> notifications (that is, window messages and
> In reading the Remarks section of the 32-bit
> youll come across this: "When you specify a
TimerProc callback function,
> the DispatchMessage function simply calls the
callback function instead of
> the window procedure. Therefore, you need to
dispatch messages in the
> calling thread, even when you use TimerProc instead
I read today the same in MSDN CD-roms. The bottom
line is that, so far, it looks that there is no way
to have an async event for a Win process. This is so
fundamentaly basic that it is hard for me to belive.
I'll post a question on MS developers mailing lists.
I can't belive that nobody came up with a solution.
I talked today to a friend who works with NT kernel
and she told me that such facility is available in the
kernel. My instructor for NT kernel/drivers said that
the lack of these facilities are what makes NT very
I don't give up yet. I'll find it.
Sent by RocketMail. Get your free e-mail at http://www.rocketmail.com
More information about the kaffe