/// <summary> /// This is a reference application for testing the functionality of the /// usbGenericHidCommunications class library. It runs a series of /// communication tests against a known USB reference device to determine /// if the class library is functioning correctly. /// /// You can also use this application as a guide to integrating the /// usbGenericHidCommunications class library into your projects. /// /// See http://www,waitingforfriday.com for more detailed documentation. /// </summary> public Form1() { InitializeComponent(); // Create the USB reference device object (passing VID and PID) theReferenceUsbDevice = new usbReferenceDevice(0x1B1F, 0xC011); // Add a listener for usb events theReferenceUsbDevice.usbEvent += new usbReferenceDevice.usbEventsHandler(usbEvent_receiver); // Perform an initial search for the target device theReferenceUsbDevice.findTargetDevice(); // theReferenceUsbDevice. }
/// <summary> /// This is a reference application for testing the functionality of the /// usbGenericHidCommunications class library. It runs a series of /// communication tests against a known USB reference device to determine /// if the class library is functioning correctly. /// /// You can also use this application as a guide to integrating the /// usbGenericHidCommunications class library into your projects. /// /// See http://www,waitingforfriday.com for more detailed documentation. /// </summary> /// public frmTemplate() { InitializeComponent(); // Create the USB reference device object (passing VID and PID) theReferenceUsbDevice = new usbReferenceDevice(0x0925, 0x01234); //USB\VID_0925&PID_1234 // Register for device change notifications theReferenceUsbDevice.registerForDeviceNotifications(this.Handle); // Add a listener for usb events theReferenceUsbDevice.usbEvent += new usbReferenceDevice.usbEventsHandler(usbEvent_receiver); // Perform an initial search for the target device theReferenceUsbDevice.findTargetDevice(); }