Delphi Language Guide Delphi for Microsoft Win32 Delphi for the Microsoft. Net framework



Yüklə 0,84 Mb.
Pdf görüntüsü
səhifə127/294
tarix02.01.2022
ölçüsü0,84 Mb.
#41395
1   ...   123   124   125   126   127   128   129   130   ...   294
DelphiLanguageGuide

Calling conventions
Directive Parameter order Clean-up Passes parameters in registers?
register Left-to-right
Routine
Yes
pascal
Left-to-right
Routine
No
cdecl
Right-to-left
Caller
No
stdcall
Right-to-left
Routine
No
safecall Right-to-left
Routine
No
The default register convention is the most efficient, since it usually avoids creation of a stack frame. (Access
methods for published properties must use register.) The cdecl convention is useful when you call functions from
shared libraries written in C or C++, while stdcall and safecall are recommended, in general, for calls to external
code. On Win32, the operating system APIs are stdcall and safecall. Other operating systems generally use cdecl.
(Note that stdcall is more efficient than cdecl.)
The safecall convention must be used for declaring dual-interface methods. The pascal convention is maintained
for backward compatibility.
The directives near, far, and export refer to calling conventions in 16-bit Windows programming. They have no effect
in Win32, or in .NET applications and are maintained for backward compatibility only.
113



Yüklə 0,84 Mb.

Dostları ilə paylaş:
1   ...   123   124   125   126   127   128   129   130   ...   294




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin