CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: closing time

  1. #1
    Join Date
    Feb 2000
    Location
    garden grove, california
    Posts
    64

    closing time

    how would i kill the program that is running, without an error?

    Subzero

  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: closing time

    Get the main window handle of that program and post it a WM_Close event. That should make it shutdown gracefully, if it is written well.

    RK

  3. #3
    Join Date
    Feb 2000
    Location
    Indiana
    Posts
    308

    Re: closing time

    If you REALLY need this program to close, you should do a couple of steps. Get a handle to the application and send the WM_CLOSE message. At this point, you could give the program a small amount of time to terminate and, if it's still running, use the TerminateThread API. If you have an understanding of C, check out the TLIST example on MSDN.


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

Featured