We are using .Net CF 2.0.
We want to start the device clock application using Process.Start and when
the clock is closed/exitted, we want to carry out some operations. We have
used the following code for the same:
private void btnAdjustSystemTime_Click(object sender, EventArgs e)
{
System.Diagnostics.Process proc = new
System.Diagnostics.Process();
proc.StartInfo.FileName = "Clock.exe";
proc.EnableRaisingEvents = true;
proc.Exited += new EventHandler(clockProc_Exited);
proc.Start();
}
void clockProc_Exited(object sender, EventArgs e)
{
//do something here
}
Once, while executing the above code got a NullReferenceException with only
one line in the StackTrace:
TermWaiter.WaitForTerm();
After the exception, the application just shut down.
Could not recreate this exception.
Can anyone help me to find out the cause for the exception and its solution?