win32pdhquery.py 文件源码

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

项目:purelove 作者: hucmosin 项目源码 文件源码
def addcounter(self,object, counter, instance = None, inum=-1, machine=None):
        '''
        Adds a single counter path to the paths attribute.  Normally
        this will be called by a child class' speciality functions,
        rather than being called directly by the user. (Though it isn't
        hard to call manually, since almost everything is given a default)
        This method is only functional when the query is closed (or hasn't
        yet been opened).  This is to prevent conflict in multi-threaded
        query applications).
        e.g.:
            query.addcounter('Memory','Available Bytes')
        '''
        if not self.active:
            try:
                self.rawaddcounter(object, counter, instance, inum, machine)
                return 0
            except win32api.error:
                return -1
        else:
            return -1
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号