python类IID_IPropertyBag()的实例源码

viewstate.py 文件源码 项目:Email_My_PC 作者: Jackeriss 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def update_colinfo(not_used, dir_name, fnames):
    for fname in fnames:
        full_fname=os.path.join(dir_name,fname)
        if os.path.isdir(full_fname):
            print full_fname
            pidl=shell.SHILCreateFromPath(full_fname,0)[0]
            pb=shell.SHGetViewStatePropertyBag(pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
            ## not all folders already have column info, and we're replacing it anyway
            pb.Write('ColInfo', template_stream)
            iunk=pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
            s=iunk.QueryInterface(pythoncom.IID_IStream)
            s.Write(template_colinfo)
            s=None
            ## attribute names read from registry, can't find any way to enumerate IPropertyBag
            for attr in ('Address','Buttons','Col','Vid','WFlags','FFlags','Sort','SortDir','ShowCmd','FolderType','Mode','Rev'):
                pb.Write(attr, template_pb.Read(attr))
            pb=None
viewstate.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 15 收藏 0 点赞 0 评论 0
def update_colinfo(not_used, dir_name, fnames):
    for fname in fnames:
        full_fname=os.path.join(dir_name,fname)
        if os.path.isdir(full_fname):
            print full_fname
            pidl=shell.SHILCreateFromPath(full_fname,0)[0]
            pb=shell.SHGetViewStatePropertyBag(pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
            ## not all folders already have column info, and we're replacing it anyway
            pb.Write('ColInfo', template_stream)
            iunk=pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
            s=iunk.QueryInterface(pythoncom.IID_IStream)
            s.Write(template_colinfo)
            s=None
            ## attribute names read from registry, can't find any way to enumerate IPropertyBag
            for attr in ('Address','Buttons','Col','Vid','WFlags','FFlags','Sort','SortDir','ShowCmd','FolderType','Mode','Rev'):
                pb.Write(attr, template_pb.Read(attr))
            pb=None
viewstate.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def update_colinfo(not_used, dir_name, fnames):
    for fname in fnames:
        full_fname=os.path.join(dir_name,fname)
        if os.path.isdir(full_fname):
            print(full_fname)
            pidl=shell.SHILCreateFromPath(full_fname,0)[0]
            pb=shell.SHGetViewStatePropertyBag(pidl, "Shell", shellcon.SHGVSPB_FOLDERNODEFAULTS, pythoncom.IID_IPropertyBag)
            ## not all folders already have column info, and we're replacing it anyway
            pb.Write('ColInfo', template_stream)
            iunk=pb.Read('ColInfo',pythoncom.VT_UNKNOWN)
            s=iunk.QueryInterface(pythoncom.IID_IStream)
            s.Write(template_colinfo)
            s=None
            ## attribute names read from registry, can't find any way to enumerate IPropertyBag
            for attr in ('Address','Buttons','Col','Vid','WFlags','FFlags','Sort','SortDir','ShowCmd','FolderType','Mode','Rev'):
                pb.Write(attr, template_pb.Read(attr))
            pb=None
trybag.py 文件源码 项目:OSPTF 作者: xSploited 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test():
  bag = Bag()
  target = Target()
  log = Log()

  target.Save(bag, 1, 1)
  target.Load(bag, log)

  comBag = util.wrap(bag, pythoncom.IID_IPropertyBag)
  comTarget = util.wrap(target, pythoncom.IID_IPersistPropertyBag)
  comLog = util.wrap(log, pythoncom.IID_IErrorLog)

  comTarget.Save(comBag, 1, 1)
  comTarget.Load(comBag, comLog)
trybag.py 文件源码 项目:pupy 作者: ru-faraon 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def test():
  bag = Bag()
  target = Target()
  log = Log()

  target.Save(bag, 1, 1)
  target.Load(bag, log)

  comBag = util.wrap(bag, pythoncom.IID_IPropertyBag)
  comTarget = util.wrap(target, pythoncom.IID_IPersistPropertyBag)
  comLog = util.wrap(log, pythoncom.IID_IErrorLog)

  comTarget.Save(comBag, 1, 1)
  comTarget.Load(comBag, comLog)
trybag.py 文件源码 项目:remoteControlPPT 作者: htwenning 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test():
  bag = Bag()
  target = Target()
  log = Log()

  target.Save(bag, 1, 1)
  target.Load(bag, log)

  comBag = util.wrap(bag, pythoncom.IID_IPropertyBag)
  comTarget = util.wrap(target, pythoncom.IID_IPersistPropertyBag)
  comLog = util.wrap(log, pythoncom.IID_IErrorLog)

  comTarget.Save(comBag, 1, 1)
  comTarget.Load(comBag, comLog)
trybag.py 文件源码 项目:CodeReader 作者: jasonrbr 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def test():
  bag = Bag()
  target = Target()
  log = Log()

  target.Save(bag, 1, 1)
  target.Load(bag, log)

  comBag = util.wrap(bag, pythoncom.IID_IPropertyBag)
  comTarget = util.wrap(target, pythoncom.IID_IPersistPropertyBag)
  comLog = util.wrap(log, pythoncom.IID_IErrorLog)

  comTarget.Save(comBag, 1, 1)
  comTarget.Load(comBag, comLog)


问题


面经


文章

微信
公众号

扫码关注公众号