I'm writing user software which configures the firmware for an electronic device.
It computer is linked to the device via USB.

How do you find which number port to write for?

I can set up a search to find used ports, but if the user has a device using port 4 for example, how can I check it is a USB device?

I am using VB6.

Thanks guys