Your suggestion is well taken. We would have preferred that the
functionality in the control was exposed in the form of a DLL/Library.
But since it is a third party control we have limited choice.
The container will have no user-interaction with the ActiveX control,
but will make a handful of calls. As mentioned earlier the control can
be instantiated after spawning a thread whose ApartmentState is
assigned to stathread. However, we are not too happy with this
mechanism.
> Your suggestion is well taken. We would have preferred that the
> functionality in the control was exposed in the form of a DLL/Library.
> But since it is a third party control we have limited choice.
Yes you have don't use it, the reason is simple, the third party did not
author the component to be used in such scenario, isn't that enough a
reason?
> The container will have no user-interaction with the ActiveX control,
> but will make a handful of calls. As mentioned earlier the control can
> be instantiated after spawning a thread whose ApartmentState is
> assigned to stathread. However, we are not too happy with this
> mechanism.
This is not a matter of user interaction, it's a matter of incorrect
non-available interfaces. ActiveX is designed for client side code, must run
in a STA thread that pumps messages (bet that you don't pump the message
queue!) to begin with, failing to do so will bite you back, especially in a
CLR environment where COM interop is not as forgiving as a VB environment
(think memory leaks failing object disposals etc...).
If you use ActiveX components server side you introduce a bug in your
application, sooner or later it will bite you.
Willy.
sanjeev@securlinx.com - 30 Dec 2005 02:44 GMT
The third party, a partner of ours, erred in the choice of housing for
their services. That has led us to this in the first place. Ideally the
services in this particular ActiveX control should have been broken up
into a regular/COM DLL and an ActiveX control. However, with the
current design we are stuck with the ActiveX control and we need to use
a small subset of the ActiveX services, that does not need any user
interaction. Ideally this subset should have been put in a Win32 DLL or
a COM component.
I appreciate your advice regarding the risk of using ActiveX on the
server side. I do not like it, however until we have a newer version of
the server, we are constrained to use what we have at present.