stdcall and cdecl

Raymond Chen gives a nice overview of what __stdcall and __cdecl does. (1) The caller “knows” to clean up the stack after calling a function because the compiler knows the calling convention of that function and generates the necessary code. void __stdcall StdcallFunc() {} void __cdecl CdeclFunc() { // The compiler knows that StdcallFunc() uses … Read more

How do you read C declarations?

This article explains a relatively simple 7 rules which will let you read any C declaration, if you find yourself wanting or needing to do so manually: http://www.ericgiguere.com/articles/reading-c-declarations.html Find the identifier. This is your starting point. On a piece of paper, write “declare identifier as”. Look to the right. If there is nothing there, or … Read more