Next: , Previous: Mixed-Language Programming on Windows, Up: Microsoft Windows Topics

H.6 Windows Calling Conventions

This section pertain only to Win32. On Win64 there is a single native calling convention. All convention specifiers are ignored on this platform.

When a subprogram F (caller) calls a subprogram G (callee), there are several ways to push G's parameters on the stack and there are several possible scenarios to clean up the stack upon G's return. A calling convention is an agreed upon software protocol whereby the responsibilities between the caller (F) and the callee (G) are clearly defined. Several calling conventions are available for Windows: