'### Not an end-user function
Calculate the paths for an instance object. Should alter
to allow processing for lists of object-counter pairs.'

def getinstpaths(self, object, counter, machine=None, objtype='Process', format=win32pdh.PDH_FMT_LONG):

    (items, instances) = win32pdh.EnumObjectItems(None, None, objtype, (-1))
    instances.sort()
    try:
        cur = instances.index(object)
    except ValueError:
        return []
    temp = [object]
    try:
        while (instances[(cur + 1)] == object):
            temp.append(object)
            cur = (cur + 1)
    except IndexError:
        pass
    paths = []
    for ind in range(len(temp)):
        paths.append(win32pdh.MakeCounterPath((machine, 'Process', object, None, ind, counter)))
    return paths
