Posted By: ScanIAm | Apr 22nd, 2005 @ 12:39 PM
page 1 of 1
Comments: 3 | Views: 24042
ScanIAm
ScanIAm
On a scale of 1 to 10, people are stupid.

Somehow I've corrupted my perfmon counters to the point where they show up as numbers instead of names.  My machine is Win2k and my application was trying to add counters to a catagory when the debugger crashed.  My software is unable to access the correct catagories now and throws an exception whenever I try to access these counters.  Further, if you go into perfmon, there are numbers for catagories and there are no counters under any of the catagories.

I've tried KB300956, but that did not solve the issue.  Do I have any other options besides a complete reinstall?  I don't expect any hand holding, but KB300956 was a long, drawnout pain in the butt that didn't work.

The recommended way of adding new performance counters is to use lodctr.exe, or the LoadPerfCounterTextStrings API.

How far did you get with KB300956? I suspect that you've only corrupted the information in the Counter and Help values, so you shouldn't need to restore the DAT files.

Looking at the DATs, it looks like they're simply copies of the Counter and Help values. Also, it looks like perfd009.dat is the original version of perfc009.dat, and perfi009.dat the original of perfh009.dat (you may not have these files, I'm looking at Windows XP SP2 here). I don't know whether the performance counter APIs actually use these DAT files or the registry values directly.

So a possible fix would be to load the files up in their entirety and use RegSetValueEx to put the data back into the registry. I'm NOT claiming that this will work. I'm just saying it's a possibility. Use at your own risk.

If this does work you should leave a note on the KB article feedback indicating that replacing the DATs isn't enough.

If that doesn't work I think it's reinstall time. You can reinstall without losing your existing settings by following the instructions in KB292175 - How to perform an in-place upgrade of Windows 2000.
page 1 of 1
Comments: 3 | Views: 24042
Microsoft Communities