diff USBLib/Internal/Windows/SetupApi.cs @ 93:d467cd38b34e

USBLib: fix for large transfers with libusb0 on Windows, added driver uninstall function
author Ivo Smits <Ivo@UCIS.nl>
date Tue, 22 Apr 2014 16:40:35 +0200
parents 309c705d7460
children
line wrap: on
line diff
--- a/USBLib/Internal/Windows/SetupApi.cs	Fri Apr 04 23:21:33 2014 +0200
+++ b/USBLib/Internal/Windows/SetupApi.cs	Tue Apr 22 16:40:35 2014 +0200
@@ -94,6 +94,9 @@
 		[DllImport("setupapi.dll", CharSet = CharSet.Auto)]
 		public static extern CR CM_Reenumerate_DevNode(UInt32 dnDevInst, UInt32 ulFlags);
 
+		[DllImport("newdev.dll", SetLastError = true, CharSet = CharSet.Auto)]
+		public static extern bool DiUninstallDevice(IntPtr hwndParent, SafeDeviceInfoSetHandle DeviceInfoSet, ref SP_DEVINFO_DATA DeviceInfoData, UInt32 Flags, out Boolean NeedReboot);
+
 		//public const int DIGCF_DEFAULT = 0x00000001;  // only valid with DIGCF_DEVICEINTERFACE
 		public const int DIGCF_PRESENT = 0x00000002;
 		public const int DIGCF_ALLCLASSES = 0x00000004;