Author Topic: Using WinUSB to access more than one device  (Read 15798 times)

Chester

  • Member
  • ***
  • Posts: 4
Using WinUSB to access more than one device
« on: August 04, 2010, 03:20:22 am »
Hello All,
I am just starting to look into USB and hope someone can help me find the right direction to get started with.
I would like to know if I could use WinUSB to access three identical devices with different serial numbers on the same PC. Two of them should be accessed from one instance of the application, and the third should be accessed from another instance of the application. Is this possible?
How do I access and identify the individual device from WinUSB in a scenario like this?

Thanks

Chester

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Using WinUSB to access more than one device
« Reply #1 on: August 04, 2010, 09:48:46 am »
In my WinUSB example code, see the FindDeviceFromGuid routine. Instead of stopping on finding one device, keep looking and open a handle to each device found:

http://www.janaxelson.com/winusb.htm

To identify a specific device, if you are writing the device firmware, you could define a control transfer that identifies the device and use WinUsb_ControlTransfer to retrieve the information.

Jan
« Last Edit: June 29, 2015, 10:30:59 am by Jan Axelson »

Chester

  • Member
  • ***
  • Posts: 4
Re: Using WinUSB to access more than one device
« Reply #2 on: August 04, 2010, 01:33:25 pm »
Jan,

Thanks for your reply.

It looks like this will be fine for my application.

Chester