how do I register a local-server-only COM object in Python?

Steve Holden sholden at holdenweb.com
Wed Oct 11 09:53:07 EDT 2000


Alex Martelli wrote:
> 
> The normal Python COM object registration procedures
> register both an in-process and local-server object.
> It would appear the latter is required for the former
> to work.  How do I change things so that _only_ the
> local (i.e., out-of-process) server is registered?
> 
> The need for this comes from having a COM server that
> needs to be shared among clients (system-unique), as
> per the sample 'shared-dictionary' I just posted, and
> use it from languages where I can't specify what kind
> of server I want (e.g., VBScript)...
> 
> Alex

According to Hammond's "Python Programming on Win32", p 216,
there's an attribute _reg_clstx_, which can be used to define
how the object is registered.

As you suspect, the default used is

	CLSCTX_LOCALSERVER | CLSCTX_INPROC_SERVER

which registers the object as both InProc and LocalServer. If
you set this to just CLSCTX_INPROC_SERVER you should avoid
registration is InProc.

regards
 Steve
-- 
Helping people meet their information needs with training and technology.
703 967 0887      sholden at bellatlantic.net      http://www.holdenweb.com/





More information about the Python-list mailing list