Basics

Calling conventions

  • Thiscall

    • microsoft 32bit c++ specific

    • this pointer in ECX, rest of arguments on the stack

  • fastcall

    • The first 4 arguments are stored in registers, the rest on the stack

  • stdcall

    • used by 32bit windows.

    • arguments are pused in reverse order onto the stack.

    • the callee cleans up the stack (arguments)

  • cdecl

    • used by 32bits *nix

    • same as stdcall but the caller cleans up the stack

Last updated