- Sep 30, 2001
- 12,684
- 2
- 81
I routinely have to connect to ActiveX servers and call various methods. The problem is said control is very buggy and often times I will call a function only to have it never finish executing thus locking my code. I've left it sitting for minutes at a time hoping something will finally finish but it never does. There are no exceptions being thrown, it just locks up.
I'm accessing the control through a VB.NET class that instantiates a copy of the ActiveX object and provides access to the underlying functions of the control.
What I'm wondering is if there are any ways to use a timeout for calling functions that belong to the ActiveX control. For instance, if the method call doesn't exit within 5000ms give up and perhaps try again or even close the ActiveX control and re-open it.
I'm accessing the control through a VB.NET class that instantiates a copy of the ActiveX object and provides access to the underlying functions of the control.
What I'm wondering is if there are any ways to use a timeout for calling functions that belong to the ActiveX control. For instance, if the method call doesn't exit within 5000ms give up and perhaps try again or even close the ActiveX control and re-open it.
