[pywin32-bugs] [ pywin32-Bugs-3260878 ] pythoncom GetRefTypeOfImplType doesn't work
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2011-04-22 05:53:55
|
Bugs item #3260878, was opened at 2011-03-31 05:32 Message generated for change (Settings changed) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3260878&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: win32 Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Marc-André Belzile (mabxsi) Assigned to: Nobody/Anonymous (nobody) Summary: pythoncom GetRefTypeOfImplType doesn't work Initial Comment: Hi, I'm trying to get the base interface typeinfo with pythoncom.GetRefTypeOfImplType but it's always returning the typeinfo of the IDispatch interface. You can use the code belwo with any tlb you like to repro the problem. Thank you for your help. -mab def log_base_interface( tlb ): n = tlb.GetTypeInfoCount() for i in range(n): iface_ti = tlb.GetTypeInfo( i ) iface_attr = iface_ti.GetTypeAttr() if iface_attr[5] == pythoncom.TKIND_DISPATCH: print '>>>>> Base interfaces for %s' % (iface_ti.GetDocumentation(-1)[0]) for i in range(iface_attr[8]): flags = iface_ti.GetImplTypeFlags(i) refType = iface_ti.GetRefTypeInfo(iface_ti.GetRefTypeOfImplType(i)) refAttr = refType.GetTypeAttr() print refType.GetDocumentation(-1)[0] output: >>>>> Base interfaces for SIObject IDispatch >>>>> Base interfaces for Application IDispatch >>>>> Base interfaces for SIObjectCollection IDispatch >>>>> Base interfaces for LightRig IDispatch etc... ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2011-04-22 15:53 Message: Without more detail, I can't see how this is broken. Note that win32com (win32com\client\gen_py in particular) uses this function. Please reopen this bug if you can provide more detail. ---------------------------------------------------------------------- Comment By: Mark Hammond (mhammond) Date: 2011-03-31 09:03 Message: It isn't clear why this is broken. Your example seems to be showing that each of the types in that typelib have one base interface which is IDispatch. Do you think there is a bug in pywin32's wrapping of this function, or that the function itself is behaving incorrectly? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3260878&group_id=78018 |