COM server usage question

Mark Hammond mhammond at
Sat Aug 9 04:09:36 CEST 2003

Propad wrote:

> Hello everybody,
> I created a simple COM server, by copy and paste of the first example
> from the book by Mark Hammond. I registered the server, and was able
> access its functionallity from another python script, and from Word.
> Then I tried accessing the server from another tool (which is my real
> task). The problem was, it was not in the dropdown list of servers
> usable by the tool. The alternative was to specify a position of the
> server, by giving in the location of a .exe or .dll or .tlb file.
> So after browsing my registry and this newsgroup for a (long) while,
> my conclusion is:
> -all com servers in the mentioned drop-down list are entries in the
> HKEY_CLASSES_ROOT\TypeLib registry entry
> -in order to get my server into that list, I have to somehow specify
> that before registration. My guess would be I need to somehow use the
> _reg_options_ attribute. But if, how?
> -as an alternative I could write an *.IDL file, compile it to *.tbl,
> and feed that into the calling tool. I've seen the example given at
> the c_types page. But how do I know what entries to put into the *.idl
> file? Meaning specifically the GUID-s. I'm sure theese are allready
> somewhere in the registry, so I can't just go and create new ones. Can
> the GUID-s for the type library, interface and implementig class be
> derived from the GUID I used when creating the server? And also, where
> do I get a working midl - compiler? I found two on my computer, but
> neither seems to be working, asking for a cl compiler.
> I thank you kindly for your help.

At this stage, PythonCOM servers do not create a type library.  Thus, 
the interface is registered, but no tools that process type libraries 
will be able to see it.


More information about the Python-list mailing list