C
Christian Kesselheim via .NET 247
Hi!
Quite recently, I've been facing the situation of having to wrapup a (buggy) third-party activex control in .NET in order toexpose its functionality via http webservices. After someunpleasant experiments involving AppDomain's, Thread.Abort(),W32 TerminateThread(), I had everything working exactly the wayI wanted it (clean AppDomain unload in case of an segfaults,etc), except for the rare case in which the OCX itself decidedto go for some endless loop and my thread never returned fromunmanaged code.
After spending some time investigating different newsgroups, etc,it occured to me that there really was no way of terminating athread within unmanaged code in the current version of the .NETframework (1.1). Nevertheless, since I'm not willing (nor able)to throw in the towel yet, I'm still hunting for the bestpossible solution to my particular problem.
Do you think wrapping the nasty OCX into another instance ofSystem.Diagnostics.Process, handling all communication via .NETRemoting and invoking Process.Kill when necessary would meet myneeds, perhaps?
Thnx in advance. Regards,
Chris
Quite recently, I've been facing the situation of having to wrapup a (buggy) third-party activex control in .NET in order toexpose its functionality via http webservices. After someunpleasant experiments involving AppDomain's, Thread.Abort(),W32 TerminateThread(), I had everything working exactly the wayI wanted it (clean AppDomain unload in case of an segfaults,etc), except for the rare case in which the OCX itself decidedto go for some endless loop and my thread never returned fromunmanaged code.
After spending some time investigating different newsgroups, etc,it occured to me that there really was no way of terminating athread within unmanaged code in the current version of the .NETframework (1.1). Nevertheless, since I'm not willing (nor able)to throw in the towel yet, I'm still hunting for the bestpossible solution to my particular problem.
Do you think wrapping the nasty OCX into another instance ofSystem.Diagnostics.Process, handling all communication via .NETRemoting and invoking Process.Kill when necessary would meet myneeds, perhaps?
Thnx in advance. Regards,
Chris