14.9.27 winapi

This modifier allows you to specify the native calling conventions for the current platform: the compiler will then select the correct calling convention depending on the OS architecture: stdcall on windows-i386 and cdecl on all other platforms.

The following example demonstrates this:

function libusb_init(var ctx:plibusb_context):integer;winapi;external libusb1;