M
Merlynx
I am using TimerCallback to call a method in an activex dll repeatedly. The
TimerCallback works fines but when i exit the program, it still shows up in
the taskmgr i.e still running. So i use the Dispose method to release
resource from the thread on closing but still it doesn't work. I was
thinking whether it was the dll the culprit, which is better out process or
something else?
static System.Threading.Timer tr;
private void run(object state){
long value = test.MonitorRAS();
switch(value){
case 1:MessageBox.Show("Connected");break;
case 0:MessageBox.Show
("Disconnected");break;
}
}
private void Callback(){
TimerCallback call = new TimerCallback(run);
tr = new System.Threading.Timer
(call,null,0,20);
}
TimerCallback works fines but when i exit the program, it still shows up in
the taskmgr i.e still running. So i use the Dispose method to release
resource from the thread on closing but still it doesn't work. I was
thinking whether it was the dll the culprit, which is better out process or
something else?
static System.Threading.Timer tr;
private void run(object state){
long value = test.MonitorRAS();
switch(value){
case 1:MessageBox.Show("Connected");break;
case 0:MessageBox.Show
("Disconnected");break;
}
}
private void Callback(){
TimerCallback call = new TimerCallback(run);
tr = new System.Threading.Timer
(call,null,0,20);
}