'Build the base query object for this wrapper,
then add all of the counters required for the query.
Raise a QueryError if we can\'t complete the functions.
If we are already open, then do nothing.'

def open(self):

    if (not self.active):
        self.curpaths = copy.copy(self.paths)
        try:
            base = win32pdh.OpenQuery()
            for path in self.paths:
                try:
                    self.counters.append(win32pdh.AddCounter(base, path))
                except win32api.error:
                    self.counters.append(0)
                    pass
            self._base = base
            self.active = 1
            return 0
        except:
            try:
                self.killbase(base)
            except NameError:
                pass
            self.active = 0
            self.curpaths = []
            raise QueryError(self)
    return 1
