[Python.NET] Python.NET and COM CoClasses

Bruce Dodson bruce_dodson at hotmail.com
Mon Mar 29 18:35:56 EST 2004

I tried to use Python.NET with COM objects, and I couldn't
get it to work.  The documentation says it works, so I
assume either that there is a bug or that I'm doing
something wrong.

Background: I have a large COM library of vtbl-based
interfaces, not accessible through Win32all.  They can be
accessed through ctypes but it's slow and there are a many
cases where the autogenerated wrappers are wrong.  This
library ships with .NET assemblies which properly deal with
those special cases, so that's why I'm interested in

What happens is I can import the interfaces, and I can
import the CoClasses, but Python.NET seems to think the
CoClasses are interfaces too.  So when I try to instantiate
an object, it fails with a message "interface constructor
requires a single argument" or something like that.

Any ideas?


More information about the PythonDotNet mailing list