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

            return(false);
        }