diff USBLib/Windows/USB/UsbHub.cs @ 68:e811297f5aa4

Updated USBLib: removed old LibUsbDotNet compatibility code and added new information helper classes
author Ivo Smits <Ivo@UCIS.nl>
date Wed, 16 Oct 2013 16:58:39 +0200
parents 309c705d7460
children 9b898d8b2541
line wrap: on
line diff
--- a/USBLib/Windows/USB/UsbHub.cs	Wed Oct 16 01:11:49 2013 +0200
+++ b/USBLib/Windows/USB/UsbHub.cs	Wed Oct 16 16:58:39 2013 +0200
@@ -4,6 +4,7 @@
 using System.Runtime.InteropServices;
 using Microsoft.Win32.SafeHandles;
 using UCIS.HWLib.Windows.Devices;
+using UCIS.USBLib.Descriptor;
 using UCIS.USBLib.Internal.Windows;
 
 namespace UCIS.HWLib.Windows.USB {
@@ -59,7 +60,7 @@
 						UsbDevice device;
 						if (nodeConnection.ConnectionStatus != USB_CONNECTION_STATUS.DeviceConnected) {
 							device = new UsbDevice(null, this, index);
-						} else if (nodeConnection.DeviceDescriptor.DeviceClass == (Byte)UsbDeviceClass.HubDevice) {
+						} else if (nodeConnection.DeviceDescriptor.DeviceClass == UsbClassCode.Hub) {
 							int nBytes = Marshal.SizeOf(typeof(USB_NODE_CONNECTION_NAME));
 							USB_NODE_CONNECTION_NAME nameConnection = new USB_NODE_CONNECTION_NAME();
 							nameConnection.ConnectionIndex = index;