who push params to stack when call function using _stdcall or _cdcel in C/C++?
We declare exports function using _stdcall when wirte exports functions in Dll. Then the cleaning stacking work will be implemented by function who is called. I w开发者_Python百科ant to know who push params to stack when call function using _stdcall or _cdcel in C/C++? Thanks for you answer.
The caller function always pushes the parameters onto stack, except for __fastcall. Cleanup of the stack and the order parameters is governed by the calling convention.
See http://en.wikipedia.org/wiki/X86_calling_conventions for a good writeup.
The calling function will except in the case of naked will push the parameters on the stack. How would the called function know what to push.
精彩评论