<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Hansi,<br>
</div>
<div class="moz-cite-prefix">Le 04/08/2019 à 14:05, Johann Glaser a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:6b4bb7ee6879908ef93e89e6b705b0317dca06af.camel@gmx.at">
<pre class="moz-quote-pre" wrap="">Thanks for your effort and please excuse my late reply, I was busy the
last few days.</pre>
</blockquote>
<p>With pleasure.</p>
<p class="moz-quote-pre" wrap="">test1library.pas from branch
"libusb-1.0" worked nearly out of the box.<br>
<br>
I nearly just needed to redefine extdecl from stdcall to cdecl as
in Linux. <br>
<br>
I copied (libusb-1.0.22)\MinGW64\dll\libusb-1.0.dll of 274 Ko to
(pas-libusb branch libusb-1.0)\src\examples.<br>
In libusb.pas I removed {$LINKLIB c} and changed {$LINKLIB
usb-1.0} to {$LINKLIB libusb-1.0.dll}<br>
I join my diff files. Lazarus made a few changes to
test1library.lpi but I don't think they are important.<br>
I verified, test1library can be build with this command line:</p>
<p class="moz-quote-pre" wrap="">C:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.exe
-MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Filib\x86_64-win64 -Fu..
-Fu. -FUlib\x86_64-win64 -FE. -otest1library.exe test1library.pas<br>
</p>
<p class="moz-quote-pre" wrap="">(eventually you need to create
subdirectory lib\x86_64-win64 by hand)</p>
<p class="moz-quote-pre" wrap="">Upon execution, I got this results:</p>
<pre>:\03_travail\libusb\pas-libusb\src\examples>test1library.exe
Using libusb(x) v1.0.22.11312
Found 13 devices:
Bus 1 Device 15: ID 10C4:EA60, port: 14, port path from HCD: 0, Speed: 12 Mbit/s (USB FullSpeed)
Bus 1 Device 12: ID 28DE:2101, port: 7, port path from HCD: 0->11->11, Speed: 12 Mbit/s (USB FullSpeed)
Bus 1 Device 0: ID 8086:A2AF, port: 0, Speed: Unknown
Bus 1 Device 10: ID 0BB4:2C87, port: 5, port path from HCD: 0->5->5, Speed: 12 Mbit/s (USB FullSpeed)
Bus 1 Device 9: ID 0BB4:2C87, port: 2, port path from HCD: 0->0->0, Speed: 480 Mbit/s (USB HighSpeed)
Bus 1 Device 4: ID 1C4F:0002, port: 7, port path from HCD: 0, Speed: 1.5 Mbit/s (USB LowSpeed)
Bus 1 Device 2: ID 046D:C077, port: 8, port path from HCD: 0, Speed: 1.5 Mbit/s (USB LowSpeed)
Bus 1 Device 8: ID 28DE:2000, port: 1, port path from HCD: 0->1->1, Speed: 12 Mbit/s (USB FullSpeed)
Bus 1 Device 7: ID 0BB4:0306, port: 2, port path from HCD: 0->33, Speed: 12 Mbit/s (USB FullSpeed)
Bus 1 Device 11: ID 28DE:2101, port: 6, port path from HCD: 0->128->128, Speed: 12 Mbit/s (USB FullSpeed)
Bus 1 Device 5: ID 07CA:A110, port: 5, port path from HCD: 0, Speed: 480 Mbit/s (USB HighSpeed)
Bus 1 Device 6: ID 0BB4:2134, port: 1, port path from HCD: 0->0, Speed: 480 Mbit/s (USB HighSpeed)
Bus 1 Device 1: ID 0BB4:2210, port: 11, port path from HCD: 0, Speed: 480 Mbit/s (USB HighSpeed)
E:\03_travail\libusb\pas-libusb\src\examples></pre>
<br>
</body>
</html>