SetupAPI.DLL to HID.DLL
Posted
by lexdean
on Stack Overflow
See other posts from Stack Overflow
or by lexdean
Published on 2010-04-06T06:50:05Z
Indexed on
2010/04/06
6:53 UTC
Read the original article
Hit count: 1048
With the SetupAPI.DLL I execute Function SetupDiGetClassDevs and get a pointer or handle
Then Begin a loop Then I run Return = Function SetupDiEnumDeviceInterfaces with SP_DEVICE_INTERFACE_DATA.cbSize = 0 to get my size of what SP_DEVICE_INTERFACE_DATA needs to be
Then I set size and execute again SP_DEVICE_INTERFACE_DATA.cbSize = return (the size) Function SetupDiEnumDeviceInterfaces
From the data structures I get DevicePath from SP_DEVINFO_DATA And a heap of information from the registry if I want it I beleave
What I’m realy wanting is to access the HID.DLL and call HidD_GetAttributes to get VendorID, ProductID, and VersionNumber To this Enumerated device, so I can ID the device. I expect this particular info would come from the USB device its self. Can any one show me how to do that.
By the way in my version of windows XP I’m using the registry path, I cannot find HKEY_LOCAL_MACHINE\Enum\HID...\Class I do not even get HKEY_LOCAL_MACHINE\Enum\ I think this is because I have not executed the SetupDiEnumDeviceInterfaces Function Why?
I find Lake View Research the only data that is in complete And does not cover this subject. Why is it all over the net when its junk????????
Thanks in advance, J Lex Dean.
© Stack Overflow or respective owner