Calling Conventions
From InterBase
Go Up to Programming with the InterBase API
Conventions for calling functions vary from platform to platform. Specifically:
- On UNIX platforms, use the C calling conventions (
CDECL) in all cases. - On Windows, use the standard calling convention (
_stdcall) for all functions that have a fixed number of arguments. Only three functions have a variable number of arguments. For these three—isc_start_transaction(),isc_expand_dpb(), andisc_event_block()—use theCDECLconventions.
- To make a function use the
STDCALLcalling convention, the__stdcallkeyword must be added to the function declaration, as in the following example.
ISC_TIMESTAMP* __stdcall addmonth(ISC_TIMESTAMP *preTime)
{
// body of function here
}