This is more of a WMI question than C#, but for lack of a more appropriate forum I am hoping someone here will know the answer.
I have a USB printer connected to my computer, and I am trying to retrieve the USB port ID for it in a C# application (i.e VID/PID).
I pulled the printer details from the WMI Win32_Printer class. The problem is the port field shows USB001 (which from what I understand is just a virtual allocation).
I discovered the actual USB port was a parent device called 'USB Printing Support', and the printer USB device was a child of that.
I pulled the WMI class Win32_USBControllerDevice and thought I found the relationship I need:
Unfortunately the PCI bus that both devices are related with is also related with a bunch of other devices, so I am not sure this approach will work.
Does anybody know a way I could programically relate my printer device with its parent USB device (Preferably one which I could pull the USB device info once it has been related to the printer)
If I open the properties->details window for the 'USB Printing Support' device, there is a property called 'Children' which would be perfect... I just don't know how to get to it... ;-(.
I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking