From 2af52a24ea2d93e0846fcfa1d117dda4dba87066 Mon Sep 17 00:00:00 2001 From: Frans van Dorsselaer <17404029+dorssel@users.noreply.github.com> Date: Fri, 12 May 2023 08:46:40 +0200 Subject: [PATCH] Bump Microsoft.Windows.CsWin32 from 0.2.206-beta to 0.2.229-beta --- Directory.Packages.props | 2 +- Usbipd/NewDev.cs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 3e775e2c..2478e95b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,7 +12,7 @@ SPDX-License-Identifier: GPL-3.0-only - + diff --git a/Usbipd/NewDev.cs b/Usbipd/NewDev.cs index d60b0463..5799f579 100644 --- a/Usbipd/NewDev.cs +++ b/Usbipd/NewDev.cs @@ -70,8 +70,7 @@ public static bool ForceVBoxDriver(string originalInstanceId) }; PInvoke.SetupDiEnumDriverInfo(deviceInfoSet, deviceInfoData, (uint)SETUP_DI_BUILD_DRIVER_DRIVER_TYPE.SPDIT_CLASSDRIVER, 0, ref driverInfoData).ThrowOnError(nameof(PInvoke.SetupDiEnumDriverInfo)); BOOL tmpReboot; - // NOTE: Workaround for https://github.com/microsoft/win32metadata/issues/903 - PInvoke.DiInstallDevice(default, (HDEVINFO)deviceInfoSet.DangerousGetHandle(), &deviceInfoData, (SP_DRVINFO_DATA_V2_A*)&driverInfoData, 0, &tmpReboot).ThrowOnError(nameof(PInvoke.DiInstallDevice)); + PInvoke.DiInstallDevice(default, deviceInfoSet, deviceInfoData, driverInfoData, 0, &tmpReboot).ThrowOnError(nameof(PInvoke.DiInstallDevice)); if (tmpReboot) { reboot = true;