policy.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:remoteControlPPT 作者: htwenning 项目源码 文件源码
def _build_typeinfos_(self):
    # Can only ever be one for now.
    tlb_guid = getattr(self._obj_, '_typelib_guid_', None)
    if tlb_guid is None:
      return []
    tlb_major, tlb_minor = getattr(self._obj_, '_typelib_version_', (1,0))
    tlb = pythoncom.LoadRegTypeLib(tlb_guid, tlb_major, tlb_minor)
    typecomp = tlb.GetTypeComp()
    # Not 100% sure what semantics we should use for the default interface.
    # Look for the first name in _com_interfaces_ that exists in the typelib.
    for iname in self._obj_._com_interfaces_:
      try:
        type_info, type_comp = typecomp.BindType(iname)
        if type_info is not None:
          return [type_info]
      except pythoncom.com_error:
        pass
    return []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号