I've made another (unsuccessful) test, using libusb-compat (
https://github.com/libusb/libusb-compat-0.1/wiki ). It's a compatibility layer which allows to use the new libusb 1.xx through the old API of libusb 0.1 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. If you want to test, I've put temporarily a zip of my test directory at http://mars42.com/test_libusb-compat.zip . I got the dlls through msys2 in this way: You can download MSYS2 (http://www.msys2.org/ ) by After complete installation, to install libusb type on the
command line: and to install libusb-compat type : pacman -S mingw64/mingw-w64-x86_64-libusb-compat-git 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... |
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal