__stdcall functions in relocatable DLLs

Joao Pedro Sousa js@servisoft.pt
Sun Jan 11 13:15:00 GMT 1998

At 09:48 11-01-1998 -0800, Jason Alan Nordwick wrote:
>Is there anywhere or anything that explains the different calling
>conventions ?

__stdcall is the Win32 function calling convention. It specifies that
function parammeters are pushed on the stack from right to left, and the
called function cleans up the stack on function exit. On some architectures
(e.g. i386) this can be slightly faster by using a special instruction that
returns from the function and removes a specified number of bytes from the
stack (ret n).
The "normal" C calling convention places the burden of cleaning the stack
on the caller side.

By the way, anyone knows if exported functions on a DLL MUST be __stdcall?
Can they be C calling convention?

For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list