Solved

How to detect process killed from TaskManager

Posted on 1998-10-15
2
544 Views
Last Modified: 2013-11-20
MFC app. How to detect if the process is being killed from taskmanager by clicking on "End process" button. The app needs to clean up and exit gracefully.
0
Comment
Question by:ames
2 Comments
 
LVL 86

Expert Comment

by:jkr
Comment Utility
No chance... taskmgr.exe kills a process using 'TerminateProcess()', thus there is no possibility to intercept this...
0
 
LVL 1

Accepted Solution

by:
arunprakash earned 200 total points
Comment Utility
hi,
yes u can U can do it .
Override WM_QUERYENDSESSION when the application terminates u will get this message. Im 300% sure about it,

bye,
Arun
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now