title: libusbdotnet find all similar devices
body: <p>I have a custom USB device based on an ATMEL and V-USB. I have the test circuit up an running and everything is working fine.</p>
  
  <p>I have a situation where multiple of these devices will be plugged into one PC. I need to list them all in code. All of the examples only show how to find and connect to one device:</p>
  
  <p><a href="http://libusbdotnet.sourceforge.net/V2/Index.html" rel="nofollow">http://libusbdotnet.sourceforge.net/V2/Index.html</a></p>
  
  <p>According to the docs I need to set up a usbdevicefinder with the Product and Vender IDs and then pass that to FindAll from the UsbRegDeviceList, so here is my code:</p>
  
  <pre><code> public static void GetUSBDevices()
      {
          //Find devices matching the vendor and product ID
          UsbDeviceFinder USBFinder = new UsbDeviceFinder(VENDORID, PRODUCTID);
          //Using the registry create a list of those devices
          UsbRegDeviceList USBRegistryDevices = new UsbRegDeviceList();
          USBRegistryDevices = USBRegistryDevices.FindAll(USBFinder);
      }
  </code></pre>
  
  <p>Please note this is a class method and it is not complete yet. I am stepping through the code with the debugger and examining the internals of USBRegistryDevices after the last line executes and it keeps getting a count of 0. VENDORID, PRODUCTID are constants defined in code.</p>
  
  <p>Am I implementing the code incorrectly?</p>