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)); }
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()); }
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);
internal HotPluggedEventArgs(UsbDevice device, HotplugEventType type) { Device = device; EventType = type; }
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);