I have seen TerminateProcess being used when you want to kill a process, but
I've also seen that it is not recommended to use TerminateProcess. (I have
tried to use TerminateProcess, but it seems that the compiler can't find any
function with that name).
I have also seen solutions using SendMessage and passing WM_QUIT, however
then I guess you need to have a window open working together with the
process. I have a COM dll which has no attached window. Which is the best way
to close it? If it is TerminateProcess - how can I make that work?
Ken Halter - 21 Jul 2005 15:22 GMT
>I have seen TerminateProcess being used when you want to kill a process,
>but
[quoted text clipped - 7 lines]
> way
> to close it? If it is TerminateProcess - how can I make that work?
A DLL should "die" on its own when the last reference is released. If it's
staying in ram, there's probably something wrong inside somewhere. Most
likely a circular reference.
ActiveX Component Standards and Guidelines
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vb
conolecomponentstandardsguidelines.asp
ActiveX Component Shutdown
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vb
conolecomponentshutdown.asp
Visual Basic Component Shutdown Rules
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vb
convisualbasiccomponentshutdownrules.asp

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..