Click here to Skip to main content
16,010,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to use delete for CStringList Pin
Max++28-Nov-08 19:04
Max++28-Nov-08 19:04 
AnswerRe: How to use delete for CStringList Pin
Mark Salsbery28-Nov-08 19:16
Mark Salsbery28-Nov-08 19:16 
QuestionTerminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat28-Nov-08 11:19
Code-o-mat28-Nov-08 11:19 
AnswerRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Mark Salsbery28-Nov-08 11:57
Mark Salsbery28-Nov-08 11:57 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat28-Nov-08 12:20
Code-o-mat28-Nov-08 12:20 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Randor 28-Nov-08 12:37
professional Randor 28-Nov-08 12:37 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat29-Nov-08 0:23
Code-o-mat29-Nov-08 0:23 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Randor 29-Nov-08 17:24
professional Randor 29-Nov-08 17:24 
You did not mention when your DLL unloads but if the host process is exiting by way of the ExitProcess Function then the first thing that happens is termination of threads. ExitThread is never called, your thread is killed by the TerminateThread Function. Then your DLL is unloaded. At this point your thread is already dead. If you do not have any control ofer the source code/functionality of the host process then there is essentially nothing that you can do. Unless you hook the host process functions of course. Now that I think about it.. hooking FreeLibrary will get you nowhere. ExitProcess would perhaps be a better candidate.

Better yet, you could just design your DLL so it doesn't have to do all this crap when forcibly unloaded.

Best Wishes,
-David Delaune
AnswerRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Richard Andrew x6428-Nov-08 12:40
professionalRichard Andrew x6428-Nov-08 12:40 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat28-Nov-08 23:39
Code-o-mat28-Nov-08 23:39 
AnswerRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Jijo.Raj28-Nov-08 12:41
Jijo.Raj28-Nov-08 12:41 
GeneralRe: Terminating threads cleanly in a DLL when it is unloaded Pin
Code-o-mat28-Nov-08 23:56
Code-o-mat28-Nov-08 23:56 
QuestionGDI+ MeasureString - optional codepointsFitted function parameter Pin
bob1697228-Nov-08 10:16
bob1697228-Nov-08 10:16 
AnswerRe: GDI+ MeasureString - optional codepointsFitted function parameter Pin
Randor 28-Nov-08 13:27
professional Randor 28-Nov-08 13:27 
GeneralRe: GDI+ MeasureString - optional codepointsFitted function parameter Pin
bob1697228-Nov-08 14:34
bob1697228-Nov-08 14:34 
GeneralRe: GDI+ MeasureString - optional codepointsFitted function parameter Pin
Randor 28-Nov-08 14:48
professional Randor 28-Nov-08 14:48 
QuestionHow to get "MAC Number"? Pin
Joseph Marzbani28-Nov-08 9:43
Joseph Marzbani28-Nov-08 9:43 
AnswerRe: How to get "MAC Number"? Pin
Jijo.Raj28-Nov-08 9:59
Jijo.Raj28-Nov-08 9:59 
GeneralRe: How to get "MAC Number"? Pin
Joseph Marzbani28-Nov-08 10:38
Joseph Marzbani28-Nov-08 10:38 
GeneralRe: How to get "MAC Number"? Pin
Jijo.Raj28-Nov-08 12:36
Jijo.Raj28-Nov-08 12:36 
AnswerRe: How to get "MAC Number"? Pin
Code-o-mat28-Nov-08 10:09
Code-o-mat28-Nov-08 10:09 
GeneralRe: How to get "MAC Number"? Pin
Joseph Marzbani28-Nov-08 10:36
Joseph Marzbani28-Nov-08 10:36 
QuestionHow to Initializing CString in constructor Pin
krishnakumartm28-Nov-08 8:35
krishnakumartm28-Nov-08 8:35 
AnswerRe: How to Initializing CString in constructor Pin
Maximilien28-Nov-08 8:50
Maximilien28-Nov-08 8:50 
AnswerRe: How to Initializing CString in constructor Pin
Code-o-mat28-Nov-08 8:53
Code-o-mat28-Nov-08 8:53 

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.