What is the default calling convention of static 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With