DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Magnus Guest

    Closing a different application


    Anyone who knows a descent way to properly close another application? I've
    been struggling with a number of api's such as TerminateProcess and more.

    I need the shutdown to properly notify any DLL's so there aren't any garbage
    left in memory. ExitProcess seems to do the job but how??? It only shut down
    the process where I call it from.

    TerminateProcess works but it seems to be a violent way to shut down.



  2. #2
    Jim Deutch Guest

    Re: Closing a different application

    The polite way is to PostMessage() its main window with a WM_CLOSE.

    Jim Deutch
    MS Dev MVP

    Magnus wrote in message <390957f4$1@news.devx.com>...
    >
    >Anyone who knows a descent way to properly close another application? I've
    >been struggling with a number of api's such as TerminateProcess and more.
    >
    >I need the shutdown to properly notify any DLL's so there aren't any

    garbage
    >left in memory. ExitProcess seems to do the job but how??? It only shut

    down
    >the process where I call it from.
    >
    >TerminateProcess works but it seems to be a violent way to shut down.
    >
    >




  3. #3
    Jim Deutch Guest

    Re: Closing a different application

    The polite way is to PostMessage() its main window with a WM_CLOSE.

    Jim Deutch
    MS Dev MVP

    Magnus wrote in message <390957f4$1@news.devx.com>...
    >
    >Anyone who knows a descent way to properly close another application? I've
    >been struggling with a number of api's such as TerminateProcess and more.
    >
    >I need the shutdown to properly notify any DLL's so there aren't any

    garbage
    >left in memory. ExitProcess seems to do the job but how??? It only shut

    down
    >the process where I call it from.
    >
    >TerminateProcess works but it seems to be a violent way to shut down.
    >
    >




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links