New Document
 
美丽心灵


时 间 记 忆
<<  < 2007 - >  >>
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31

我的相册

最 新 评 论

最 新 日 志

最 新 留 言

搜 索

最 新 留 言

友 情 连 接
处理 SSI 文件时出错
  • 日志:8
  • 评论:7
  • 留言:1
  • 访问:


 
 
 
 
 
 
 
 
 
 
 
 
 
Calling Conventions
[ 2007-5-4 10:43:00 | By: dragonflier ]
 
Microsoft Specific —>
__cdecl
This is the default calling convention for C and C++ programs. Because the stack is cleaned up by the caller, it can do vararg functions. The __cdecl calling convention creates larger executables than __stdcall, because it requires each function call to include stack cleanup code. The following list shows the implementation of this calling convention.
Element
Implementation
Argument-passing order
Right to left
Stack-maintenance responsibility
Calling function pops the arguments from the stack
Name-decoration convention
Underscore character (_) is prefixed to names
Case-translation convention
No case translation performed

__stdcall
The __stdcall calling convention is used to call Win32 API functions. The callee cleans the stack, so the compiler makes vararg functions __cdecl. Functions that use this calling convention require a function prototype. The following list shows the implementation of this calling convention.
Element
Implementation
Argument-passing order
Right to left
Argument-passing convention By value, unless a pointer or reference type is passed
Stack-maintenance responsibility
Called function pops its own arguments from the stack
Name-decoration convention
An underscore (_) is prefixed to the name. The name is followed by the at sign (@) followed by the number of bytes (in decimal) in the argument list
Case-translation convention
No case translation performed
 
__fastcall
The __fastcall calling convention specifies that arguments to functions are to be passed in registers, when possible. The following list shows the implementation of this calling convention.
Element
Implementation
Argument-passing order
The first two DWORD or smaller arguments are passed in ECX and EDX registers; all other arguments are passed right to left
Stack-maintenance responsibility
Calling function pops the arguments from the stack
Name-decoration convention
At sign (@) is prefixed to names; an at sign followed by the number of bytes (in decimal) in the parameter list is suffixed to names
Case-translation convention
No case translation performed

thiscall
This is the default calling convention used by C++ member functions that do not use variable arguments. The callee cleans the stack, so the compiler makes vararg functions __cdecl, and pushes the this pointer on the stack last. The thiscall calling convention cannot be explicitly specified in a program, because thiscall is not a keyword.
All function arguments are pushed on the stack. Because this calling convention applies only to C++, there is no C name decoration scheme.

END Microsoft Specific
 
 
处理 SSI 文件时出错

发表评论:

    大名:
    密码: (游客无须输入密码)
    主页:
    标题:
    教育人博客页面数据载入,请耐心等待
 
Powered by Oblog.