Sign in Join
Wiki copytemporary

Stdcall: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Stdcall

OldNewLine
1+Back to [[Reserved words]].
2+
3+The modifier **stdcall**:
4+
5+- belongs to the calling conventions for internal and external subroutines;
6+- pushes the parameters from right to left on the stack;
7+- aligns all the parameters to a default alignment.
8+
9+Example:
10+
11+``` pascal
12+ function subTest : string; [stdcall];
13+ begin
14+ subTest := 'abc';
15+ end;
16+```
17+
18+Example 2:
19+
20+``` pascal
21+ ...
22+ function funcTest(strTestData : Pchar) : LongWord; stdcall; external 'testLibrary.dylib';
23+ ...
24+```
25+
26+---
27+*From the Free Pascal wiki, page "Stdcall", as it stood on 2020-02-27 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history