Yes I have tried makepy. I haven't actually had any success with makepy in the past except when running it on type libraries created with the MIDL compiler. The gen_py modules created from tlbs exported from .NET assemblies just don't work. They don't have definitions for any of the methods of the classes, just the interfaces, and attempting to call any of the interface methods on an instance grabbed by Dispatch fails with an Attribute Error.
Just an aside on how I'm getting the .tlb. When C# builds it generates a .dll. I then use REGASM with the /tlb to register the .dll and export a tlb from the dll and register that as well. I think I'll go poke around on the MSDN forums for awhile. _Keston ________________________________ From: Mark Hammond [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2008 5:49 PM To: Obendorf, Keston; python-win32@python.org Subject: RE: [python-win32] COM: Parameterless functions seen as properties The difference in behaviour of ITypeComp.Bind() is interesting, and I agree is the main problem here. However, from what you have said, I'm surprised that a makepy-backed implementation isn't working for you. The first thing we do when getting an object is ask for its type info so we can get the CLSID of the object. We then lookup the CLSID in our makepy/gencache map, and if we find it, the entire process you outline is skipped - we already know the dispid and flags for each of the attributes. Thus, given your objects implement most of the typeinfo stuff correctly, I'm surprised this isn't working for you. Have you tried running makepy on your typelib? Cheers, Mark
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32