From 561574ae94760ad60624f28412f277df8294ad22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 30 Apr 2025 16:10:53 +0800 Subject: [PATCH] CPU (Windows): always use `XxxW` --- src/detection/cpu/cpu_windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/detection/cpu/cpu_windows.c b/src/detection/cpu/cpu_windows.c index 2f6a703b4..cf95798f7 100644 --- a/src/detection/cpu/cpu_windows.c +++ b/src/detection/cpu/cpu_windows.c @@ -22,11 +22,11 @@ static const char* detectThermalTemp(double* result) __attribute__((__cleanup__(ffPdhOpenCloseQuery))) HQUERY query = NULL; - if (PdhOpenQuery(NULL, 0, &query) != ERROR_SUCCESS) + if (PdhOpenQueryW(NULL, 0, &query) != ERROR_SUCCESS) return "Failed to open PDH query"; HCOUNTER counter = NULL; - if (PdhAddEnglishCounter(query, + if (PdhAddEnglishCounterW(query, L"\\Thermal Zone Information(*)\\Temperature", 0, &counter) != ERROR_SUCCESS)