简短的回答:
是的,您可以在 Windows 7 x32 下手动修复 2 个对象性能计数器(DeltaCount 和 RawCount)问题。PerfMonClient.exe 生成的 2 个文件是可用的(即 symfile.h 和 symfile.ini)。
注意: 的用法请参考 MSDN lodctr.exe
。
在此之前,应创建如下注册表项:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PerfMonClient\Performance]
"Open"="PerfData_Open"
"Close"="PerfData_Close"
"Collect"="PerfData_Collect"
"Library"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,50,\
00,65,00,72,00,66,00,4d,00,6f,00,6e,00,44,00,4c,00,4c,00,2e,00,64,00,6c,00,\
6c,00,00,00
注意:库指向 %SystemRoot%\System32\PerfMonDLL.dll(性能 DLL 的位置)。
即使在 Windows XP 下,任何使用 PerfMonClient.exe 应用程序安装和/或卸载它们的尝试都不起作用。把它给忘了。
看感觉:
清单
符号文件.h:
#define OBJECT_1 0
#define DEVICE_COUNTER_1 2
#define DEVICE_COUNTER_2 4
符号文件.ini:
[info]
drivername=PerfMonClient
symbolfile=symfile.h
[languages]
009=English
[text]
OBJECT_1_009_NAME=PerfMonTest Performance Counters
OBJECT_1_009_HELP=A demo application for your unbridled pleasure
DEVICE_COUNTER_1_009_NAME=RawCount
DEVICE_COUNTER_1_009_HELP=A count of something that goes up and down
DEVICE_COUNTER_2_009_NAME=DeltaCount
DEVICE_COUNTER_2_009_HELP=Something going up all the time, Windows shows difference per time unit