开发者

Using performance counters with different UI languages

I would like to read a few performance counters in my C# application, like "Processor\% Idle Time", but th开发者_如何学Pythonis only works on English systems. Since performance counters need to be initialized using the counter category and names, how can I make my code run under different UI languages?


After much searching, I found this MS KB article that explains how to retrieve the localized counter names using hard-coded index values: http://support.microsoft.com/kb/287159

Once you get the hard-coded index value from the registry, just pass it to the PdhLookupPerfNameByIndex method and it will return the localized counter name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜