Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / July 2005



Tip: Looking for answers? Try searching our database.

Terminate a running dll

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aaa - 21 Jul 2005 14:11 GMT
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..

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.