This table gives an overview of the calling conventions supported by the Delphi compiler. For parameter order, "left-to-right" means that the parameters are pushed into registers or on the stack in the order that they are declared. Correspondingly, "right-to-left" means that parameters are pushed in reverse order.
Parameter order | Clean-up by | Common Usage | |
register | left-to-right | Callee | Delphi applications |
pascal | left-to-right | Callee | Backwards compatibility |
cdecl | right-to-left | Caller | C and C++ libraries |
stdcall | right-to-left | Callee | Windows API calls |
safecall | right-to-left | Callee | COM and dual interface routines |