'questions with retrieving CPU Core Frequency and Uncore Frequency by DeviceIoControl on windows

I'm try to retrieve the CPU core Frequency and Uncore frequecy On Windows by DeviceIoControl Function. I've checked the declaration on https://docs.microsoft.com/zh-cn/windows/win32/api/ioapiset/nf-ioapiset-deviceiocontrol?redirectedfrom=MSDN, but I don't know how to define the para "dwIoControlCode" and the data structure of lpBytesReturned. I've checked the listed control words on the docs.microsoft.com, which is very limited, and can't the one for frequency of CPUs. At the same time, I also cann't find the entry for data structure for CPU info.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source