Stdcall

From Free Pascal wiki
Revision as of 00:01, 28 February 2020 by Trev (talk | contribs) (English translation of German page with expanded content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Deutsch (de) English (en)


Back to Reserved words.


The modifier stdcall:

  • belongs to the calling conventions for internal and external subroutines;
  • pushes the parameters from right to left on the stack;
  • aligns all the parameters to a default alignment.

Example:

 function subTest : string; [stdcall];
 begin
   subTest := 'abc';
 end;

Example 2:

 ...
 function funcTest(strTestData : Pchar) : LongWord; stdcall; external 'testLibrary.dylib';
 ...