Results 1 to 3 of 3

Thread: Monitor program with a separate thread

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Iowa USA
    Posts
    118

    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
    Last edited by Dean_Reedy; Jun 2nd, 2006 at 11:03 AM. Reason: Clearer

  2. #2
    Hyperactive Member
    Join Date
    Mar 2004
    Location
    Prato - Tuscany - Italy
    Posts
    461

    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?
    Live long and prosper (Mr. Spock)

  3. #3
    Addicted Member zahadumy's Avatar
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    187

    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...
    The first step in solving a problem is to define the problem clearly.

    -----
    Icons | EZIconConverter | Popup Messages
    101 samples: 2003 2005
    Code converter: C# -> VB .NET | VB .NET -> C# | VB .NET <-> C#


    -----
    Visual Studio 2005/.NET Framework 2.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width