how to create type libraries for py2exe?

J

jwsacksteder

I have a working COM object that registers and I can 'dispatch' correctly. I
need register a type library for this project to integrate with my
application- Crystal Reports.

I understand I need to compose an IDL file, then process that with MIDL.exe
to produce a .tlb file. That can then be add as a resource to the .dll that
py2exe creates.

HOWEVER- IDL is pretty intimidating if you don't know C++. Is there a way to
automatically generate the IDL I need? I am under urgent time pressure, so I
would prefer expediency over correctness.
 
A

Alex Martelli

I have a working COM object that registers and I can 'dispatch' correctly.
I need register a type library for this project to integrate with my
application- Crystal Reports.

I understand I need to compose an IDL file, then process that with
MIDL.exe to produce a .tlb file. That can then be add as a resource to the
.dll that py2exe creates.

HOWEVER- IDL is pretty intimidating if you don't know C++. Is there a way
to automatically generate the IDL I need? I am under urgent time pressure,
so I would prefer expediency over correctness.

Sure, many languages are set up for such "expediency over correctness"
automatic generation of type libraries (and MS Visual Studio -- and, I
believe, MS's freely downloadable and huge SDK too -- come with tools to
reverse-compile typelibraries into IDL sources, too). For example,
Visual Basic 6 does it (I believe it also embeds the typelib in the
resources of the DLL or EXE, but you can extract it with the kind of
tools I just mentioned). I believe (never tried) that some CORBA
tools, such as ORBit, may also be capable of generating MS typelibs
automatically (from the info THEY have about your interface, of course,
so you may still need to write CORBA IDL for all I know)...


Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,440
Latest member
YoungBorel

Latest Threads

Top