PORTS Forum
Ports and Interfaces => USB => Topic started by: Frank Neumann on November 26, 2019, 05:23:29 pm
-
Hi,
who can help me to send data to all devices with the same VID and PID connected and not only on the last inserted index device?
I use the application from Jan Axelson for VB.net
thank you in advance
Frank
-
If the devices are HID class, edit the FindTheHid routine to open a handle to each matching device (don't quit after finding one) and perform the writes on each.
-
Hallo Mrs. Axelson,
I have try it but it is very difficult for me. Can you show me how du you mean it with a small example?
Thanks in advanced
Frank Neumann
-
One approach would be to create arrays of the needed values, for example mydevicedetected and myDevicePathName and HidHandle.
In FindTheHid, on detecting a matching device, set mydevicedetected(index) = true and save myDevicePathName(index). Get HidHandle(index).
Continue looping until memberIndex = devicePathName.Length
Each time you find another match, increment the index and set mydevicedetected(index) = true and save myDevicePathName(index) and HidHandle(index)..
At the end you will have an array of handles to use for writing data.