[fpc-pascal] detecting c's calling convention

Henry Vermaak henry.vermaak at gmail.com
Wed Oct 27 11:37:05 CEST 2010


On 27/10/10 09:31, ik wrote:
> Hello All,
>
> I'm going to bind a SIP library called sofia-sip
> <http://sofia-sip.sourceforge.net/>, it is an open source (LGPL) cross
> platform SIP library from Nokia.
> Because the binding I'm going to make will also have to work under
> Windows, I must know how to detect what is the calling convention in the
> Windows compilation side.
> In theory it can be stdcall, but how can I make sure of it ?

Look for function attributes in the source.  If they use gcc it should 
be __attribute__(stdcall) or __stdcall (they may have this in a macro 
somewhere).  If you can't find anything, the default is cdecl.  I don't 
know what msvc uses by default.

Henry



More information about the fpc-pascal mailing list