Example of Use of Calling Conventions.


Function is : 
void    calltype MyFunc( char c, short s, int i, double f );
.
.
.
void MyFunc( char c, short s, int i, double f )
{
.
.
.
}
.
.
.
MyFunc ('x', 12, 8192, 2.7183);

1 . _cdecl :
 The C decorated function name is "_MyFunc.

The __cdecl calling convention
CDECL calling Convention
2 . stdcall and thiscall : The C decorated name (__stdcall) is "_MyFunc@20." The C++ decorated name is proprietary.

The __stdcall and thiscall calling conventions
Calling Conventions
3. __fastcall: The C decorated name (__fastcall) is "@MyFunc@20." The C++ decorated name is proprietary.

The __fastcall calling convention
Fastcall Calling Convention
4. __stdcall and thiscall : The C decorated name (__stdcall) is "_MyFunc@20." The C++ decorated name is proprietary.

The __stdcall and thiscall calling conventions
5. __fastcall: The C decorated name (__fastcall) is "@MyFunc@20." The C++ decorated name is proprietary.



The __fastcall calling convention
Fastcall Calling Convention

Comments

Popular Posts