From: Xiaofan C. <xia...@gm...> - 2021-01-22 01:49:51
|
On Thu, Jan 21, 2021 at 8:44 AM Jonas Malaco via pyusb-users <pyu...@li...> wrote: > > According to Process Explorer, there is now an QueryNameInformationFile for: > > > > C:\Windows\System32\libusb-1.0.dll (because the program explicitly > > looks for it there!) > > > > in addition to accessing libusb-1.0.dll in the 'library install' directory. > > > > Perhaps I had the wrong version of the library somewhere? > > Yes, that was probably it. > > I'm not super familiar with how DLLs are loaded by Python on Windows, but it's > possible that if a DLL is found with the correct *name* the search stops, even > if later the DLL turns out to have been built for the wrong architecture. > This DLL search order is from Microsoft. https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order You can see it is pretty complicated. So the best way for end user is to remove libusb-1.0.dll in all the directories except the system directories. If you use Zadig to install WinUSB driver, that is automatically done. -- Xiaofan |