Do I need to use _stdcall when I export functions to be used by other languages?
In order for my function be used by other language, do I have to use _stdcall to declare my f开发者_Go百科unctions in C++?
It may not be strictly necessary, but it's generally the path of least resistance. Just for example, if the other language happened to be C, you could probably use _cdecl
or _fastcall
. If you want to support arbitrary languages, though, _stdcall
is the obvious choice.
精彩评论