Forum > General

[SOLVED] USB connected device- How to access 'Bus Reported Device Description'

(1/8) > >>

Username:
Hi,

OS is Windows 10 64 bit, but preferably need general Windows info.
FPC version 3.3.2
Laz Ver 2.2.0

I have a device connected to USB Port, I need to find it, ie, determine which com port it is connected to. The only field I can see in the Windows Device Manager ComPorts list that easily identifies my device is the 'Bus Reported Device Description' Field in the details tab.
 
I have searched and so far struck out on just how to do this. I downloaded Jurrasic Pork's Utilwmi and played with that a bit, example works fine but it looks like it is not straightforward or maybe impossible to get at this field with that. I'm not well versed in this stuff, and most of it is out of my league, I fear.

I would really appreciate any help on this. TIA

jamie:
If you would like to and handy at reading some C code here is the link to the source code for USBView from MS.

https://github.com/Microsoft/Windows-driver-samples/tree/master/usb/usbview

Beware that you may need some create some procedure calls to DLL's etc.

Username:

--- Quote from: jamie on June 26, 2022, 01:35:44 am ---If you would like to and handy at reading some C code here is the link to the source code for USBView from MS.

https://github.com/Microsoft/Windows-driver-samples/tree/master/usb/usbview

Beware that you may need some create some procedure calls to DLL's etc.


--- End quote ---

Thanks Jamie,
I looked through it and I think I'm probably not able to sort out the parts I need and translate in any reasonable time period (Like say, the rest of my life...) but I appreciate your suggestion. However that, for me is like drinking from a firehose. :)

Thausand:
If usbview too much then may be can help:

- Powershell wmi (that may be find you device ?) read: https://devblogs.microsoft.com/powershell/displaying-usb-devices-using-wmi/
- .net/vb (use windows API call so can translate to pascal), read: https://stackoverflow.com/questions/26732291/how-to-get-bus-reported-device-description-using-c-sharp

Username:

--- Quote from: Thausand on June 26, 2022, 02:54:23 am ---If usbview too much then may be can help:

- Powershell wmi (that may be find you device ?) read: https://devblogs.microsoft.com/powershell/displaying-usb-devices-using-wmi/
- .net/vb (use windows API call so can translate to pascal), read: https://stackoverflow.com/questions/26732291/how-to-get-bus-reported-device-description-using-c-sharp

--- End quote ---

Thanks Thausand,
The VB code in the second link looks promising. I'm surprised that doing this is such a complex task. Having the VB code in one piece should make it easier to put something together. I appreciate the links. I came across the Powershell post at stackoverflow earlier. I'm not familiar with powershell at all so I passed on that one.

Navigation

[0] Message Index

[#] Next page

Go to full version