Fix build

This commit is contained in:
PhyxionNL
2025-10-09 21:23:05 +02:00
parent df2c5ebc43
commit 2bbecff220
+4 -4
View File
@@ -1,5 +1,6 @@
using System;
using System.Runtime.InteropServices;
using Windows.Win32;
namespace LibreHardwareMonitor.Interop;
@@ -202,11 +203,10 @@ internal static class IntelGcl
private static bool GclMethodExists(string gclMethod)
{
IntPtr module = Kernel32.LoadLibrary(DllName);
if (module != IntPtr.Zero)
using FreeLibrarySafeHandle module = PInvoke.LoadLibrary(DllName);
if (!module.IsInvalid)
{
bool result = Kernel32.GetProcAddress(module, gclMethod) != IntPtr.Zero;
Kernel32.FreeLibrary(module);
bool result = PInvoke.GetProcAddress(module, gclMethod) != IntPtr.Zero;
return result;
}