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(), and isc_event_block()—use the CDECL conventions.
To make a function use the STDCALL calling convention, the __stdcall keyword must be added to the function declaration, as in the following example.
ISC_TIMESTAMP* __stdcall addmonth(ISC_TIMESTAMP *preTime)
// body of function here

Advance To: