Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: P/Invoke Pin
rushiraj.jhala9-Mar-07 18:46
rushiraj.jhala9-Mar-07 18:46 
AnswerRe: P/Invoke Pin
prasad_som9-Mar-07 22:16
prasad_som9-Mar-07 22:16 
AnswerRe: P/Invoke Pin
led mike9-Mar-07 4:35
led mike9-Mar-07 4:35 
QuestionMouse & Keyboard Focus Pin
Sydes9-Mar-07 3:08
Sydes9-Mar-07 3:08 
QuestionHow can i remove some application of appear in Task manager ? Pin
Yanshof9-Mar-07 3:06
Yanshof9-Mar-07 3:06 
AnswerRe: How can i remove some application of appear in Task manager ? Pin
Chris Losinger9-Mar-07 3:25
professionalChris Losinger9-Mar-07 3:25 
GeneralRe: How can i remove some application of appear in Task manager ? Pin
Yanshof9-Mar-07 3:39
Yanshof9-Mar-07 3:39 
GeneralRe: How can i remove some application of appear in Task manager ? Pin
Roger Stoltz9-Mar-07 4:52
Roger Stoltz9-Mar-07 4:52 
I suggest you think this through once again.

If the user wants to end an application from the Task Manager, a WM_CLOSE message is sent to the main window of the application. This starts the same call chain as if the user shuts down the application the normal way.
If the application for some reason doesn't close, the Task Manager will ask the user if he/she wants to terminate the application after a certain timeout. If the user answers 'yes' to that question the Task Manager will terminate the application with a call to ::TerminateProcess() brute force. There is nothing you can do about this because this is how the system works; your application will die instantly but you had the opportunity to shut it down nicely.

This means that the only situation in which you would be unable to save your database correctly is when your application has already hung, i.e. the user would not be able to shut it down the normal way.

In short:
Even if it was possible to prevent a call to ::TerminateProcess(), you would be unable to do anything because the application has deadlocked or similar.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown

GeneralRe: How can i remove some application of appear in Task manager ? Pin
Yanshof9-Mar-07 5:54
Yanshof9-Mar-07 5:54 
GeneralRe: How can i remove some application of appear in Task manager ? Pin
Mark Salsbery9-Mar-07 11:57
Mark Salsbery9-Mar-07 11:57 
GeneralRe: How can i remove some application of appear in Task manager ? Pin
cp98769-Mar-07 18:01
cp98769-Mar-07 18:01 
GeneralRe: How can i remove some application of appear in Task manager ? Pin
Rajesh R Subramanian9-Mar-07 3:54
professionalRajesh R Subramanian9-Mar-07 3:54 
QuestionError ::implicit cast of pointer to non-equal pointer Pin
harshadha9-Mar-07 2:14
harshadha9-Mar-07 2:14 
QuestionRe: Error ::implicit cast of pointer to non-equal pointer Pin
Cedric Moonen9-Mar-07 2:53
Cedric Moonen9-Mar-07 2:53 
QuestionRe: Error ::implicit cast of pointer to non-equal pointer Pin
vibindia9-Mar-07 2:56
vibindia9-Mar-07 2:56 
QuestionRe: Error ::implicit cast of pointer to non-equal pointer Pin
David Crow9-Mar-07 3:00
David Crow9-Mar-07 3:00 
QuestionNo Subject Pin
harshadha9-Mar-07 2:12
harshadha9-Mar-07 2:12 
QuestionVC++.net dll Pin
rushiraj.jhala9-Mar-07 1:56
rushiraj.jhala9-Mar-07 1:56 
QuestionRe: VC++.net dll Pin
Rajesh R Subramanian9-Mar-07 2:05
professionalRajesh R Subramanian9-Mar-07 2:05 
AnswerRe: VC++.net dll Pin
rushiraj.jhala9-Mar-07 2:33
rushiraj.jhala9-Mar-07 2:33 
GeneralRe: VC++.net dll Pin
Rajesh R Subramanian9-Mar-07 3:43
professionalRajesh R Subramanian9-Mar-07 3:43 
QuestionFindFirstFile fails on Windows 64 XP Pin
AdiBhapse9-Mar-07 1:54
AdiBhapse9-Mar-07 1:54 
QuestionRe: FindFirstFile fails on Windows 64 XP Pin
David Crow9-Mar-07 3:03
David Crow9-Mar-07 3:03 
QuestionRe: FindFirstFile fails on Windows 64 XP Pin
AdiBhapse11-Mar-07 19:02
AdiBhapse11-Mar-07 19:02 
AnswerRe: FindFirstFile fails on Windows 64 XP Pin
David Crow12-Mar-07 3:15
David Crow12-Mar-07 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.