Skip to content

Commit 40f6d3b

Browse files
committed
Fix native driver store for x86 system
1 parent 4ee47f3 commit 40f6d3b

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

Rapr/DSEFormHelper.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,11 @@ private static bool IsRunAsAdministrator()
111111
Environment.OSVersion.Platform == PlatformID.Win32NT
112112
&& Environment.OSVersion.Version >= Win11Version;
113113

114-
/// <summary>
115-
/// Gets a value indicating whether the current operating system is 64-bit.
116-
/// </summary>
117-
public static bool Is64BitOperatingSystem => Environment.Is64BitOperatingSystem;
118-
119114
/// <summary>
120115
/// Gets a value indicating whether the native driver store API is supported.
121-
/// The native driver store requires Windows 8 or newer AND a 64-bit operating system.
116+
/// The native driver store requires Windows 8 or newer.
122117
/// </summary>
123-
public static bool IsNativeDriverStoreSupported => IsWin8OrNewer && Is64BitOperatingSystem;
118+
public static bool IsNativeDriverStoreSupported => IsWin8OrNewer;
124119

125120
/// <summary>
126121
/// Gets a value indicating whether the PnPUtil utility is supported.

Rapr/Utils/NativeDriverStore.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ internal static bool EnumDeviceObjects(
284284
internal static bool EnumDriverPackages(
285285
IntPtr driverStoreHandle,
286286
string driverStoreFilename,
287-
DriverPackageInfo pDriverPackageInfo,
287+
ref DriverPackageInfo pDriverPackageInfo,
288288
IntPtr lParam)
289289
{
290290
try
@@ -907,7 +907,7 @@ public delegate bool EnumDriverPackageDelegate(
907907
IntPtr driverStoreHandle,
908908
[MarshalAs(UnmanagedType.LPWStr, SizeConst = 256)]
909909
string driverStoreFilename,
910-
DriverPackageInfo driverPackageInfo,
910+
ref DriverPackageInfo driverPackageInfo,
911911
IntPtr lParam);
912912

913913
[DllImport("drvstore.dll", EntryPoint = "DriverStoreEnumW", SetLastError = true, CharSet = CharSet.Unicode)]

0 commit comments

Comments
 (0)