pywin32 support for CreateTypeLib2

  • Thread starter Philip Rittenhouse
  • Start date
P

Philip Rittenhouse

I was just wondering if there are any plans to support the
CreateTypeLib2 API either instead of, or in addition to, the
CreateTypeLib API.

I am currently using pythoncom to generate type libraries, but
I ran into an issue supporting optional parameters. After a
lot of digging I discovered that the old CreateTypeLib API doesn't
support them. I have currently built a custom version of pywin32
that uses the new CreateTypeLib2 API, and everything works great.
I'm hoping that the CreateTypeLib2 support can be added to the
official release.


Thanks,
Phil
 
R

Roger Upole

Since you already have working code, the best bet would be
to submit a patch to the Pywin32 project on Sourceforge.
It would probably go over better as an addition rather than a
replacement so it doesn't break any working code.
Roger
 
T

Thomas Heller

Philip Rittenhouse said:
I was just wondering if there are any plans to support the
CreateTypeLib2 API either instead of, or in addition to, the
CreateTypeLib API.

I am currently using pythoncom to generate type libraries, but
I ran into an issue supporting optional parameters. After a
lot of digging I discovered that the old CreateTypeLib API doesn't
support them. I have currently built a custom version of pywin32
that uses the new CreateTypeLib2 API, and everything works great.
I'm hoping that the CreateTypeLib2 support can be added to the
official release.

As Roger already said, upload a patch to the pywin32 project.

OTOH, it should (hopefully!) been easier to do it with ctypes - I assume
creating typelibs isn't that performance critical. Currently ctypes.com
can use but not create typelibs: readtlb.py creates ctypes Python
wrappers from type libraries - my plan it to also create typelibs from
the Python wrappers.

Thomas
 
P

Philip Rittenhouse

As Roger already said, upload a patch to the pywin32 project.

Will do. I'll rewrite my changes to add CreateTypeLib2 support
rather than replace CreateTypeLib, and then upload it.

I have a build question that I hope you can answer though:
My build works fine except that the axdebug module is not built.
It looks like it wants msdbg.lib, but I don't know where to get
this file. Any suggestions?
OTOH, it should (hopefully!) been easier to do it with ctypes - I assume
creating typelibs isn't that performance critical. Currently ctypes.com
can use but not create typelibs: readtlb.py creates ctypes Python
wrappers from type libraries - my plan it to also create typelibs from
the Python wrappers.

I did look at ctypes for my project (generating COM servers)
but it didn't seem to be quite ready to do everything I needed.
The pythoncom stuff seemed to be more stable too.

Thanks!
Phil
 
R

Roger Upole

For some reason, the name of lib file that comes with the
active debugging kit has changed. I had to modify the
project options for library files and replace msdbg.lib with ad1.lib.

Roger
 
P

Phil Rittenhouse

Roger Upole said:
For some reason, the name of lib file that comes with the
active debugging kit has changed. I had to modify the
project options for library files and replace msdbg.lib with ad1.lib.

Roger

Thanks Roger.

I have uploaded the patch (finally), but I ran into a few other build
issues that I'd like to share in case someone else runs into them,
or there are better solutions than what I used.

o In setup_win32all.py, the "pre_install_script" option does not appear to be
supported by any version of distutils I could find. Is it a customization?
I just commented it out to get things to build.

o The following files appear to be missing from the source distribution for
build 201:

com/win32comext/taskscheduler/src/PyIProvideTaskPage.cpp
com/win32comext/taskscheduler/src/PyIProvideTaskPage.h
pywin32_preinstall.py
PyWin32.chm

I copied these from CVS, except for PyWin32.chm, which I copied from
site-packages after installing build 201.

o In addition to the MS Platform SDK you need the source files from Microsoft's
Scriptng.exe zip file. Copy them all to: \com\win32comext\AXDebug\src

Phil
 
T

Thomas Heller

Thanks Roger.

I have uploaded the patch (finally), but I ran into a few other build
issues that I'd like to share in case someone else runs into them,
or there are better solutions than what I used.

o In setup_win32all.py, the "pre_install_script" option does not appear to be
supported by any version of distutils I could find. Is it a customization?
I just commented it out to get things to build.

It is officially supported in the Python CVS version.
Maybe it should go into the 2.3 branch, but this would break the 'no new
features' policy.

But you can copy the head CVS distutils tree into the Python 2.3
installation, and then build the installer with 2.3.

Thomas
 

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
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top