Click here to Skip to main content
15,888,521 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ - code executed upon definite program termination Pin
pasztorpisti6-Apr-14 18:39
pasztorpisti6-Apr-14 18:39 
AnswerRe: C++ - code executed upon definite program termination Pin
Heng Xiangzhong7-Apr-14 16:26
Heng Xiangzhong7-Apr-14 16:26 
SuggestionRe: C++ - code executed upon definite program termination Pin
David Crow7-Apr-14 16:43
David Crow7-Apr-14 16:43 
GeneralRe: C++ - code executed upon definite program termination Pin
Heng Xiangzhong7-Apr-14 19:20
Heng Xiangzhong7-Apr-14 19:20 
GeneralRe: C++ - code executed upon definite program termination Pin
CPallini7-Apr-14 23:43
mveCPallini7-Apr-14 23:43 
GeneralRe: C++ - code executed upon definite program termination Pin
Heng Xiangzhong8-Apr-14 0:27
Heng Xiangzhong8-Apr-14 0:27 
GeneralRe: C++ - code executed upon definite program termination Pin
liquid_8-Apr-14 11:29
liquid_8-Apr-14 11:29 
GeneralRe: C++ - code executed upon definite program termination Pin
Heng Xiangzhong8-Apr-14 15:25
Heng Xiangzhong8-Apr-14 15:25 
Let met think.
If you don't think it is complex, hook is a good solution for this.

You can hook the ExitProcess API in win32 by inline, IAT or something you can do.
Because a process exits in windows through invoke the ExitProcess by itself, so after CRT lib destructs all the objects,
it will invoke ExitProcess, at that time, the control flow will give you a chance to execute your code.

If you don't know how to complete it, I can give a piece of code that i wrote before.


Nice to make friends with you !

My email, Henzox.7@gmail.com
QuestionOperator overload question Pin
econy5-Apr-14 13:42
econy5-Apr-14 13:42 
AnswerRe: Operator overload question Pin
Richard Andrew x645-Apr-14 15:18
professionalRichard Andrew x645-Apr-14 15:18 
GeneralRe: Operator overload question Pin
econy7-Apr-14 5:49
econy7-Apr-14 5:49 
GeneralRe: Operator overload question Pin
Richard MacCutchan7-Apr-14 6:04
mveRichard MacCutchan7-Apr-14 6:04 
AnswerRe: Operator overload question Pin
CPallini7-Apr-14 2:28
mveCPallini7-Apr-14 2:28 
GeneralRe: Operator overload question Pin
econy7-Apr-14 5:51
econy7-Apr-14 5:51 
GeneralRe: Operator overload question Pin
CPallini7-Apr-14 6:21
mveCPallini7-Apr-14 6:21 
QuestionReference variable assignment and copy constructor call Pin
trinh.nguyen4-Apr-14 19:05
trinh.nguyen4-Apr-14 19:05 
AnswerRe: Reference variable assignment and copy constructor call Pin
Randor 4-Apr-14 21:47
professional Randor 4-Apr-14 21:47 
GeneralRe: Reference variable assignment and copy constructor call Pin
trinh.nguyen4-Apr-14 23:10
trinh.nguyen4-Apr-14 23:10 
GeneralRe: Reference variable assignment and copy constructor call Pin
Randor 4-Apr-14 23:57
professional Randor 4-Apr-14 23:57 
QuestionSoftware USB write blocker for linux Pin
dream qq4-Apr-14 13:32
dream qq4-Apr-14 13:32 
QuestionHow to change tab event of property sheet Pin
kangte22223-Apr-14 15:15
kangte22223-Apr-14 15:15 
QuestionRe: How to change tab event of property sheet Pin
David Crow3-Apr-14 16:43
David Crow3-Apr-14 16:43 
AnswerRe: How to change tab event of property sheet Pin
Malli_S3-Apr-14 23:59
Malli_S3-Apr-14 23:59 
AnswerRe: How to change tab event of property sheet Pin
Randor 4-Apr-14 8:56
professional Randor 4-Apr-14 8:56 
QuestionGetWindowRect(),GetClientRect() question Pin
econy3-Apr-14 8:42
econy3-Apr-14 8:42 

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.