August 23rd, 1999, 07:48 AM
I'm creating a thread inside a dll, is it possible to set the thread so that when the process that loaded the dll dies, the thread will continue to execute ?
|
Click to See Complete Forum and Search --> : Keeping a thread alive August 23rd, 1999, 07:48 AM I'm creating a thread inside a dll, is it possible to set the thread so that when the process that loaded the dll dies, the thread will continue to execute ? ric980 August 23rd, 1999, 07:52 AM The process kills all its threads so this is not possible, but it does not kill all processes that has initiated. So use a process instead of a thread. Vasko August 23rd, 1999, 07:47 PM Use any windows hook (SetWindowsHookEx()) Windows hook makes your dll to be loaded in each running Win32 process address space (also in new created after hook is set) in dll init proc create the thread, (have in mind thread will not start executing while DllMain is on reguardless how you create it - so do not wait events from thread in DllMain - you will screw all proccesses) This will make all processes in system to have additional thread - so in order not to decrease performance you shall have something that filters which proccess to have thread and which not. WISH YOU Good luck in synchronizing these threads :) codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |