summaryrefslogtreecommitdiff
path: root/libusb/os/windows_winusb.h
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2018-01-03 13:53:56 -0800
committerChris Dickens <christopher.a.dickens@gmail.com>2018-01-03 13:53:56 -0800
commitc74dce858335d87ae07e2eceb7c166fa275bc8fe (patch)
treeb26349c5e30faf6b849a400225a4cad9d8c15fda /libusb/os/windows_winusb.h
parent8d248ab899e286aefa73c5700a23b3585d17b916 (diff)
downloadlibusb-c74dce858335d87ae07e2eceb7c166fa275bc8fe.tar.gz
Windows: Improve enumeration process
Prior to this commit, there were some limitations and inefficiencies during the enmeration process. First, the maximum number of device interface GUIDs that could be enumerated was fixed at 64. This limit has been removed and the list of GUIDs is dynamically resized as new ones are encountered. Logic has also been added to detect the presence of duplicate GUIDs in order to speed up the enumeration process. Next, when searching for device interface GUIDs, only the "DeviceInterfaceGUIDs" registry key was being consulted. Now we will also consider "DeviceInterfaceGUID" in order to support devices that have the GUID listed under this key (such as some WCID devices). Finally, there used to be a static list of USB PnP enumerator strings that were used to detect devices during the GENeric enumeration pass. In many cases, this is wasteful as these enumerators are only present with very specific hardware. To improve this, we now keep track of the USB PnP enumerator string encountered as we enumerate the hubs. This allows the enumeration process to only search for devices that could possibly be present on the system given the hardware and drivers that were encountered. Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Diffstat (limited to 'libusb/os/windows_winusb.h')
-rw-r--r--libusb/os/windows_winusb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h
index b411ba2..eed9850 100644
--- a/libusb/os/windows_winusb.h
+++ b/libusb/os/windows_winusb.h
@@ -293,7 +293,7 @@ struct driver_lookup {
/* OLE32 dependency */
DLL_DECLARE_HANDLE(OLE32);
-DLL_DECLARE_FUNC_PREFIXED(WINAPI, HRESULT, p, CLSIDFromString, (LPCOLESTR, LPCLSID));
+DLL_DECLARE_FUNC_PREFIXED(WINAPI, HRESULT, p, IIDFromString, (LPCOLESTR, LPIID));
/* Kernel32 dependencies */
DLL_DECLARE_HANDLE(Kernel32);