R
r norman
Please excuse the cross-posting. This question was raised in
microsoft.public.dotnet.general but hasn't been answered so I am
trying where I can.
There are two of us who have the same problem in a service: the
Timer::Tick event processor never gets called. We have set the timer
interval, enabled it, and started it, but still nothing.
In my case, I also have enabled an event handler to detect
SessionSwitch, but that never gets called either. Yes, I enabled the
CanHandleSessionChangeEvent property. My event processors write to a
log file, as do OnStart and OnStop service events but only the latter
log entries ever appear. My timer code works perfectly well in a form
program, but not my service.
I am new to dotNet programming so I don't understand what is behind
the scenes. No doubt I (we) are neglecting something simple. For
example, I know that in ordinary Win32 programming, responding to a
timer or to session events requires a window (albeit invisible in a
service) with a message pump, something that a service would not
ordinarily have. Is that the problem?
How do you use a timer in a service?
microsoft.public.dotnet.general but hasn't been answered so I am
trying where I can.
There are two of us who have the same problem in a service: the
Timer::Tick event processor never gets called. We have set the timer
interval, enabled it, and started it, but still nothing.
In my case, I also have enabled an event handler to detect
SessionSwitch, but that never gets called either. Yes, I enabled the
CanHandleSessionChangeEvent property. My event processors write to a
log file, as do OnStart and OnStop service events but only the latter
log entries ever appear. My timer code works perfectly well in a form
program, but not my service.
I am new to dotNet programming so I don't understand what is behind
the scenes. No doubt I (we) are neglecting something simple. For
example, I know that in ordinary Win32 programming, responding to a
timer or to session events requires a window (albeit invisible in a
service) with a message pump, something that a service would not
ordinarily have. Is that the problem?
How do you use a timer in a service?