How might I retrieve the port number of a USB device that is connected to a USB port, using VB6?
I can already get the USB Device name, let's say:
\\?\USB#Vid_0801&Pid_2250#7&91e2848&0&1#{4d36e978-e325-11ce-bfc1-08002be10318}
How do I automatically detect what port number is assigned to it?
I am making a program that will automatically determine the port number of a specific device attached to any of the USB port and start communicating on it automatically.
Best Answer
to view the available comports you can use :
in that list you can mark the ports which you already know, so the others should be the port from the usb device
pay attention : when the usb device is connected through another usb port, the converted rs232 port might be a different one as well