Summary

This chapter described dynamic-link libraries, a special type of library that permits applications to share code and resources. DLLs exist primarily to provide services to applications. For example, the Windows DLLs make Windows functions available to applications; therefore, the applications need not contain the code that defines each function. You can create your own DLLs in order to share code and resources among your own applications.

With a static-link library, such as MLIBCEW.LIB, the linker copies the code for a particular routine to the application's executable file. In contrast, with a dynamic-link library, two or more applications can share a single copy of the source code for a routine. Applications link to DLL routines at run time, rather than at build time.

A typical use of a DLL is for defining custom controls. Your applications can then use those controls, and you can include the controls in your dialog boxes using the Dialog Editor.