Monitor program with a separate thread
I have a Vb 2005 program which is connecting to a GoldFax server using a dll. This vb program connects to the Fax server and sends data telling the fax server to send a fax and what data to use. Basically is a connection between fax server and legacy Company software.
The problem is that the program locks up about once every two days or so for no apparent reason. If I stop and start the VB program then everything is fine. It locks up during making the connection to the fax server. The whole program locks up and you can not press any buttons or anything.
My question is, if I start another thread that monitors the Program will that thread lock as the rest of the program locks up?
Thanks,
Dean
Re: Monitor program with a separate thread
I suggest you to start another application. Your main app. will set a registry key to 1 every 5 minutes. Your watchdog app. will reset the same key from 1 to 0 every 10 minutes, but if the key will be found=0, it will mean your main app. is locked, so your watchdog will kill and restart it. Isn't it?
Re: Monitor program with a separate thread
Quote:
Originally Posted by Dean_Reedy
My question is, if I start another thread that monitors the Program will that thread lock as the rest of the program locks up
I think he's trying to find out why the application is locking, not to restart it when it's locking.
I think if you start another thread in the same application it shouldn't lock if the problem is with the connection to the server, but I would start another application to monitor the other application just to be sure, because you said when the application hangs you can't press any button or anything...