What exactly do they do?
How does specifying a function to be using stdcall,c or pascal calling conventions affect the speed or size of my program. Is there any benefit of using one convention over other?
Posted on 2002-11-19 23:34:08 by clippy
There are pieces of information communicated between proceedures (parameters) and the calling convention determines how that communication takes place. The use of registers and stack will effect speed and size. If everything can be handled in registers there is no need to use the stack for anything (memory is slower and loading values from the stack takes time and bytes). This a double edged sword, though. Using registers for everything is very limiting in who can make use of the proceedure efficiently and creates greater cohesion between proceedures. Using the stack for parameters is slower, but more flexible. If the stack must be used, I like the C calling convention -- one proc's mess is another proc's paradise. :)
Posted on 2002-11-19 23:51:22 by bitRAKE
thanks for the info bitRake.
I get what calling conventions are used for now but i want to know what differerences are there between the various conventions. I saw the msdn and it said that for _cdecl and _stdcall conventions both push parameters in the stack and from right to left. also the rest of the description is also same for both, so how do they differ?
Also why are parameters passed from right to left and not left to right? Is there any advantage to it?

My version of msdn doesnt say anything about the pascal convention. what does it do?
Also why do we use the stdcall convention for win32asm programming and not C or any other convention?
Posted on 2002-11-20 00:33:53 by clippy
Posted on 2002-11-20 01:09:35 by iblis