[python-win32] COM and Makepy when DLL and TLB are separated

Chris Brandson cbrandson at triant.com
Wed Dec 3 13:50:23 EST 2003


I need to access an InProc COM interface which was originally designed for
VB and has a separate type library (".tlb" file) and DLL. An additional
problem is that some of the arguments are ByRef and are modified during
invocation. Makepy can generate source files for both the DLL and typelib.
The typelib has interfaces defined but CLSIDToClassMap is empty. The DLL has
a  CLSIDToClassMap for the classes but no interfaces defined (they are in
the tlb). I had hoped that win32com.client would combine TLB and DLL and
allow access, but when I create the top level object from the ProgID with
Dispatch, none of the properties or methods seen to be found e.g.
"AttributeError: '<win32com.gen_py.<DLL COM entry>.<interface name>' object
has no attribute 'Initialize'. Is there documentation somewhere on what
makepy is actually doing. There is some info in "Python Programming on
Win32", but I haven't been able to map what is there to my case with a DLL
and TLB.

Is there something I need to do to link the DLL and TLB or is the issue
related to the fact that just about every method needs arguments passed by
reference?

Any assistance would be greatly appreciated.

Thanks,

- Chris





More information about the Python-win32 mailing list