C language
Rules:
1, __cdecl
In this declarative way, only an underscore is added to the function name, and the function return value, parameter, is not processed at all.
2, __stdcall
In this declarative way, precede the function name with an underscore, followed by the "@" symbol, and finally the sum of the function parameter size (NOTE: This sum contains a byte fill).
3, __fastcall
In this declarative way, the only difference with __stdcall is that the underscore in front of the function becomes the "@" symbol.
Function |
1, void __calltype f (); 2, int __calltype f (); 3, int __calltype f (int); 4, double __calltype f (int, double); 5, int* __calltype f (int*, char*); |
__cdecl |
1, _f 2, _f 3, _f 4, _f 5, _f |
__stdcall |
1. [Email protected] 2. [Email protected] 3. [Email protected] 4. [Email protected] 5. [Email protected] |
__fastcall |
1, @[email protected] 2, @[email protected] 3, @[email protected] 4, @[email protected] 5, @[email protected] |
C + + language
The name mangling C + +