修正箇所を少なく直すとしたら、以下のような感じでしょうか。
CpuUtilsは直せないという場合は、素直にPdhに切り替えるのが良さそうです。
---CpuUtils.pasの20行目ぐらいにプロパティ1つ追加。
private
FHandle: THandle;
FInfoSize: Integer;
FReg: TRegistry;
---50行目ぐらいのReservedを増やす
_SYSTEM_PERFORMANCE_INFORMATION = record
IdleTime: LARGE_INTEGER;
Reserved: array [0..87] of DWORD;
end;
---90行目ぐらいにプロパティの初期化を追加
end else
FHandle := 0;
end;
FInfoSize := 312;
end;
---130行目ぐらいのAPI呼び出し失敗時の再試行追加。
if NtQuerySystemInformation(3, @TimeInfo, SizeOf(TimeInfo), nil) <> NO_ERROR then
Exit;
if NtQuerySystemInformation(2, @PerfInfo, FInfoSize, nil) <> NO_ERROR then
begin
FInfoSize := 312 + 360 - FInfoSize;
if NtQuerySystemInformation(2, @PerfInfo, FInfoSize, nil) <> NO_ERROR then
Exit;
end;
---