I certainly acknowledge stealing lots of information and ideas from this CRC code and documentation. Creating a Dynamic Link Library Win32 Dynamic Link Libraries provide a mechanism whereby two or more programs can share the same set of library object modules on the disk. Perhaps even more important that saving space, DLLs provide a mechanism whereby two different programming languages may communicate with one another. In order to achieve this generality, Microsoft had to carefully describe the calling mechanism between DLLs and other modules. In order to communicate data, all languages that support DLLs need to agree on the calling and parameter passing mechanisms.
Parameters can be bytes, words, doublewords, pointers, or strings.
Stdcall procedures push their parameters from left to right as they are encountered in the parameter list. In stdcall procedures, it is the procedure's responsibility to clean up the parameters pushed on the stack. The only other issue, with respect to stdcall conventions, is the naming convention. The stdcall mechanism mangles procedure names. DLLs must provide a special procedure that Windows calls to initialize the procedure.