I'm a little stuck with some piece of code I wrote and successfully tested on several PCs.
I have a generic usb device using the windows virual com port driver. This works as expected (2 drivers; one for the generic usb device and one for the virutal com port).
I wrote some code to scan the pc for all installed virtual com port devices. Under "friendly name" i read out the com port. The corresponding USB Device and virutal com port may be identified by the 'ContainerID'.
USB-Devices may be found under: Computer\HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Enum\USB\VID_xxx&PID_xxx. The corresponding COM Device may be found under: Computer\HKEY_LOCAL_MACHINE_SYSTEM\CurrentControlSet\Enum\USB\VID_xxx&PID_xxx&MI_00 and VID_xxx&PID_xxx&MI_01
As you might expect the COM-Port, that is defined under 'FriendlyName' is not always the COM-Port, where you'll find the device in the Windows Device Manager.
So that's my question: If I have a virutal com port device - where can I read out, which com port is set up from windows for this specific device?
Have a nice weekend, AllDayPiano