From 8ffe6fda9ba5fc5997f674d87313160318757298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 8 Feb 2023 15:04:35 +0800 Subject: [PATCH] Battery: drop powrprof.dll dependency --- src/detection/battery/battery_windows.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/detection/battery/battery_windows.c b/src/detection/battery/battery_windows.c index ca8c60991..ce1838613 100644 --- a/src/detection/battery/battery_windows.c +++ b/src/detection/battery/battery_windows.c @@ -8,6 +8,19 @@ #include #include +#ifdef FF_USE_WIN_NTAPI + NTSYSCALLAPI + NTSTATUS + NTAPI + NtPowerInformation( + IN POWER_INFORMATION_LEVEL InformationLevel, + IN PVOID InputBuffer OPTIONAL, + IN ULONG InputBufferLength, + OUT PVOID OutputBuffer OPTIONAL, + IN ULONG OutputBufferLength); + #define CallNtPowerInformation NtPowerInformation +#endif + static inline void wrapCloseHandle(HANDLE* handle) { if(*handle)