C语言调用约定

2017-03-06  本文已影响114人  Fa1se003

stdcall

语法:
int __stdcall function(int a,int b)
    1、参数从右向左压入堆栈
2、函数自身修改堆栈
内平栈

cdecl

cdecl调用约定又称为C调用约定
int function (int a ,int b) //不加修饰就是C调用约定 
int __cdecl function(int a,int b)//明确指出C调用约定
外平栈

fastcall

其声明语法为:int __fastcall function(int a,int b)
1、通过ecx和edx传递,其他参数通过从右向左的顺序压栈,
          如果参数大于2个,则其余的用堆栈传参
2、被调用函数清理堆栈
外平栈

thiscall

naked call

上一篇下一篇

猜你喜欢

热点阅读