A dynamic link library (DLL) consists of shared code and data that an application can load at run time, rather than statically link at compile time. Advantages of using DLLs include reduced code footprint, lower memory utilization due to single-copy-sharing, flexible development and testing, modularity and functional isolation, and so on.
This paper provides guidelines for developing robust, portable, and extensible DLLs for the Windows family of operating systems.
Included in this paper:
• | The Library Loader, DLLMain, and the Loader Lock |
• | Interactions Between the Loader, the Loader Lock, and DLLMain |
• | Best Practices for Implementing DLLMain |
http://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspx