Пример #1
0
 public ErrorCodes hotplug_register_callback(IntPtr ctx, HotplugEventType eventType, HotplugFlags flags,
                                             int vendorID, int productID, int deviceClass,
                                             HotplugCallback callback, IntPtr userData,
                                             out IntPtr callbackHandle)
 {
     return(NativeMethods.libusb_hotplug_register_callback(ctx, eventType, flags, vendorID, productID, deviceClass, callback, userData, out callbackHandle));
 }
Пример #2
0
 public void HandleHotplugCallback(IntPtr ctx, IntPtr device, HotplugEventType eventType, IntPtr userData)
 {
     Debug.WriteLine("Hotplug Callback called, event type: " + eventType.ToString());
     // raise the event
     this.DeviceConnected(this, new EventArgs());
 }
Пример #3
0
 internal static extern ErrorCodes libusb_hotplug_register_callback(IntPtr ctx, HotplugEventType eventType, HotplugFlags flags,
                                                                    int vendorID, int productID, int deviceClass,
                                                                    HotplugCallback callback, IntPtr userData,
                                                                    out IntPtr callbackHandle);
Пример #4
0
 internal HotPluggedEventArgs(UsbDevice device, HotplugEventType type)
 {
     Device    = device;
     EventType = type;
 }
Пример #5
0
 internal static extern ErrorCode SetHotplugCb(this UsbContextHandle /* usb_host_context_h */ ctx, HostHotplugCallback cb, HotplugEventType /* usb_host_hotplug_event_e */ hostEvent, IntPtr /* void */ userData, out IntPtr /* usb_host_hotplug_h */ handle);