Top "Calling-convention" questions

A calling convention refers to the way a function transmits parameters to a called function and receives a return value from it.

How to declare an __stdcall function pointer

I tried this typedef void (* __stdcall MessageHandler)(const Task*); This compiles but gives me this warning (VS2003): warning C4229: anachronism …

c++ visual-c++ function-pointers calling-convention
How are variable arguments implemented in gcc?

int max(int n, ...) I am using cdecl calling convention where the caller cleans up the variable after the callee …

c gcc variadic-functions calling-convention
What does "cdecl" stand for?

Yes, I know that "cdecl" is the name of a prominent calling convention, so please don't explain calling conventions to …

c++ c calling-convention nomenclature cdecl
Is fastcall really faster?

Is the fastcall calling convention really faster than other calling conventions, such as cdecl? Are there any benchmarks out there …

c++ performance calling-convention fastcall
__cdecl and __declspec calling conventions confusion

I am writing a DLL for a third party application. The main software engineer mentions that the application uses the __…

c++ c dllimport calling-convention
What's safecall?

I'm working on the creation of an ActiveX EXE using VB6, and the only example I got is all written …

delphi calling-convention
Changing a C# delegate's calling convention to CDECL

I have had this problem with C# when I was using DotNet1.1 The problem is this. I have an unmanaged …

c# c++ interop pinvoke calling-convention
C: Return value via stack/register question

I am new to C, and there is one thing I can not understand. When function returns something that is …

c function return-value calling-convention
Why is %eax zeroed before a call to printf?

I am trying to pick up a little x86. I am compiling on a 64bit mac with gcc -S -O0. …

macos assembly gcc x86-64 calling-convention