internal void HostHotplugAttachCallback(IntPtr devHandle, IntPtr userData) { Interop.HostDeviceHandle handle = new Interop.HostDeviceHandle(devHandle); UsbDevice device = new UsbDevice(this, handle); if (DeviceHotPlugged != null) { DeviceHotPlugged.Invoke(this, new HotPluggedEventArgs(device, HotplugEventType.Attach)); } //AvailableDevices.Remove(device); // do we need to dispose device here ? }
internal UsbDevice(UsbManager parent, Interop.HostDeviceHandle handle) { _parent = parent; _handle = handle; }