[fpc-pascal] libusb header translation and OOP wrapper

Christo christo.crause at gmail.com
Tue Sep 25 21:57:58 CEST 2012


On Sun, 2012-09-23 at 23:26 +0200, Johann Glaser wrote:
> Hi!
> 
> Some time ago somebody asked about USB support. I've now finished the
> libusb 1.0 header translation and object-oriented wrapper.

Hi Hansi,

I see that the imported functions in libusb.pas are declared with the
cdecl calling convention. According to the libusb header this is so for
all operating systems except windows which is apparently compiled using
the stdcall calling convention.

Any ideas on how to define the calling convention in the import unit so
that it is either stdcall or cdecl depending on the target OS?

Regards,
Christo




More information about the fpc-pascal mailing list