Python COM Server with C++

Thomas Heller theller at python.net
Fri Jan 16 14:58:35 EST 2004


andre.bernemann at gmx.de (Andre Bernemann) writes:

> Hi,
>
> I have written a Python COM Server with the help of Mark Hammond's
> Book Programming Python on Win32. I used the CreateObjects method in
> VB to access the COM Methods and all worked fine. Unfortunately, that
> is not what i really want. First I'd like to make the COM Server
> accessible from C++ and as a beside product I want to use early
> binding within VB with the NEW operator. I've googled around alot, but
> I still have not the complete picture of what to do.
>
> So far I think I have to create an IDL file to describe the interface
> and compile it with the MIDL Compiler. There ist my first question.
> What do I have to create first, the IDL file or the Python COM Server?
> I'm a little bit confused about dispid's, the GUID's and naming
> conventions. Do i need to make use of the makepy Utility in any way?

I think you should create the typelib first, and then write a com object
implementing the interfaces.

I don't have done it myself, but I suggest to look into the spambayes
project.  It contains an outlook plugin, written by Mark Hammond.
Most certainly a bag full of ideas.

Thomas



More information about the Python-list mailing list