Note that there are some explanatory texts on larger screens.

plurals
  1. POSetupAPI.DLL to HID.DLL
    text
    copied!<p>Using SetupAPI I execute the function <code>SetupDiGetClassDevs</code> and get a pointer or a handle.</p> <p>Then I start a loop and run:</p> <pre><code>Return = SetupDiEnumDeviceInterfaces(); </code></pre> <p>with</p> <pre><code>SP_DEVICE_INTERFACE_DATA.cbSize = 0 </code></pre> <p>to get the size that <code>SP_DEVICE_INTERFACE_DATA</code> needs to be.</p> <p>Then I set this size and execute again: </p> <pre><code>SP_DEVICE_INTERFACE_DATA.cbSize = return; // (the size) SetupDiEnumDeviceInterfaces(); </code></pre> <p>From the data structures I get:</p> <p><code>DevicePath</code> from <code>SP_DEVINFO_DATA</code> and a heap of information from the registry if I want it I believe.</p> <p>What I really want is to access the HID library and call <code>HidD_GetAttributes</code> to get the <code>VendorID</code>, <code>ProductID</code>, and <code>VersionNumber</code> from this enumerated device, so I can identify the device.</p> <p>I expect this particular info would come from the USB device itself. Can anyone show me how to do that?</p> <p>By the way, in my version of Windows XP I’m using the registry path, I cannot find <code>HKEY_LOCAL_MACHINE\Enum\HID\...\Class</code>.</p> <p>I don't even find <code>HKEY_LOCAL_MACHINE\Enum\</code>. I think this is because I have not executed the function <code>SetupDiEnumDeviceInterfaces</code>.</p> <p>I can only find complete data in Lakeview Research. But it does not cover this subject. Why is it all over the net when it's junk?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload