Loading DLLs Explicitly

Although loading DLLs implicitly is convenient, it isn't always the most desired method. Suppose you have a DLL that contains many routines. If it's likely that your application will never call any of the DLL's routines, it would be a waste of memory to load the DLL every time your application runs. This is especially true when using multiple DLLs with one application. Another example is when using DLLs as large objects: a standard list of functions that are implemented by multiple DLLs but do slightly different things, such as printer drivers and file format readers. In this situation, it would be beneficial to load the DLL when specifically requested to do so by the application. This is referred to as explicitly loading ...

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.