Calling Conventions Demystified
Calling Conventions Demystified
__cdecl,__fastcall, __stdcall 什么区别?
c/c++的參數壓棧順序
* __cdecl is the default calling convention for C and C++ programs. The advantage of this calling convetion is that it allows functions with a variable number of arguments to be used. The disadvantage is that it creates larger executables.
* __stdcall is used to call Win32 API functions. It does not allow functions to have a variable number of arguments.
* __fastcall attempts to put arguments in registers, rather than on the stack, thus making function calls faster.
* Thiscall calling convention is the default calling convention used by C++ member functions that do not use variable arguments.
沒有留言:
張貼留言