Module handling.....
-
How can i kill a module without terminating its process?....
-
How can i kill a module without terminating its process?....
what do you mean by module here ? you can abort or kill a thread (not a very good idea). you cant unload a class or assembly, but you can create a new AppDomain, load it, then remove it (with everything thats in it). :)
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }
-
what do you mean by module here ? you can abort or kill a thread (not a very good idea). you cant unload a class or assembly, but you can create a new AppDomain, load it, then remove it (with everything thats in it). :)
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }
Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.
-
Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.
A thread does not belong to anything, it is a living being. It gets created by some code, that code probably sits inside an EXE or a DLL file. Tossing out the code at run-time will not achieve the result you are after. whay do you mean by shotdown: is it the app wanting to terminate by itself, is it you telling the app to terminate, or is it you telling the PC to shut down (and then the PC telling all the apps and services of this fact) ? Did you create the EXE and the DLL files, so you can change the source files (and correct whatever you did wrong in the first place, if anything) ? Things to do depend on the answers. :)
Luc Pattyn
try { [Search CP Articles] [Search CP Forums] [Forum Guidelines] [My Articles] } catch { [Google] }
-
Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.
-
Then how can I know if a thread belongs to a cirtain dll/module. Its very important to me since a dll that I activate causes a crash at shotdown.
You can load this DLL, or whatever it is, into it's own AppDomain, but that's not going to stop it from crashing. And, it's more than likely not going to stop an error message from popping up either.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007