The __stdcall calling convention is a faster, more type-safe version of __cdecl. The following list shows the implementation of this calling convention:
Element | Implementation |
Argument-passing order | Right to left |
Argument-passing convention | By value, unless a pointer or reference type is passed |
Stack-maintenance responsibility | Called function adjusts the stack |
Name-decoration convention | An underscore (_) is prefixed to the name. The name is followed by the at-sign (@) character, followed by the number of bytes in the argument list. Therefore, the function declared as int func( int a, double b ) is decorated as follows: _func@12 |
Case-translation convention | None |
Functions declared using the __stdcall modifier return values the same way as functions declared using __cdecl.
Note:
Functions with variable argument lists must be prototyped, or a linker error occurs.