[fpc-devel] {$i ascdef.inc} / stdcall

Sven Barth pascaldragon at googlemail.com
Mon May 6 18:58:12 CEST 2024


Martin Frb via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Mo.,
6. Mai 2024, 14:11:

> Maybe of interest?
>
> The include file {$i ascdef.inc} is used from unit Windows with
> {$calling stdcall}
> in effect.
>
> Most functions in it therefore don't have "stdcall". But some do. Is
> that known/wanted/...?
>
> Similar in some other includes.
>

The majority of Windows functions indeed is stdcall, so the "$calling" is
correct as it simplifies things (though it might be cleaner to move it from
an include to the unit itself). Those functions that have an additional
"stdcall" modifier don't hurt.
The important point is that those few functions that really are "cdecl" are
marked as such.

Please note that "stdcall" does not matter on non-i386 as it's simply
mapped to the platform default there.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20240506/1efdc13e/attachment.htm>


More information about the fpc-devel mailing list