Announcement

Collapse
No announcement yet.

How to close Data Manager

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to close Data Manager

    Hi, my C# app has been designed to run once a day. I can successfully retrieve my required data and then close the eSignal main form using something like _eSignal = null;

    However, when the main form closes, the Data Manager remains open. I'd prefer for it to shut down at the same time.

    Does anybody know how to achieve this?

    Thanks

  • #2
    The eSignal application (winsig.exe) exits when your application terminated because the eSignal object is instantiated inside your C# code. However, the datamanager is a separate process which get spawned when the eSignal application starts. It doesn't get destroyed when you stop the eSignal application.

    In order to stop it manually and programmatically, you will have to kill the winros.exe process on your system.

    Anthony
    eSignal Developer Support

    Comment


    • #3
      Thanks for that Anthony, that makes perfect sense.

      I guess my next question is quite predictable... Does anybody know how to go about killing a process in C# ?

      Thanks
      Arold

      Comment


      • #4
        I haven't tried it myself, but I'd guess it would be something along the lines of:

        using System.Diagnostics;
        ...
        Process proc = Process.GetProcessByName("winros");
        proc.CloseMainWindow();
        proc.Close();

        or it might require:

        proc.Kill();


        Cheers... George

        Comment


        • #5
          Thanks GenSpoo, I didn't relaise that System.Diagnostics was so powerful. The code I used was almost identicle to that.

          Cheers again
          Arold

          Comment


          • #6
            How to close Data Manager

            Hi,
            I like the info in this thread, but please can someone translate it into good old fashion Visual Basic 6.
            I think I need to find a DECLARE for GetProcessByName, but I cant find it in any API files
            Thanks
            Wayne

            Comment


            • #7
              You should be able to use FindWindow to get the handle, then PostMessage using WM_CLOSE.

              Starr

              Comment

              Working...
              X