fix(processor): LPCALLNTPOWERINFORMATIONFUNC should return LONG instead of the error-prone NTSTATUS

This commit is contained in:
phaneron 2025-04-01 15:56:07 -04:00
parent 98adb41e3c
commit a654f25957

View file

@ -329,7 +329,7 @@ int32_t IOsGetPowerProfFrequency() {
int32_t result = 0;
typedef NTSTATUS (*LPCALLNTPOWERINFORMATIONFUNC)(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
typedef LONG (*LPCALLNTPOWERINFORMATIONFUNC)(POWER_INFORMATION_LEVEL, PVOID, ULONG, PVOID, ULONG);
auto CallNtPowerInformation = reinterpret_cast<LPCALLNTPOWERINFORMATIONFUNC>(GetProcAddress(library, "CallNtPowerInformation"));
if (CallNtPowerInformation) {
struct PROCESSOR_POWER_INFORMATION {