性能计数器是EVIL,不要使用它们。
if(PerformanceCounterCategory.Exists("ILoveYou") ) // is true
{
PerformanceCounterCategory.Delete("ILoveYou");
//throws exception The **configuration registry** key is invalid
}
at System.Diagnostics.PerformanceCounterLib.RegisterFiles(String arg0, Boolean unregister)
at System.Diagnostics.PerformanceCounterLib.UnregisterCategory(String categoryName)
at System.Diagnostics.PerformanceCounterCategory.Delete(String categoryName)
at WindowsFormsApplication1.Program.SetupCategory()
All I found is this: http://blogs.msdn.com/b/oanapl/archive/2009/04/24/fix-corrupted-performance-counters.aspx (Using LODCTR /R)
因为我不知道他们在谈论什么文件 有人有其他想法吗?
PS I use Windows XP SP3 may this be the problem? I understand it is suppose to support performance counters fully unless I cancel the page file.
说清楚我的问题是,我无法使用我的柜台。 强>/强。 强>