What is the default calling convention of static member functions in visual studio?
What is the default calling convention of stati开发者_JS百科c member functions for Microsoft's compiler? Can I change it by placing WINAPI in front of it?
The default convention is what ever is set in the project options (C/C++ -> Advanced -> Calling Convention), this defaults to __cdecl
(command line option /Gd
)
The default calling convention is cdecl. Yes, you can override this and specify the calling convention. In this regard there is nothing special about static member functions.
精彩评论