VC++ Function Calling Conventions

Most popular Function Calling Conventions:
1. _cdecl
2. pascal
3. _stdcall
4. _fastcall

Here is what each one does:

_cdecl
1. Arguments Passed from Right to Left
2. Calling Function Clears the Stack
3. ‘this’ pointer is passed via stack last in case of Programs using OOP
4. Functions using _cdecl are preceded by an “_”

Pascal
1. Arguments Passed from Left to Right
2. Called Function Clears the Stack

_stdcall
1. Arguments Passed from Right to Left
2. Called Function Clears the Stack
3. ‘this’ pointer passed via Stack Last
4. Functions Using _stdcall are preceded by a ‘_’ and end with ‘@’

_fastcall
1. Passes Arguments Via Registers. In case of unavailability of registers arguments are passed via the Stack.
2. Functions using Fastcall precede with a ‘@’.