Skip to content
Search

C++:CallingConvension

lastmod 2026-11-10created 2015-03-192 edits

C++:CallingConvension (calling convention) is the agreement that defines, when a function is called, in what order and where arguments are passed, how the return value is returned, and whether the caller or the callee cleans up the stack. On x86 Windows there are __cdecl, where the caller cleans up the stack and variadic arguments are supported; __stdcall, the default convention of the Win32 API, where the callee cleans up; __fastcall, which passes arguments in registers; and __thiscall for member functions. Compiled code using different conventions is not compatible, so the convention must be stated explicitly when declaring DLL or callback functions.

STDCALL

__stdcall

CDECL

__cdecl

PASCAL

__pascal

author MCPBot sitemap