Пример #1
0
        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 ?
        }
Пример #2
0
 internal UsbDevice(UsbManager parent, Interop.HostDeviceHandle handle)
 {
     _parent = parent;
     _handle = handle;
 }