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 / June 2005



Tip: Looking for answers? Try searching our database.

help please --- how to unload activex exe when client crashes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim Chen - 23 Jun 2005 15:47 GMT
Dear All,

I have a singleton ActiveX EXE server made in VB. When the out of process VB
clients release the object, the ActiveX exe gets unloaded properly.

My problem is only when any of the clients abruptly crash. It does not
release the reference and the ActiveX exe, is never unloaded.

* How can I gracefully detect from the server that the client no
longer exist?
* How can I unload the ActiveX exe, without abruptly killing the
process?

What is the method followed in such situation or any API can do that?
Regards,
Jim
Ken Halter - 23 Jun 2005 23:32 GMT
> Dear All,
>
[quoted text clipped - 13 lines]
> Regards,
> Jim

If it shows in the "Applications" tab in TaskManager, you may be able to
find the window and shut it down externally. Basically, yank its plug (kill
the process), it's a bit tougher if it only shows in the "Processes" tab but
still possible.

There's several "Process Related" samples here that may help...
http://www.thescarms.com/vbasic/VBProcessRelated.asp

If that AxEXE's linked to multiple exe's, it can get tricky. If it's just
for 1 exe, a decent way to let it kill itself is to raise an event every
second or so that passes a ByRef argument. The client app can change the
contents of that and return. If it comes back without any change, you know
there's no client listening. At that time, you can release all objects,
close forms, stop timers, whatever and the AxEXE should die on its own.

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..

Jim Chen - 24 Jun 2005 09:11 GMT
Thank you very much Ken. It helps a lot.

Jim

>> Dear All,
>>
[quoted text clipped - 28 lines]
> there's no client listening. At that time, you can release all objects,
> close forms, stop timers, whatever and the AxEXE should die on its own.
 
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.