locked
Console app is killed too fast by Windows 7 when closed by user RRS feed

  • Question

  • I have a console application that was developed for Windows XP. It uses a control handler to trap the application close event so the application can be shut down gracefully before exiting. Unfortunately Windows 7 now ungracefully kills an application shortly after the control handler returns even if the control handler return value is TRUE.

    Previously in Windows XP the application was allowed to complete its shutdown logic, which may take several seconds, before the application died. In Windows Server 2008 I was able to modify my application to not return from the control handler until I knew the app was cleaned up but even this doesn't work anymore.

    Does Windows 7 have another mechanism that I can use to allow my application to complete its shutdown without being unceremoniously killed? The result is a nasty program error popup screen that I don't really want the user to see.

    Wednesday, June 23, 2010 12:38 AM

Answers

All replies