The Old New Thing

You can ask the compiler to answer your calling convention questions

If you want to figure out some quirks of a calling convention, you can always ask the compiler to do it for you, on the not unreasonable assumption that the compiler understands calling conventions. "When a __stdcall function returns a large structure by value, there is a hidden first parameter that specifies the address the return value ...