Process does not terminate

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • san

    #1

    Process does not terminate

    Hi,

    I have a C# windows application App.exe that uses a UI
    component from another dll that components.dll. Everything
    works fine except that when I close the window of App.exe
    the process does not terminate (I can see App.exe is the
    task manager). Also, I tried to see if control was
    returned to Main() after closing the UI (since
    Application.Run ( myForm ) is used control should be
    returned to Main() once the UI is closed. This does not
    seem to happen.

    I have resorted to Process.GetCurr entProcess().Ki ll().
    This is not a correct/elegant solution. Any suggestions?

    Regards,
    Sandeep
  • Chris LaJoie

    #2
    Re: Process does not terminate

    I don't believe that is what I would call 'elegant'. I have had a similar
    problem with my app using several threads and a UI component in a dll, but I
    couldn't get it to happen consistantly. Are you using any COM interop in
    your app? I believe that my problems could have stemmed from that.

    Just FYI, I'm not sure if the GC will clean up after you if you forcefully
    terminate an app that way. I haven't read up on the GC and it's functions,
    so I'm no expert. It might be worth looking into though, if you're going to
    be using that "hammer" to close your app.

    Chris

    "san" <sans11@hotmail .com> wrote in message
    news:04f501c353 3b$589bb080$a50 1280a@phx.gbl.. .[color=blue]
    > Hi,
    >
    > I have a C# windows application App.exe that uses a UI
    > component from another dll that components.dll. Everything
    > works fine except that when I close the window of App.exe
    > the process does not terminate (I can see App.exe is the
    > task manager). Also, I tried to see if control was
    > returned to Main() after closing the UI (since
    > Application.Run ( myForm ) is used control should be
    > returned to Main() once the UI is closed. This does not
    > seem to happen.
    >
    > I have resorted to Process.GetCurr entProcess().Ki ll().
    > This is not a correct/elegant solution. Any suggestions?
    >
    > Regards,
    > Sandeep[/color]


    Comment

    Working...