The function PdhGetFormattedCounterValue has been returning various
information-type messages in the Event viewer. The text of these
messages is generally in the format:
PdhGetFormattedCounterValue for object LogicalDisk and instance
_Total/_Total and counter Disk Writes/sec failed with error
0xC0000BC6.
Where the error code differs and represent the following descriptions
(as detailed by the PDH error code list):
"0x800007D8" "A counter with a negative value was detected."
"0xC0000BC6" "The data is not valid."
"0x800007D6" "A counter with a negative denominator value was
detected."
I have looked at the performance data with Perfmon and the data for
the particular counters mentioned in the messages do seem to be
hovering about the bottom of the range (meaning I'm not sure of the
exact values but I'm guessing they could actually be negative or
invalid data but I'd certainly think that's odd.)
Does anyone know if there is a problem with this function returning
bad values? I haven't found a patch or anything in Microsoft's web
site to point to this as a problem with the PDH DLL which is why I'm
turning here. Note also that diskperf shows that the performance
counters for the disks are set to start on boot and there are actually
two systems where this is occuring, one is Windows NT SP6 and the
other is Windows 2000 SP2.
Any help on stopping these messages would be greatly appreciated.
Cheers,
Ed