| 13 | namespace { |
| 14 | |
| 15 | HKEY OpenProcessorKey(uint32_t Idx) { |
| 16 | HKEY Out; |
| 17 | auto Path = fextl::fmt::format("Hardware\\Description\\System\\CentralProcessor\\{}", Idx); |
| 18 | if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, Path.c_str(), 0, KEY_READ, &Out)) { |
| 19 | return nullptr; |
| 20 | } |
| 21 | return Out; |
| 22 | } |
| 23 | |
| 24 | uint64_t ReadRegU64(HKEY Key, const char* Name) { |
| 25 | uint64_t Value = 0; |
no test coverage detected