<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I've made another (unsuccessful) test, using libusb-compat (
<a class="moz-txt-link-freetext" href="https://github.com/libusb/libusb-compat-0.1/wiki">https://github.com/libusb/libusb-compat-0.1/wiki</a> ). <br>
</p>
<p>It's a compatibility layer which allows to use the new libusb
1.xx through the old API of libusb 0.1</p>
<p>I get nearly the same results as with libusb-win32 (just "Bus:
001" instead "Bus: bus-0"), maybe there's an error in my code.</p>
<p>If you want to test, I've put temporarily a zip of my test
directory at <a moz-do-not-send="true"
href="http://mars42.com/test_libusb-compat.zip"><span
class="moz-txt-link-freetext">http://mars42.com/test_libusb-compat.zip</span></a>
.</p>
<p>I got the dlls through msys2 in this way:</p>
<p>You can download MSYS2 (<a class="moz-txt-link-freetext" href="http://www.msys2.org/">http://www.msys2.org/</a> ) by<br>
<a class="moz-txt-link-freetext" href="http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe">http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe</a><br>
</p>
<p>After complete installation, to install libusb type on the
command line:<br>
pacman -S mingw64/mingw-w64-x86_64-libusb</p>
<p>and to install libusb-compat type :<br>
</p>
<p> pacman -S mingw64/mingw-w64-x86_64-libusb-compat-git<br>
<br>
In subdirectory mingw64\bin of your installation you get:<br>
libusb-1.0.dll the libusb dll from <a class="moz-txt-link-freetext" href="https://libusb.info/">https://libusb.info/</a><br>
libusb-0-1-4.dll the libusb-compat dll with version 0.1
functions names, and which call libusb-1.0.dll<br>
</p>
<p>I'm not sure of the value of PATH_MAX to define in libusb.pas
because in the dll PATH_MAX is taken from limits.h (
mingw64\x86_64-w64-mingw32\include\limits.h) where it's first
defined to PATH_MAX=260 but if _POSIX_ is defined then it's
redefined to 512. Of course this can create havoc in the
definition of USBDevice if the pointer "bus : PUSBBus;" isn't
defined at the right place in memory...<br>
<br>
For getting limits.h in subdirectory
mingw64\x86_64-w64-mingw32\include , type :<br>
pacman -S mingw-w64-x86_64-headers-git<br>
</p>
</body>
</html>