fix support for x86 32-bit process builds (#1144)

This commit is contained in:
Corey Shuman
2023-08-24 10:26:38 +02:00
committed by GitHub
parent c51381b2c2
commit 6743fd3bc8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -218,7 +218,7 @@ internal static class NvApi
private static void GetDelegate<T>(uint id, out T newDelegate) where T : class
{
IntPtr ptr = Environment.Is64BitOperatingSystem ? NvAPI64_QueryInterface(id) : NvAPI32_QueryInterface(id);
IntPtr ptr = Environment.Is64BitProcess ? NvAPI64_QueryInterface(id) : NvAPI32_QueryInterface(id);
if (ptr != IntPtr.Zero)
newDelegate = Marshal.GetDelegateForFunctionPointer(ptr, typeof(T)) as T;
@@ -228,7 +228,7 @@ internal static class NvApi
public static bool DllExists()
{
IntPtr module = Kernel32.LoadLibrary(Environment.Is64BitOperatingSystem ? DllName64 : DllName);
IntPtr module = Kernel32.LoadLibrary(Environment.Is64BitProcess ? DllName64 : DllName);
if (module == IntPtr.Zero)
return false;