Why Use DLLs?

There are several reasons for using DLLs, some of which were mentioned earlier. In general, you use DLLs to share code or system resources, to hide your code implementation or low-level system routines, or to design custom controls. We discuss these topics in the following sections.

Sharing Code, Resources, and Data with Multiple Applications

Earlier in this chapter, you learned that the most common reason for creating a DLL is to share code. Unlike units, which enable you to share code with different Delphi applications, DLLs enable you to share code with any Windows application that can call functions from DLLs.

Additionally, DLLs provide a way for you to share resources such as bitmaps, fonts, icons, and so on that you normally ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.