Re: calling convention stdcalll and cdecl call

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"Alf P. Steinbach" wrote:
As you can see at the assembly language level [...] there's no
problem. [...] so it's just a tool problem, and for that matter,
also library problem, that there's no support.

I think there is a problem at the assembly language level.
Actually, it is the __stdcall calling convention itself is a
problem.

You have to pass a number of actual parameters to the collee.
Otherwise there is no way to clean the stack from within a
function. This is inherent limitation of __stdcall calling
convention no matter what tool or library you may use. __cdecl
delegates this problem to the caller, so there is nothing to wory
about for the function itself.

Alex


.