[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-03-30 18:32:08
|
Bugs item #3260878, was opened at 2011-03-30 14:32 Message generated for change (Tracker Item Submitted) made by mabxsi 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: Open Resolution: None 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... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3260878&group_id=78018 |