Why DLLs?

From EDM2
Jump to: navigation, search

By IBM

It's no accident that all OS/2 APIs are provided through DLLs. They're simply the most efficient way to share code and data across any number of OS/2 applications.

Normally code in libraries is linked into the application that uses it; DLLs are actually loaded into memory. As a result, linking an application takes less time, because you don't have to copy the library code into the application. You need only copy an import reference.

Dynamic linking offers two other advantages.

  • You need less hard disk space and memory to run applications because code and data are shared.
  • You can modify the code in a DLL without needing to relink the application. With dynamic linking, you resolve references (calls) to external routines in DLLs at the time the application program is loaded, rather than at link-edit time.

Note: When we are talking about an executable or DLL, an object refers to one or more segments that have been grouped. This grouping can either be specified explicitly, or can happen by default if the segments have the same attributes. For example, the group DGROUP is an object in the context of an executable or DLL.

Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation