Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve USB device interface GUID?

To get the GUID for a HID device, I know I can do this:

GUID myHidGuid;
memset(&myHidGuid, 0, sizeof(GUID)); //allocate
HidD_GetHidGuid(&myHidGuid); //define the HID GUID

Is there a function similar to HidD_GetHidGuid() that will give me the GUID for other device classes?

I am trying to determine if a USB wireless network adaptor is attached. I believe I want GUID_DEVINTERFACE_NET but I don't know how to retrieve it.

like image 895
fbo Avatar asked Dec 03 '12 19:12

fbo


People also ask

Where can I find device GUID?

It can be obtained through Device Manager by right-clicking on the device, selecting Properties > Details tab, and selecting "Device Class GUID" from the drop-down menu.

What is device GUID?

A GUID (globally unique identifier) is a 128-bit text string that represents an identification (ID). Organizations generate GUIDs when a unique reference number is needed to identify information on a computer or network. A GUID can be used to ID hardware, software, accounts, documents and other items.


1 Answers

I don't think you have something similar, these ClassGuids are decided by Microsoft the list is here:

http://msdn.microsoft.com/en-us/library/windows/hardware/ff553426(v=vs.85).aspx

http://msdn.microsoft.com/en-us/library/windows/hardware/ff553428(v=vs.85).aspx

A good example would be this CodeProject article.

like image 87
garzanti Avatar answered Oct 09 '22 12:10

garzanti