#NEWLINE# def addcounter( self , object , counter , instance = None , inum = ( - 1 ) , machine = None ) : #NEWLINE# #INDENT# "\n\t\tAdds a single counter path to the paths attribute.  Normally\n\t\tthis will be called by a child class' speciality functions,\n\t\trather than being called directly by the user. (Though it isn't\n\t\thard to call manually, since almost everything is given a default)\n\t\tThis method is only functional when the query is closed (or hasn't\n\t\tyet been opened).  This is to prevent conflict in multi-threaded\n\t\tquery applications).\n\t\te.g.:\n\t\t\tquery.addcounter('Memory','Available Bytes')\n\t\t" #NEWLINE# if ( not self . active ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . rawaddcounter ( object , counter , instance , inum , machine ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# except win32api . error : #NEWLINE# #INDENT# return ( - 1 ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return ( - 1 )