Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionproblem with conversion of string to float Pin
materatsu27-Jan-12 12:22
materatsu27-Jan-12 12:22 
AnswerRe: problem with conversion of string to float Pin
«_Superman_»27-Jan-12 16:02
professional«_Superman_»27-Jan-12 16:02 
AnswerRe: problem with conversion of string to float Pin
gebri28-Jan-12 0:35
gebri28-Jan-12 0:35 
AnswerRe: problem with conversion of string to float Pin
Bram van Kampen28-Jan-12 14:27
Bram van Kampen28-Jan-12 14:27 
AnswerRe: problem with conversion of string to float Pin
materatsu30-Jan-12 5:51
materatsu30-Jan-12 5:51 
GeneralRe: problem with conversion of string to float Pin
David Crow30-Jan-12 6:46
David Crow30-Jan-12 6:46 
GeneralRe: problem with conversion of string to float Pin
Stefan_Lang31-Jan-12 2:28
Stefan_Lang31-Jan-12 2:28 
QuestionDetecting if process is killed. Pin
Code-o-mat27-Jan-12 11:29
Code-o-mat27-Jan-12 11:29 
Hey folks!

I am trying to detect when my process is 'forcefully ended' in task manager. I am not trying to prevent this, just want to know this is happening so i can make some log entries and create dumps and such. Googling around suggested hooking 'TerminateProcess' in task manager which i did and it works great as long as the user is ending the process on the 'Processes' tabpage. However -and i think this is more likely to happen- the user kills the program from the 'Applications' tabpage, TerminateProcess in taskmanager isn't invoked. Now my question is: what happens when the user hits 'End Task' on the 'Applications' tabpage? I made a little app and froze it (with Sleep(INFINITE)) to test upon. When i hit 'End Task' on the 'Applications' page and i got asked if i want to end the program i checked where the dialog asking this question came from and it seems to originate from csrss.exe (this was under Windows XP). So it seems that TaskManager somehow passes the job of killing the application to another process.
Do you know how this happens or how i could find out?

Thanks in advance for any suggestions.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<

AnswerRe: Detecting if process is killed. Pin
Richard Andrew x6427-Jan-12 12:08
professionalRichard Andrew x6427-Jan-12 12:08 
GeneralRe: Detecting if process is killed. Pin
Code-o-mat27-Jan-12 21:52
Code-o-mat27-Jan-12 21:52 
GeneralRe: Detecting if process is killed. Pin
jschell28-Jan-12 4:25
jschell28-Jan-12 4:25 
GeneralRe: Detecting if process is killed. Pin
Code-o-mat28-Jan-12 7:59
Code-o-mat28-Jan-12 7:59 
AnswerRe: Detecting if process is killed. Pin
Randor 28-Jan-12 4:59
professional Randor 28-Jan-12 4:59 
GeneralRe: Detecting if process is killed. Pin
Code-o-mat28-Jan-12 10:49
Code-o-mat28-Jan-12 10:49 
GeneralRe: Detecting if process is killed. Pin
Randor 28-Jan-12 11:59
professional Randor 28-Jan-12 11:59 
GeneralRe: Detecting if process is killed. Pin
Code-o-mat28-Jan-12 23:33
Code-o-mat28-Jan-12 23:33 
GeneralRe: Detecting if process is killed. Pin
Randor 29-Jan-12 11:03
professional Randor 29-Jan-12 11:03 
GeneralRe: Detecting if process is killed. Pin
Code-o-mat1-Feb-12 3:03
Code-o-mat1-Feb-12 3:03 
GeneralRe: Detecting if process is killed. Pin
Randor 1-Feb-12 7:32
professional Randor 1-Feb-12 7:32 
QuestionParsing in C Pin
Software200727-Jan-12 8:29
Software200727-Jan-12 8:29 
AnswerRe: Parsing in C Pin
Chris Meech27-Jan-12 8:57
Chris Meech27-Jan-12 8:57 
GeneralRe: Parsing in C Pin
Software200727-Jan-12 9:09
Software200727-Jan-12 9:09 
GeneralRe: Parsing in C Pin
Chris Meech27-Jan-12 9:28
Chris Meech27-Jan-12 9:28 
GeneralRe: Parsing in C Pin
CPallini28-Jan-12 23:03
mveCPallini28-Jan-12 23:03 
GeneralRe: Parsing in C Pin
Erudite_Eric29-Jan-12 21:10
Erudite_Eric29-Jan-12 21:10 

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.