public void RegisterHandle(IntPtr Handle) { usb_event_handle = Win32Usb.RegisterForUsbEvents(Handle, device_class); this.handle = Handle; //Check if the device is already present. CheckDevicePresent(); }
public bool UnregisterHandle() { if (this.handle != null) { return(Win32Usb.UnregisterForUsbEvents(this.handle)); } return(false); }