python类WrapObject()的实例源码

util.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def wrap(ob, iid=None, usePolicy=None, useDispatcher=None):
  """Wraps an object in a PyGDispatch gateway.

     Returns a client side PyI{iid} interface.

     Interface and gateway support must exist for the specified IID, as
     the QueryInterface() method is used.

  """
  if usePolicy is None:
    usePolicy = policy.DefaultPolicy
  if useDispatcher == 1: # True will also work here.
    import win32com.server.dispatcher
    useDispatcher = win32com.server.dispatcher.DefaultDebugDispatcher
  if useDispatcher is None or useDispatcher==0:
    ob = usePolicy(ob)
  else:
    ob = useDispatcher(usePolicy, ob)

  # get a PyIDispatch, which interfaces to PyGDispatch
  ob = pythoncom.WrapObject(ob)
  if iid is not None:
    ob = ob.QueryInterface(iid)       # Ask the PyIDispatch if it supports it?
  return ob
util.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def wrap(ob, iid=None, usePolicy=None, useDispatcher=None):
  """Wraps an object in a PyGDispatch gateway.

     Returns a client side PyI{iid} interface.

     Interface and gateway support must exist for the specified IID, as
     the QueryInterface() method is used.

  """
  if usePolicy is None:
    usePolicy = policy.DefaultPolicy
  if useDispatcher == 1: # True will also work here.
    import win32com.server.dispatcher
    useDispatcher = win32com.server.dispatcher.DefaultDebugDispatcher
  if useDispatcher is None or useDispatcher==0:
    ob = usePolicy(ob)
  else:
    ob = useDispatcher(usePolicy, ob)

  # get a PyIDispatch, which interfaces to PyGDispatch
  ob = pythoncom.WrapObject(ob)
  if iid is not None:
    ob = ob.QueryInterface(iid)       # Ask the PyIDispatch if it supports it?
  return ob
util.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def wrap(ob, iid=None, usePolicy=None, useDispatcher=None):
  """Wraps an object in a PyGDispatch gateway.

     Returns a client side PyI{iid} interface.

     Interface and gateway support must exist for the specified IID, as
     the QueryInterface() method is used.

  """
  if usePolicy is None:
    usePolicy = policy.DefaultPolicy
  if useDispatcher == 1: # True will also work here.
    import win32com.server.dispatcher
    useDispatcher = win32com.server.dispatcher.DefaultDebugDispatcher
  if useDispatcher is None or useDispatcher==0:
    ob = usePolicy(ob)
  else:
    ob = useDispatcher(usePolicy, ob)

  # get a PyIDispatch, which interfaces to PyGDispatch
  ob = pythoncom.WrapObject(ob)
  if iid is not None:
    ob = ob.QueryInterface(iid)       # Ask the PyIDispatch if it supports it?
  return ob
util.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def wrap(ob, iid=None, usePolicy=None, useDispatcher=None):
  """Wraps an object in a PyGDispatch gateway.

     Returns a client side PyI{iid} interface.

     Interface and gateway support must exist for the specified IID, as
     the QueryInterface() method is used.

  """
  if usePolicy is None:
    usePolicy = policy.DefaultPolicy
  if useDispatcher == 1: # True will also work here.
    import win32com.server.dispatcher
    useDispatcher = win32com.server.dispatcher.DefaultDebugDispatcher
  if useDispatcher is None or useDispatcher==0:
    ob = usePolicy(ob)
  else:
    ob = useDispatcher(usePolicy, ob)

  # get a PyIDispatch, which interfaces to PyGDispatch
  ob = pythoncom.WrapObject(ob)
  if iid is not None:
    ob = ob.QueryInterface(iid)       # Ask the PyIDispatch if it supports it?
  return ob
IFileOperationProgressSink.py 文件源码 项目:Email_My_PC 作者: Jackeriss 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def CreateSink():
    return pythoncom.WrapObject(FileOperationProgressSink(), shell.IID_IFileOperationProgressSink)
ITransferAdviseSink.py 文件源码 项目:Email_My_PC 作者: Jackeriss 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def CreateSink():
    return pythoncom.WrapObject(TransferAdviseSink(), shell.IID_ITransferAdviseSink, shell.IID_ITransferAdviseSink)
dispatcher.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    try:
      self.policy._CreateInstance_(clsid, reqIID)
      return pythoncom.WrapObject(self, reqIID)
    except:
      return self._HandleException_()
dictionary.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 35 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    self._wrap_({ })
    return pythoncom.WrapObject(self, reqIID)
dispatcher.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    try:
      self.policy._CreateInstance_(clsid, reqIID)
      return pythoncom.WrapObject(self, reqIID)
    except:
      return self._HandleException_()
dictionary.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    self._wrap_({ })
    return pythoncom.WrapObject(self, reqIID)
EditSecurity.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def EditSecurity(self, owner_hwnd=0):
        """Creates an ACL editor dialog based on parameters returned by interface methods"""
        isi=pythoncom.WrapObject(self, authorization.IID_ISecurityInformation, pythoncom.IID_IUnknown)
        authorization.EditSecurity(owner_hwnd, isi)

## folder permissions
EditServiceSecurity.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def EditSecurity(self, owner_hwnd=0):
        """Creates an ACL editor dialog based on parameters returned by interface methods"""
        isi=pythoncom.WrapObject(self, authorization.IID_ISecurityInformation, pythoncom.IID_IUnknown)
        authorization.EditSecurity(owner_hwnd, isi)
IFileOperationProgressSink.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def CreateSink():
    return pythoncom.WrapObject(FileOperationProgressSink(), shell.IID_IFileOperationProgressSink)
ITransferAdviseSink.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def CreateSink():
    return pythoncom.WrapObject(TransferAdviseSink(), shell.IID_ITransferAdviseSink, shell.IID_ITransferAdviseSink)
dispatcher.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    try:
      self.policy._CreateInstance_(clsid, reqIID)
      return pythoncom.WrapObject(self, reqIID)
    except:
      return self._HandleException_()
dictionary.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    self._wrap_({ })
    return pythoncom.WrapObject(self, reqIID)
EditSecurity.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def EditSecurity(self, owner_hwnd=0):
        """Creates an ACL editor dialog based on parameters returned by interface methods"""
        isi=pythoncom.WrapObject(self, authorization.IID_ISecurityInformation, pythoncom.IID_IUnknown)
        authorization.EditSecurity(owner_hwnd, isi)

## folder permissions
EditServiceSecurity.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 14 收藏 0 点赞 0 评论 0
def EditSecurity(self, owner_hwnd=0):
        """Creates an ACL editor dialog based on parameters returned by interface methods"""
        isi=pythoncom.WrapObject(self, authorization.IID_ISecurityInformation, pythoncom.IID_IUnknown)
        authorization.EditSecurity(owner_hwnd, isi)
IFileOperationProgressSink.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def CreateSink():
    return pythoncom.WrapObject(FileOperationProgressSink(), shell.IID_IFileOperationProgressSink)
ITransferAdviseSink.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def CreateSink():
    return pythoncom.WrapObject(TransferAdviseSink(), shell.IID_ITransferAdviseSink, shell.IID_ITransferAdviseSink)
dispatcher.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    try:
      self.policy._CreateInstance_(clsid, reqIID)
      return pythoncom.WrapObject(self, reqIID)
    except:
      return self._HandleException_()
dictionary.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def _CreateInstance_(self, clsid, reqIID):
    self._wrap_({ })
    return pythoncom.WrapObject(self, reqIID)


问题


面经


文章

微信
公众号

扫码关注公众号