B
Berndt Johansson
Hi
I just stumbled into a strange problem that I don't understand. My launcher
application starts an executable after the load event. Actually I have the
Load event handler set a timer for 200ms and the timer's Tick handler will
do some work and then eventually start the application using Process.Start.
In the execution of the Timer event I use a Process.WaitForExit function to
halt the execution until the started application exits. This usually works
fine, but not always. Our fault reporting system stopped working when people
started using the launcher application and the reason for this seems to be
that the timer's event handler will not finish until the launched
application is closed.
For some reason it seems to me that the Remedy system stopped to receive
window messages when my launcher application was running the timer event.
When that timer event was finished executing (the launched application was
closed) the Remedy application would just continue to work as nothing had
happened.
Why is this not happening for all applications?
My workaround was to use a separate thread that would launch the executable.
I was still able to use the WaitForExit and when the tread was finished, the
launcher would also exit.
But the behaviour really puzzles me!
Can anyone please shed some light on this?
/Berndt
I just stumbled into a strange problem that I don't understand. My launcher
application starts an executable after the load event. Actually I have the
Load event handler set a timer for 200ms and the timer's Tick handler will
do some work and then eventually start the application using Process.Start.
In the execution of the Timer event I use a Process.WaitForExit function to
halt the execution until the started application exits. This usually works
fine, but not always. Our fault reporting system stopped working when people
started using the launcher application and the reason for this seems to be
that the timer's event handler will not finish until the launched
application is closed.
For some reason it seems to me that the Remedy system stopped to receive
window messages when my launcher application was running the timer event.
When that timer event was finished executing (the launched application was
closed) the Remedy application would just continue to work as nothing had
happened.
Why is this not happening for all applications?
My workaround was to use a separate thread that would launch the executable.
I was still able to use the WaitForExit and when the tread was finished, the
launcher would also exit.
But the behaviour really puzzles me!
Can anyone please shed some light on this?
/Berndt