IID and CLSCTX_INPROC_SERVER

Alex Martelli aleax at aleax.it
Tue Jan 15 04:27:21 EST 2002


"Steve Holden" <sholden at holdenweb.com> wrote in message
news:mVH08.753$Ot.109568 at atlpnn01.usenetserver.com...
> At present I'm using a COM object declared as an in-proc server. This
> appears to have the disadvantage that the IIS (4) process caches the
> object's class definition, so when I change the code there appears to be
> nothing I can do short of rebooting NT to force IIS to recognize the new
> definition.

It's up to the client (IIS in this case) and it's quite believable
that the client will choose to cache the DLL.  A smart client will
have some explicit way to flush DLLs it's not using, but I have no
idea whether IIS has that minimum smartness.


> Can someone tell me a) whether it's possible to re-initialise with a new
> object definition without rebooting, and/or b) whether this situation will
> be alleviated if I move to using CLSCTX_LOCAL_SERVER?

You may forcibly kill an out-of-process server, but that's liable to
crash a client not prepared for such occurrences.  Having coded lots
of both clients and servers, I think it's far easier for a client to
have an explicit flush of DLLs than for it to survive a crashed server.


> I'm not really quite clear enough on the details of COM object
registration,
> creating and destruction to see my way through the woods here.
>
> and-don't-get-me-started-on-threading-models-ly y'rs  - steve

They're simpler than you currently think...


Alex






More information about the Python-list mailing list