[python-win32] Error in FindPerformanceAttributesByName
cedric.delfosse at linbox.com
Mon May 10 04:36:18 EDT 2004
Le sam 08/05/2004 à 04:02, Mark Hammond a écrit :
> > To resolve this, I downloaded pdh.dll available here
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;Q28499
> > 6 and put
> > it into C:\python22.
> That KB article references Windows NT4 - is that what you are running? The
> installer probably should try and ensure the latest is installed - I opened
> a bug at sourceforge to remind myself.
Yes, Windows NT 4.00.1381, French version.
> > >>> import win32pdhutil
> > >>> win32pdhutil.ShowAllProcesses()
> > Traceback (most recent call last):
> > File "<pyshell#3>", line 1, in ?
> > win32pdhutil.ShowAllProcesses()
> > File "C:\Python22\Lib\site-packages\win32\lib\win32pdhutil.py", line
> > 94, in ShowAllProcesses
> > items, instances = win32pdh.EnumObjectItems(None,None,object,
> > win32pdh.PERF_DETAIL_WIZARD)
> > error: (-1073738824, 'EnumObjectItems for buffer size', 'No error
> > message is available')
> That error translates to PDH_CSTATUS_NO_OBJECT, which MS document as:
> "The specified machine was found, but no matching performance object was
> found on that machine. If this status is returned when the counter is being
> added, the specified counter is not included in the query. If this status is
> returned by an active counter, the data for that counter is invalid. Each
> time the data is requested, PDH tries to obtain this counter data."
> That doesn't really make a whole lot of sense in this case - but I've no
> further ideas I'm afraid (and it does work for me!)
I installed python 2.3.3 and pywin32-201, and now it works fine (and no
need to add any pdh.dll). Looks like it's time for my customer to
Thanks a lot for your help,
Cédric Delfosse Linbox / Free&ALter Soft
152, rue de Grigy - Technopole Metz 57070 Metz - FRANCE
tél: +33 (0)3 87 50 87 90 http://linbox.com
More information about the Python-win32