示例#1
0
 def __make_dispentry(self, finder, interface, mthname, idlflags, argspec,
                      invkind):
     # We build a _dispmap_ entry now that maps invkind and
     # dispid to implementations that the finder finds;
     # IDispatch_Invoke will later call it.
     paramflags = [((_encode_idl(x[0]), x[1]) + tuple(x[3:]))
                   for x in argspec]
     # XXX can the dispid be at a different index?  Check codegenerator.
     dispid = idlflags[0]
     impl = finder.get_impl(interface, mthname, paramflags, idlflags)
     self._dispimpl_[(dispid, invkind)] = impl
     # invkind is really a set of flags; we allow both
     # DISPATCH_METHOD and DISPATCH_PROPERTYGET (win32com uses
     # this, maybe other languages too?)
     if invkind in (1, 2):
         self._dispimpl_[(dispid, 3)] = impl
示例#2
0
    def __make_dispentry(self,
                         finder, interface, mthname,
                         idlflags, argspec, invkind):
        # We build a _dispmap_ entry now that maps invkind and
        # dispid to implementations that the finder finds;
        # IDispatch_Invoke will later call it.
        paramflags = [((_encode_idl(x[0]), x[1]) + tuple(x[3:])) for x in argspec]

        dispid = idlflags[0] # XXX can the dispid be at a different index?  Check codegenerator.
        impl = finder.get_impl(interface, mthname, paramflags, idlflags)
        self._dispimpl_[(dispid, invkind)] = impl
        # invkind is really a set of flags; we allow both
        # DISPATCH_METHOD and DISPATCH_PROPERTYGET (win32com uses
        # this, maybe other languages too?)
        if invkind in (1, 2):
            self._dispimpl_[(dispid, 3)] = impl